diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-09 07:08:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-09 07:08:01 +0000 |
commit | e18b97121c286eeff5efe89150b093bf1b7b7bfc (patch) | |
tree | 2618633963fd3849ec0924a34244dcbdaca0a89e /include/llvm/Analysis | |
parent | 6194569d22003fddaf1a33acdbb84d5efe76e7d7 (diff) | |
download | external_llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.zip external_llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.gz external_llvm-e18b97121c286eeff5efe89150b093bf1b7b7bfc.tar.bz2 |
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')
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index b46563b..34a4a17 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 |