diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-07-25 12:40:59 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-07-25 12:40:59 +0000 |
| commit | 3b7ac0a691196cb4a242033a66dc42b3fb6eb499 (patch) | |
| tree | 0835dfb90c001db1a41ad4371b43cfb3b0f2dc6c /polly/lib | |
| parent | 1823d6c8af4168c0a89c5bde9fa24166c3085e8a (diff) | |
| download | bcm5719-llvm-3b7ac0a691196cb4a242033a66dc42b3fb6eb499.tar.gz bcm5719-llvm-3b7ac0a691196cb4a242033a66dc42b3fb6eb499.zip | |
[GSoC] Do not process SCoPs with infeasible runtime context
Do not process SCoPs with infeasible runtime context in the new
ScopInfoWrapperPass. Do not compute dependences for such SCoPs in the new
DependenceInfoWrapperPass.
Patch by Utpal Bora <cs14mtech11017@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D22402
llvm-svn: 276631
Diffstat (limited to 'polly/lib')
| -rw-r--r-- | polly/lib/Analysis/DependenceInfo.cpp | 4 | ||||
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 5 |
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; } |

