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/CodeGeneration.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/CodeGeneration.cpp')
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 68b1d830e47..9fcd6dfba37 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -133,8 +133,6 @@ public: assert(EnteringBB); PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator); - IslNodeBuilder NodeBuilder(Builder, Annotator, this, *DL, *LI, *SE, *DT, S); - // Only build the run-time condition and parameters _after_ having // introduced the conditional branch. This is important as the conditional // branch will guard the original scop from new induction variables that @@ -145,6 +143,9 @@ public: executeScopConditionally(S, this, Builder.getTrue()); auto *SplitBlock = StartBlock->getSinglePredecessor(); + IslNodeBuilder NodeBuilder(Builder, Annotator, this, *DL, *LI, *SE, *DT, S, + StartBlock); + // First generate code for the hoisted invariant loads and transitively the // parameters they reference. Afterwards, for the remaining parameters that // might reference the hoisted loads. Finally, build the runtime check |