summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Analysis/DependenceInfo.cpp4
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp
index fc8c98ed991..aa5eadcbac3 100644
--- a/polly/lib/Analysis/DependenceInfo.cpp
+++ b/polly/lib/Analysis/DependenceInfo.cpp
@@ -830,8 +830,10 @@ const Dependences &DependenceInfoWrapperPass::recomputeDependences(
bool DependenceInfoWrapperPass::runOnFunction(Function &F) {
auto &SI = getAnalysis<ScopInfoWrapperPass>();
- for (auto &It : SI)
+ for (auto &It : SI) {
+ assert(It.second && "Invalid SCoP object!");
recomputeDependences(It.second.get(), Dependences::AL_Access);
+ }
return false;
}
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 04d6cadf2e7..a5693413ca0 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -4273,8 +4273,11 @@ bool ScopInfoWrapperPass::runOnFunction(Function &F) {
continue;
ScopBuilder SB(R, AC, AA, DL, DT, LI, SD, SE);
+ std::unique_ptr<Scop> S = SB.getScop();
+ if (!S)
+ continue;
bool Inserted =
- RegionToScopMap.insert(std::make_pair(R, SB.getScop())).second;
+ RegionToScopMap.insert(std::make_pair(R, std::move(S))).second;
assert(Inserted && "Building Scop for the same region twice!");
(void)Inserted;
}
OpenPOWER on IntegriCloud