diff --git a/polly/include/polly/CodeGen/IRBuilder.h b/polly/include/polly/CodeGen/IRBuilder.h index 8033ffafb7de08..8aeef3856a077f 100644 --- a/polly/include/polly/CodeGen/IRBuilder.h +++ b/polly/include/polly/CodeGen/IRBuilder.h @@ -155,13 +155,5 @@ class IRInserter : protected llvm::IRBuilderDefaultInserter { // matches for certain names. typedef llvm::IRBuilder PollyIRBuilder; -/// Return an IR builder pointed before the @p BB terminator. -static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB, - ScopAnnotator &LA) { - PollyIRBuilder Builder(BB->getContext(), llvm::ConstantFolder(), - polly::IRInserter(LA)); - Builder.SetInsertPoint(BB->getTerminator()); - return Builder; -} } // namespace polly #endif diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 671372d36bf430..01c64ee3c1012d 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -207,7 +207,9 @@ static bool CodeGen(Scop &S, IslAstInfo &AI, LoopInfo &LI, DominatorTree &DT, assert(R->isSimple()); BasicBlock *EnteringBB = S.getEnteringBlock(); assert(EnteringBB); - PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator); + PollyIRBuilder Builder(EnteringBB->getContext(), ConstantFolder(), + IRInserter(Annotator)); + Builder.SetInsertPoint(EnteringBB->getTerminator()); // Only build the run-time condition and parameters _after_ having // introduced the conditional branch. This is important as the conditional diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index db5546906703d7..bd92c7e705c986 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -3452,7 +3452,9 @@ class PPCGCodeGeneration : public ScopPass { BasicBlock *EnteringBB = R->getEnteringBlock(); - PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator); + PollyIRBuilder Builder(EnteringBB->getContext(), ConstantFolder(), + IRInserter(Annotator)); + Builder.SetInsertPoint(EnteringBB->getTerminator()); // Only build the run-time condition and parameters _after_ having // introduced the conditional branch. This is important as the conditional diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp index d2a8f38842407c..0b8d24939298c5 100644 --- a/polly/lib/Support/ScopHelper.cpp +++ b/polly/lib/Support/ScopHelper.cpp @@ -243,7 +243,7 @@ struct ScopExpander : SCEVVisitor { explicit ScopExpander(const Region &R, ScalarEvolution &SE, const DataLayout &DL, const char *Name, ValueMapT *VMap, BasicBlock *RTCBB) - : Expander(SCEVExpander(SE, DL, Name)), SE(SE), Name(Name), R(R), + : Expander(SE, DL, Name), SE(SE), Name(Name), R(R), VMap(VMap), RTCBB(RTCBB) {} Value *expandCodeFor(const SCEV *E, Type *Ty, Instruction *I) {