[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adam Nemet
2015-05-18 15:37:03 +00:00
parent 2f2bbe4ced
commit a4c8c9292b
3 changed files with 66 additions and 2 deletions

View File

@@ -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;