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 | 26665de4f7ab03d651f626bddb925724a2816a18 (patch) | |
tree | abaffc642766aaff2a4ae1f9ef261a9dc599a8a1 /lib/Transforms | |
parent | 5ac8547a412d1b42c5ff333fc0becd56b98b74cb (diff) | |
download | external_llvm-26665de4f7ab03d651f626bddb925724a2816a18.zip external_llvm-26665de4f7ab03d651f626bddb925724a2816a18.tar.gz external_llvm-26665de4f7ab03d651f626bddb925724a2816a18.tar.bz2 |
Use 'getFirstInsertionPt' when trying to insert new instructions during LICM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 79bdf90..b79bb13 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/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); |