diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-18 23:42:36 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-18 23:42:36 +0000 |
commit | 2b31c45e8e4e6360c26f8fb3e5ede7216b2acd03 (patch) | |
tree | a5f6ddb053e70265079cc92df1e2066e480cff81 /llvm/lib/Transforms | |
parent | fb4161ae88fd6071bb615a3b69e207ec2fca9f64 (diff) | |
download | bcm5719-llvm-2b31c45e8e4e6360c26f8fb3e5ede7216b2acd03.tar.gz bcm5719-llvm-2b31c45e8e4e6360c26f8fb3e5ede7216b2acd03.zip |
Use 'getFirstInsertionPt' when trying to insert new instructions during LICM.
llvm-svn: 138008
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 79bdf906752..b79bb1300fe 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -466,7 +466,7 @@ void LICM::sink(Instruction &I) { } else { // Move the instruction to the start of the exit block, after any PHI // nodes in it. - I.moveBefore(ExitBlocks[0]->getFirstNonPHI()); + I.moveBefore(ExitBlocks[0]->getFirstInsertionPt()); // This instruction is no longer in the AST for the current loop, because // we just sunk it out of the loop. If we just sunk it into an outer @@ -509,7 +509,7 @@ void LICM::sink(Instruction &I) { continue; // Insert the code after the last PHI node. - BasicBlock::iterator InsertPt = ExitBlock->getFirstNonPHI(); + BasicBlock::iterator InsertPt = ExitBlock->getFirstInsertionPt(); // If this is the first exit block processed, just move the original // instruction, otherwise clone the original instruction and insert @@ -644,7 +644,7 @@ namespace { for (unsigned i = 0, e = LoopExitBlocks.size(); i != e; ++i) { BasicBlock *ExitBlock = LoopExitBlocks[i]; Value *LiveInValue = SSA.GetValueInMiddleOfBlock(ExitBlock); - Instruction *InsertPos = ExitBlock->getFirstNonPHI(); + Instruction *InsertPos = ExitBlock->getFirstInsertionPt(); StoreInst *NewSI = new StoreInst(LiveInValue, SomePtr, InsertPos); NewSI->setAlignment(Alignment); NewSI->setDebugLoc(DL); |