diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2016-11-02 22:32:23 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2016-11-02 22:32:23 +0000 |
commit | acf80064716710a6546282066f4ddd1eeb911f04 (patch) | |
tree | abc37720dab7f2ce35facea5d57911473d413745 /polly/lib/CodeGen/IslNodeBuilder.cpp | |
parent | 450338a257b6bc75bf8394f35e35b4b9bc25e761 (diff) | |
download | bcm5719-llvm-acf80064716710a6546282066f4ddd1eeb911f04.tar.gz bcm5719-llvm-acf80064716710a6546282066f4ddd1eeb911f04.zip |
[Polly CodeGen] Break critical edge from RTC to original loop.
This makes polly generate a CFG which is closer to what we want
in LLVM IR, with a loop preheader for the original loop. This is
just a cleanup, but it exposes some fragile assumptions.
I'm not completely happy with the changes related to expandCodeFor;
RTCBB->getTerminator() is basically a random insertion point which
happens to work due to the way we generate runtime checks. I'm not
sure what the right answer looks like, though.
Differential Revision: https://reviews.llvm.org/D26053
llvm-svn: 285864
Diffstat (limited to 'polly/lib/CodeGen/IslNodeBuilder.cpp')
-rw-r--r-- | polly/lib/CodeGen/IslNodeBuilder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp index 0869a7fc86b..5c50fbf0e88 100644 --- a/polly/lib/CodeGen/IslNodeBuilder.cpp +++ b/polly/lib/CodeGen/IslNodeBuilder.cpp @@ -1286,7 +1286,8 @@ Value *IslNodeBuilder::generateSCEV(const SCEV *Expr) { "Insert location points after last valid instruction"); Instruction *InsertLocation = &*Builder.GetInsertPoint(); return expandCodeFor(S, SE, DL, "polly", Expr, Expr->getType(), - InsertLocation, &ValueMap); + InsertLocation, &ValueMap, + StartBlock->getSinglePredecessor()); } /// The AST expression we generate to perform the run-time check assumes |