diff options
author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-02-11 17:25:09 +0000 |
---|---|---|
committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-02-11 17:25:09 +0000 |
commit | 7ceb040213566037b24951b8196993fe58e25294 (patch) | |
tree | 6f4bb0f45d8da9b4b08db83e676853c84f29bbf2 /polly/lib/CodeGen/IslCodeGeneration.cpp | |
parent | de5b7b180ac147a6aced35ce616c5dcc2f1e5b20 (diff) | |
download | bcm5719-llvm-7ceb040213566037b24951b8196993fe58e25294.tar.gz bcm5719-llvm-7ceb040213566037b24951b8196993fe58e25294.zip |
Add early exits for SCoPs we did not optimize
This allows us to skip ast and code generation if we did not optimize
a SCoP and will not generate parallel or alias annotations. The
initial heuristic to exit is simple but allows improvements later on.
All failing test cases have been modified to disable early exit, thus
to keep their coverage.
Differential Revision: http://reviews.llvm.org/D7254
llvm-svn: 228851
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
-rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 45e8e9d06f6..e2f81dbf344 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -914,8 +914,14 @@ public: } bool runOnScop(Scop &S) { - LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); AI = &getAnalysis<IslAstInfo>(); + + // Check if we created an isl_ast root node, otherwise exit. + isl_ast_node *AstRoot = AI->getAst(); + if (!AstRoot) + return false; + + LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); SE = &getAnalysis<ScalarEvolution>(); DL = &getAnalysis<DataLayoutPass>().getDataLayout(); @@ -937,7 +943,7 @@ public: BasicBlock *StartBlock = executeScopConditionally(S, this, RTC); Builder.SetInsertPoint(StartBlock->begin()); - NodeBuilder.create(AI->getAst()); + NodeBuilder.create(AstRoot); return true; } |