Skip to content

Commit 55cfb1f

Browse files
committed
[Polly] Fix build after IRBuilder changes
Simply dropping the createPollyIRBuilder() function here, because it doesn't do much. Also directly initialize Expander in ScopExpander instead of going through the copy-constructor.
1 parent 449a135 commit 55cfb1f

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

polly/include/polly/CodeGen/IRBuilder.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,5 @@ class IRInserter : protected llvm::IRBuilderDefaultInserter {
155155
// matches for certain names.
156156
typedef llvm::IRBuilder<llvm::ConstantFolder, IRInserter> PollyIRBuilder;
157157

158-
/// Return an IR builder pointed before the @p BB terminator.
159-
static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB,
160-
ScopAnnotator &LA) {
161-
PollyIRBuilder Builder(BB->getContext(), llvm::ConstantFolder(),
162-
polly::IRInserter(LA));
163-
Builder.SetInsertPoint(BB->getTerminator());
164-
return Builder;
165-
}
166158
} // namespace polly
167159
#endif

polly/lib/CodeGen/CodeGeneration.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ static bool CodeGen(Scop &S, IslAstInfo &AI, LoopInfo &LI, DominatorTree &DT,
207207
assert(R->isSimple());
208208
BasicBlock *EnteringBB = S.getEnteringBlock();
209209
assert(EnteringBB);
210-
PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator);
210+
PollyIRBuilder Builder(EnteringBB->getContext(), ConstantFolder(),
211+
IRInserter(Annotator));
212+
Builder.SetInsertPoint(EnteringBB->getTerminator());
211213

212214
// Only build the run-time condition and parameters _after_ having
213215
// introduced the conditional branch. This is important as the conditional

polly/lib/CodeGen/PPCGCodeGeneration.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,9 @@ class PPCGCodeGeneration : public ScopPass {
34523452

34533453
BasicBlock *EnteringBB = R->getEnteringBlock();
34543454

3455-
PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator);
3455+
PollyIRBuilder Builder(EnteringBB->getContext(), ConstantFolder(),
3456+
IRInserter(Annotator));
3457+
Builder.SetInsertPoint(EnteringBB->getTerminator());
34563458

34573459
// Only build the run-time condition and parameters _after_ having
34583460
// introduced the conditional branch. This is important as the conditional

polly/lib/Support/ScopHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ struct ScopExpander : SCEVVisitor<ScopExpander, const SCEV *> {
243243
explicit ScopExpander(const Region &R, ScalarEvolution &SE,
244244
const DataLayout &DL, const char *Name, ValueMapT *VMap,
245245
BasicBlock *RTCBB)
246-
: Expander(SCEVExpander(SE, DL, Name)), SE(SE), Name(Name), R(R),
246+
: Expander(SE, DL, Name), SE(SE), Name(Name), R(R),
247247
VMap(VMap), RTCBB(RTCBB) {}
248248

249249
Value *expandCodeFor(const SCEV *E, Type *Ty, Instruction *I) {

0 commit comments

Comments
 (0)