summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/ScopDetection.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2015-10-25 10:55:35 +0000
committerTobias Grosser <tobias@grosser.es>2015-10-25 10:55:35 +0000
commit907090c37cacfc45306aa6c7222bd4d809aec833 (patch)
tree209ce1fbadef88e918debb95ff19d44fc8360137 /polly/lib/Analysis/ScopDetection.cpp
parent51174cca3084896bd5f63814f6e5041e6f2684bf (diff)
downloadbcm5719-llvm-907090c37cacfc45306aa6c7222bd4d809aec833.tar.gz
bcm5719-llvm-907090c37cacfc45306aa6c7222bd4d809aec833.zip
ScopDetection: Update DetectionContextMap accordingly
When verifying if a scop is still valid we rerun all analysis, but did not update DetectionContextMap. This change ensures that information, e.g. about non-affine regions, is correctly updated llvm-svn: 251227
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index f0b5df1816a..79461c8583c 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -254,7 +254,11 @@ bool ScopDetection::isMaxRegionInScop(const Region &R, bool Verify) const {
return false;
if (Verify) {
- DetectionContext Context(const_cast<Region &>(R), *AA, false /*verifying*/);
+ DetectionContextMap.erase(&R);
+ const auto &It = DetectionContextMap.insert(
+ std::make_pair(&R, DetectionContext(const_cast<Region &>(R), *AA,
+ false /*verifying*/)));
+ DetectionContext &Context = It.first->second;
return isValidRegion(Context);
}
OpenPOWER on IntegriCloud