summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/MemoryDependenceAnalysis.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-09 07:08:01 +0000
committerChris Lattner <sabre@nondot.org>2009-12-09 07:08:01 +0000
commite18b97121c286eeff5efe89150b093bf1b7b7bfc (patch)
tree2618633963fd3849ec0924a34244dcbdaca0a89e /include/llvm/Analysis/MemoryDependenceAnalysis.h
parent6194569d22003fddaf1a33acdbb84d5efe76e7d7 (diff)
downloadllvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.gz
llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.bz2
llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.xz
change NonLocalDepEntry from being a typedef for an std::pair to be its
own small class. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/MemoryDependenceAnalysis.h')
-rw-r--r--include/llvm/Analysis/MemoryDependenceAnalysis.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h
index b46563b475..34a4a17e17 100644
--- a/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -131,6 +131,27 @@ namespace llvm {
}
};
+ /// NonLocalDepEntry - This is an entry in the NonLocalDepInfo cache, and an
+ /// entry in the results set for a non-local query. For each BasicBlock (the
+ /// BB entry) it keeps a MemDepResult.
+ class NonLocalDepEntry {
+ BasicBlock *BB;
+ MemDepResult Result;
+ public:
+ NonLocalDepEntry(BasicBlock *bb, MemDepResult result)
+ : BB(bb), Result(result) {}
+
+ // BB is the sort key, it can't be changed.
+ BasicBlock *getBB() const { return BB; }
+
+ const MemDepResult &getResult() const { return Result; }
+ void setResult(const MemDepResult &R) { Result = R; }
+
+ bool operator<(const NonLocalDepEntry &RHS) const {
+ return BB < RHS.BB;
+ }
+ };
+
/// MemoryDependenceAnalysis - This is an analysis that determines, for a
/// given memory operation, what preceding memory operations it depends on.
/// It builds on alias analysis information, and tries to provide a lazy,
@@ -152,7 +173,6 @@ namespace llvm {
LocalDepMapType LocalDeps;
public:
- typedef std::pair<BasicBlock*, MemDepResult> NonLocalDepEntry;
typedef std::vector<NonLocalDepEntry> NonLocalDepInfo;
private:
/// ValueIsLoadPair - This is a pair<Value*, bool> where the bool is true if