aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/MemoryDependenceAnalysis.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-27 22:05:15 +0000
committerChris Lattner <sabre@nondot.org>2009-11-27 22:05:15 +0000
commit6f7b210b2577fbc9247a9fc5223655390008ae89 (patch)
tree320490861ed912a416899b0c25dd9c01b7233245 /include/llvm/Analysis/MemoryDependenceAnalysis.h
parent5141421e38a6b4113177ef30cfd52de58ec9dced (diff)
downloadexternal_llvm-6f7b210b2577fbc9247a9fc5223655390008ae89.zip
external_llvm-6f7b210b2577fbc9247a9fc5223655390008ae89.tar.gz
external_llvm-6f7b210b2577fbc9247a9fc5223655390008ae89.tar.bz2
Rework InsertPHITranslatedPointer to handle the recursive case, this
fixes PR5630 and sets the stage for the next phase of goodness (testcase pending). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/MemoryDependenceAnalysis.h')
-rw-r--r--include/llvm/Analysis/MemoryDependenceAnalysis.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h
index 042c7fc..390ca76 100644
--- a/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -30,6 +30,7 @@ namespace llvm {
class TargetData;
class MemoryDependenceAnalysis;
class PredIteratorCache;
+ class DominatorTree;
/// MemDepResult - A memory dependence query can return one of three different
/// answers, described below.
@@ -244,19 +245,27 @@ namespace llvm {
BasicBlock *BB,
SmallVectorImpl<NonLocalDepEntry> &Result);
- /// PHITranslatePointer - Find an available version of the specified value
+ /// GetPHITranslatedValue - Find an available version of the specified value
/// PHI translated across the specified edge. If MemDep isn't able to
/// satisfy this request, it returns null.
- Value *PHITranslatePointer(Value *V,
- BasicBlock *CurBB, BasicBlock *PredBB,
- const TargetData *TD) const;
+ Value *GetPHITranslatedValue(Value *V,
+ BasicBlock *CurBB, BasicBlock *PredBB,
+ const TargetData *TD) const;
+ /// GetAvailablePHITranslatedValue - Return the value computed by
+ /// PHITranslatePointer if it dominates PredBB, otherwise return null.
+ Value *GetAvailablePHITranslatedValue(Value *V,
+ BasicBlock *CurBB, BasicBlock *PredBB,
+ const TargetData *TD,
+ const DominatorTree &DT) const;
+
/// InsertPHITranslatedPointer - Insert a computation of the PHI translated
/// version of 'V' for the edge PredBB->CurBB into the end of the PredBB
/// block.
Value *InsertPHITranslatedPointer(Value *V,
BasicBlock *CurBB, BasicBlock *PredBB,
- const TargetData *TD) const;
+ const TargetData *TD,
+ const DominatorTree &DT) const;
/// removeInstruction - Remove an instruction from the dependence analysis,
/// updating the dependence of instructions that previously depended on it.