diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-16 20:45:24 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-16 20:45:24 +0000 |
commit | 8ddfc09e7ac778e6a2215e345b0cd5d1c4fa3b8c (patch) | |
tree | f7376fd39dd4d7572ddec3a648049a3e73b6c75c /llvm/lib/Transforms/InstCombine | |
parent | ee1c2d2437a0918b17bf39b92296cb43c0394eb3 (diff) | |
download | bcm5719-llvm-8ddfc09e7ac778e6a2215e345b0cd5d1c4fa3b8c.tar.gz bcm5719-llvm-8ddfc09e7ac778e6a2215e345b0cd5d1c4fa3b8c.zip |
Use the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>'
check for a LandingPadInst.
llvm-svn: 137745
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index b987340e13f..7446a51a4db 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -600,8 +600,7 @@ bool InstCombiner::SimplifyStoreAtEndOfBlock(StoreInst &SI) { // Advance to a place where it is safe to insert the new store and // insert it. - BBI = DestBB->getFirstNonPHI(); - if (isa<LandingPadInst>(BBI)) ++BBI; + BBI = DestBB->getFirstInsertionPt(); StoreInst *NewSI = new StoreInst(MergedVal, SI.getOperand(1), SI.isVolatile(), SI.getAlignment(), diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index f13733cf05c..47e7dd4c220 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1435,8 +1435,7 @@ static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) { return false; } - BasicBlock::iterator InsertPos = DestBlock->getFirstNonPHI(); - if (isa<LandingPadInst>(InsertPos)) ++InsertPos; // Skip landingpad inst. + BasicBlock::iterator InsertPos = DestBlock->getFirstInsertionPt(); I->moveBefore(InsertPos); ++NumSunkInst; return true; |