summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-13 02:39:05 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-10-13 02:39:05 +0000
commit5b4c837c588f5aeff9f10af5a79b5377fd39ed09 (patch)
tree40619c9140a14d7b47b9c2ae3eabbb6cfd4654c3 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent19e291aac04f3fcaf3de55763e496b187158c938 (diff)
downloadbcm5719-llvm-5b4c837c588f5aeff9f10af5a79b5377fd39ed09.tar.gz
bcm5719-llvm-5b4c837c588f5aeff9f10af5a79b5377fd39ed09.zip
TransformUtils: Remove implicit ilist iterator conversions, NFC
Continuing the work from last week to remove implicit ilist iterator conversions. First related commit was probably r249767, with some more motivation in r249925. This edition gets LLVMTransformUtils compiling without the implicit conversions. No functional change intended. llvm-svn: 250142
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index eaef32ce2cc..8fecc341d7b 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -206,9 +206,9 @@ static void CloneLoopBlocks(Loop *L, Value *NewIter, const bool UnrollProlog,
// Change the incoming values to the ones defined in the preheader or
// cloned loop.
for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
- PHINode *NewPHI = cast<PHINode>(VMap[I]);
+ PHINode *NewPHI = cast<PHINode>(VMap[&*I]);
if (UnrollProlog) {
- VMap[I] = NewPHI->getIncomingValueForBlock(Preheader);
+ VMap[&*I] = NewPHI->getIncomingValueForBlock(Preheader);
cast<BasicBlock>(VMap[Header])->getInstList().erase(NewPHI);
} else {
unsigned idx = NewPHI->getBasicBlockIndex(Preheader);
@@ -398,8 +398,8 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count,
VMap, LI);
// Insert the cloned blocks into function just before the original loop
- F->getBasicBlockList().splice(PEnd, F->getBasicBlockList(), NewBlocks[0],
- F->end());
+ F->getBasicBlockList().splice(PEnd->getIterator(), F->getBasicBlockList(),
+ NewBlocks[0]->getIterator(), F->end());
// Rewrite the cloned instruction operands to use the values
// created when the clone is created.
@@ -407,7 +407,7 @@ bool llvm::UnrollRuntimeLoopProlog(Loop *L, unsigned Count,
for (BasicBlock::iterator I = NewBlocks[i]->begin(),
E = NewBlocks[i]->end();
I != E; ++I) {
- RemapInstruction(I, VMap,
+ RemapInstruction(&*I, VMap,
RF_NoModuleLevelChanges | RF_IgnoreMissingEntries);
}
}
OpenPOWER on IntegriCloud