[llvm-commits] [llvm] r137629 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Duncan Sands
baldrick at free.fr
Mon Aug 15 11:27:26 PDT 2011
Hi Bill,
> Don't try to sink the landingpad instruction. It's immobile.
this would be taken care of automatically if landing pad instructions were
marked as reading memory (which presumably they do, since otherwise where
do they get the info about which exception was raised etc from?).
Ciao, Duncan.
>
> Modified:
> llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>
> Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=137629&r1=137628&r2=137629&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Mon Aug 15 13:23:40 2011
> @@ -1417,8 +1417,9 @@
> static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) {
> assert(I->hasOneUse()&& "Invariants didn't hold!");
>
> - // Cannot move control-flow-involving, volatile loads, vaarg, etc.
> - if (isa<PHINode>(I) || I->mayHaveSideEffects() || isa<TerminatorInst>(I))
> + // Cannot move control-flow-involving, volatile loads, vaarg, landingpad, etc.
> + if (isa<PHINode>(I) || isa<LandingPadInst>(I) || I->mayHaveSideEffects() ||
> + isa<TerminatorInst>(I))
> return false;
>
> // Do not sink alloca instructions out of the entry block.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list