diff options
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 4 | ||||
-rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 3 | ||||
-rw-r--r-- | polly/lib/CodeGen/Utils.cpp | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 5569378982f..41ee788402f 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -175,8 +175,10 @@ static bool CodeGen(Scop &S, IslAstInfo &AI, LoopInfo &LI, DominatorTree &DT, // the SCEVExpander may introduce while code generating the parameters and // which may introduce scalar dependences that prevent us from correctly // code generating this scop. - BasicBlock *StartBlock = + BBPair StartExitBlocks = executeScopConditionally(S, Builder.getTrue(), DT, RI, LI); + BasicBlock *StartBlock = std::get<0>(StartExitBlocks); + removeLifetimeMarkers(R); auto *SplitBlock = StartBlock->getSinglePredecessor(); diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index cff500e3bd9..02b40161503 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -2663,8 +2663,9 @@ public: // the SCEVExpander may introduce while code generating the parameters and // which may introduce scalar dependences that prevent us from correctly // code generating this scop. - BasicBlock *StartBlock = + BBPair StartExitBlocks = executeScopConditionally(*S, Builder.getTrue(), *DT, *RI, *LI); + BasicBlock *StartBlock = std::get<0>(StartExitBlocks); GPUNodeBuilder NodeBuilder(Builder, Annotator, *DL, *LI, *SE, *DT, *S, StartBlock, Prog, Runtime, Architecture); diff --git a/polly/lib/CodeGen/Utils.cpp b/polly/lib/CodeGen/Utils.cpp index 31ec4fcab4b..9c2cfd03aec 100644 --- a/polly/lib/CodeGen/Utils.cpp +++ b/polly/lib/CodeGen/Utils.cpp @@ -76,9 +76,9 @@ static BasicBlock *splitEdge(BasicBlock *Prev, BasicBlock *Succ, return MiddleBlock; } -BasicBlock *polly::executeScopConditionally(Scop &S, Value *RTC, - DominatorTree &DT, RegionInfo &RI, - LoopInfo &LI) { +polly::BBPair polly::executeScopConditionally(Scop &S, Value *RTC, + DominatorTree &DT, RegionInfo &RI, + LoopInfo &LI) { Region &R = S.getRegion(); PollyIRBuilder Builder(S.getEntry()); @@ -216,5 +216,5 @@ BasicBlock *polly::executeScopConditionally(Scop &S, Value *RTC, // ExitBB // // / \ // - return StartBlock; + return std::make_pair(StartBlock, ExitingBlock); } |