diff options
author | John Brawn <john.brawn@arm.com> | 2018-07-31 14:19:29 +0000 |
---|---|---|
committer | John Brawn <john.brawn@arm.com> | 2018-07-31 14:19:29 +0000 |
commit | 9e1f67df4fcccbd41b83265586a103f299d0bcae (patch) | |
tree | 10dc033a602679f4971cf693d6d37777f1616304 /include | |
parent | f241788fa53efc925312f5eb1b2630f76675e2f5 (diff) |
[MemDep] Use PhiValuesAnalysis to improve alias analysis results
This is being done in order to make GVN able to better optimize certain inputs.
MemDep doesn't use PhiValues directly, but does need to notifiy it when things
get invalidated.
Differential Revision: https://reviews.llvm.org/D48489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index 1c6ec98dfed..1c40cffc7f6 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -44,6 +44,7 @@ class Instruction; class LoadInst; class PHITransAddr; class TargetLibraryInfo; +class PhiValues; class Value; /// A memory dependence query can return one of three different answers. @@ -360,13 +361,14 @@ private: AssumptionCache &AC; const TargetLibraryInfo &TLI; DominatorTree &DT; + PhiValues &PV; PredIteratorCache PredCache; public: MemoryDependenceResults(AliasAnalysis &AA, AssumptionCache &AC, const TargetLibraryInfo &TLI, - DominatorTree &DT) - : AA(AA), AC(AC), TLI(TLI), DT(DT) {} + DominatorTree &DT, PhiValues &PV) + : AA(AA), AC(AC), TLI(TLI), DT(DT), PV(PV) {} /// Handle invalidation in the new PM. bool invalidate(Function &F, const PreservedAnalyses &PA, |