diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-15 21:14:31 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-15 21:14:31 +0000 |
commit | 9d6070f161d89376c7c834950f518e25e34d7ce8 (patch) | |
tree | 5e19b166cd4a7abe7849411136fd44f51ce9fe71 /lib/Transforms/InstCombine/InstructionCombining.cpp | |
parent | 0455bb89cde2c1153c6ed1a5bf5b380ed6d43675 (diff) | |
download | external_llvm-9d6070f161d89376c7c834950f518e25e34d7ce8.zip external_llvm-9d6070f161d89376c7c834950f518e25e34d7ce8.tar.gz external_llvm-9d6070f161d89376c7c834950f518e25e34d7ce8.tar.bz2 |
Duncan pointed out that the LandingPadInst might read memory. (It might also
write to memory.) Marking it as such makes some checks for immobility go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstructionCombining.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 32c55a3..41d542a 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1417,9 +1417,8 @@ Instruction *InstCombiner::visitExtractValueInst(ExtractValueInst &EV) { static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) { assert(I->hasOneUse() && "Invariants didn't hold!"); - // Cannot move control-flow-involving, volatile loads, vaarg, landingpad, etc. - if (isa<PHINode>(I) || isa<LandingPadInst>(I) || I->mayHaveSideEffects() || - isa<TerminatorInst>(I)) + // Cannot move control-flow-involving, volatile loads, vaarg, etc. + if (isa<PHINode>(I) || I->mayHaveSideEffects() || isa<TerminatorInst>(I)) return false; // Do not sink alloca instructions out of the entry block. |