summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/CodeGeneration.cpp
diff options
context:
space:
mode:
authorSiddharth Bhat <siddu.druid@gmail.com>2017-07-14 10:00:25 +0000
committerSiddharth Bhat <siddu.druid@gmail.com>2017-07-14 10:00:25 +0000
commit03346c270129145e8d3123cffdbddc3297a1052a (patch)
tree75080680be61bf6da27adf93652ffc78829cbfe1 /polly/lib/CodeGen/CodeGeneration.cpp
parent87a70679831b185cc21f9c9dca07d98ac95b1207 (diff)
downloadbcm5719-llvm-03346c270129145e8d3123cffdbddc3297a1052a.tar.gz
bcm5719-llvm-03346c270129145e8d3123cffdbddc3297a1052a.zip
[PPCGCodeGeneration] Fix runtime check adjustments since they make assumptions about BB layout.
- There is a conditional branch that is used to switch between the old and new versions of the code. - If we detect that the build was unsuccessful, `PPCGCodeGeneration` will change the runtime check to be always set to false. - To actually *reach* this runtime check instruction, `PPCGCodeGeneration` was using assumptions about the layout of the BBs. - However, invariant load hoisting violates this assumption by inserting an extra basic block in the middle. - Fix the assumption on the layout by having `createScopConditionally` return the conditional branch instruction. - Use this reference to set to always-false. llvm-svn: 308010
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 8617e1c0b3d..5e845f1ae33 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -176,7 +176,7 @@ static bool CodeGen(Scop &S, IslAstInfo &AI, LoopInfo &LI, DominatorTree &DT,
// which may introduce scalar dependences that prevent us from correctly
// code generating this scop.
BBPair StartExitBlocks =
- executeScopConditionally(S, Builder.getTrue(), DT, RI, LI);
+ std::get<0>(executeScopConditionally(S, Builder.getTrue(), DT, RI, LI));
BasicBlock *StartBlock = std::get<0>(StartExitBlocks);
BasicBlock *ExitBlock = std::get<1>(StartExitBlocks);
OpenPOWER on IntegriCloud