diff options
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 6 |
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); } |

