polly/ADT: Remove implicit ilist iterator conversions, NFC
Remove all the implicit ilist iterator conversions from polly, in
preparation for making them illegal in ADT. There was one oddity I came
across: at line 95 of lib/CodeGen/LoopGenerators.cpp, there was a
post-increment `Builder.GetInsertPoint()++`.
Since it was a no-op, I removed it, but I admit I wonder if it might be
a bug (both before and after this change)? Perhaps it should be a
pre-increment?
llvm-svn: 252357
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp
index 74f19a8..195e11d 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -92,7 +92,7 @@
Annotator->pushLoop(NewLoop, Parallel);
// ExitBB
- ExitBB = SplitBlock(BeforeBB, Builder.GetInsertPoint()++, &DT, &LI);
+ ExitBB = SplitBlock(BeforeBB, &*Builder.GetInsertPoint(), &DT, &LI);
ExitBB->setName("polly.loop_exit");
// BeforeBB
@@ -153,7 +153,7 @@
BasicBlock::iterator BeforeLoop = Builder.GetInsertPoint();
Value *IV = createSubFn(Stride, Struct, UsedValues, Map, &SubFn);
*LoopBody = Builder.GetInsertPoint();
- Builder.SetInsertPoint(BeforeLoop);
+ Builder.SetInsertPoint(&*BeforeLoop);
Value *SubFnParam = Builder.CreateBitCast(Struct, Builder.getInt8PtrTy(),
"polly.par.userContext");
@@ -287,7 +287,7 @@
// in the entry block of the function and use annotations to denote the actual
// live span (similar to clang).
BasicBlock &EntryBB = Builder.GetInsertBlock()->getParent()->getEntryBlock();
- Instruction *IP = EntryBB.getFirstInsertionPt();
+ Instruction *IP = &*EntryBB.getFirstInsertionPt();
StructType *Ty = StructType::get(Builder.getContext(), Members);
AllocaInst *Struct = new AllocaInst(Ty, 0, "polly.par.userContext", IP);
@@ -340,8 +340,8 @@
Builder.SetInsertPoint(HeaderBB);
LBPtr = Builder.CreateAlloca(LongType, 0, "polly.par.LBPtr");
UBPtr = Builder.CreateAlloca(LongType, 0, "polly.par.UBPtr");
- UserContext = Builder.CreateBitCast(SubFn->arg_begin(), StructData->getType(),
- "polly.par.userContext");
+ UserContext = Builder.CreateBitCast(
+ &*SubFn->arg_begin(), StructData->getType(), "polly.par.userContext");
extractValuesFromStruct(Data, StructData->getAllocatedType(), UserContext,
Map);
@@ -365,7 +365,7 @@
"polly.par.UBAdjusted");
Builder.CreateBr(CheckNextBB);
- Builder.SetInsertPoint(--Builder.GetInsertPoint());
+ Builder.SetInsertPoint(&*--Builder.GetInsertPoint());
IV = createLoop(LB, UB, Stride, Builder, P, LI, DT, AfterBB,
ICmpInst::ICMP_SLE, nullptr, true, /* UseGuard */ false);
@@ -376,7 +376,7 @@
createCallCleanupThread();
Builder.CreateRetVoid();
- Builder.SetInsertPoint(LoopBody);
+ Builder.SetInsertPoint(&*LoopBody);
*SubFnPtr = SubFn;
return IV;