summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-08-08 21:53:20 +0000
committerOwen Anderson <resistor@mac.com>2007-08-08 21:53:20 +0000
commit064bad44d1ad0579da30ed96ca02817eabf4f244 (patch)
tree8c99913f560ce7ce2dc30a8da647378b432cbc5c
parent0e34ee25ab02248ca83368b660fc6637edf693c5 (diff)
downloadbcm5719-llvm-064bad44d1ad0579da30ed96ca02817eabf4f244.tar.gz
bcm5719-llvm-064bad44d1ad0579da30ed96ca02817eabf4f244.zip
Cleanup and comment-ize the memdep header.
llvm-svn: 40948
-rw-r--r--llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
index 2abb6e62db9..409c10b01d5 100644
--- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -31,23 +31,24 @@ class Instruction;
class MemoryDependenceAnalysis : public FunctionPass {
private:
-
+ // A map from instructions to their dependency, with a boolean
+ // flags for whether this mapping is confirmed or not
typedef DenseMap<Instruction*, std::pair<const Instruction*, bool> >
- depMapType;
-
+ depMapType;
depMapType depGraphLocal;
- typedef DenseMap<const Instruction*,
- SmallPtrSet<Instruction*, 4> > reverseDepMapType;
+ // A reverse mapping form dependencies to the dependees. This is
+ // used when removing instructions to keep the cache coherent.
+ typedef DenseMap<const Instruction*, SmallPtrSet<Instruction*, 4> >
+ reverseDepMapType;
reverseDepMapType reverseDep;
-
- const Instruction* getCallSiteDependency(CallSite C, Instruction* start,
- BasicBlock* block);
- void nonLocalHelper(Instruction* query, BasicBlock* block,
- DenseMap<BasicBlock*, Value*>& resp);
- public:
+ public:
+ // Special marker indicating that the query has no dependency
+ // in the specified block.
static const Instruction* NonLocal;
+
+ // Special marker indicating that the query has no dependency at all
static const Instruction* None;
static char ID; // Class identification, replacement for typeinfo
@@ -79,6 +80,12 @@ class MemoryDependenceAnalysis : public FunctionPass {
/// removeInstruction - Remove an instruction from the dependence analysis,
/// updating the dependence of instructions that previously depended on it.
void removeInstruction(Instruction* rem);
+
+ private:
+ const Instruction* getCallSiteDependency(CallSite C, Instruction* start,
+ BasicBlock* block);
+ void nonLocalHelper(Instruction* query, BasicBlock* block,
+ DenseMap<BasicBlock*, Value*>& resp);
};
} // End llvm namespace
OpenPOWER on IntegriCloud