summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopAccessAnalysis.cpp
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2015-05-18 15:37:03 +0000
committerAdam Nemet <anemet@apple.com>2015-05-18 15:37:03 +0000
commitdf3dc5b9cada0b065b17bc8c2e041614f960a263 (patch)
tree1c6243b4ed05a0a675b094d2045cf7a73342e61f /llvm/lib/Analysis/LoopAccessAnalysis.cpp
parentc3384320f28d19f09d8bc8b9a63041a1b3581553 (diff)
downloadbcm5719-llvm-df3dc5b9cada0b065b17bc8c2e041614f960a263.tar.gz
bcm5719-llvm-df3dc5b9cada0b065b17bc8c2e041614f960a263.zip
[LoopAccesses] If shouldRetryWithRuntimeCheck, reset InterestingDependences
When dependence analysis encounters a non-constant distance between memory accesses it aborts the analysis and falls back to run-time checks only. In this case we weren't resetting the array of dependences. llvm-svn: 237574
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 580491ff536..b70de00db04 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -235,7 +235,12 @@ public:
bool isRTCheckNeeded() { return IsRTCheckNeeded; }
bool isDependencyCheckNeeded() { return !CheckDeps.empty(); }
- void resetDepChecks() { CheckDeps.clear(); }
+
+ /// We decided that no dependence analysis would be used. Reset the state.
+ void resetDepChecks(MemoryDepChecker &DepChecker) {
+ CheckDeps.clear();
+ DepChecker.clearInterestingDependences();
+ }
MemAccessInfoSet &getDependenciesToCheck() { return CheckDeps; }
@@ -1161,7 +1166,7 @@ void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) {
NeedRTCheck = true;
// Clear the dependency checks. We assume they are not needed.
- Accesses.resetDepChecks();
+ Accesses.resetDepChecks(DepChecker);
PtrRtCheck.reset();
PtrRtCheck.Need = true;
OpenPOWER on IntegriCloud