[llvm-commits] [llvm] r137642 - /llvm/trunk/lib/Transforms/Utils/Local.cpp
Duncan Sands
baldrick at free.fr
Mon Aug 15 23:44:50 PDT 2011
Hi Bill,
> The "landingpad" instruction will never be "trivially" dead.
since mayHaveSideEffects() should return true for a landingpad instruction,
this shouldn't be needed: isInstructionTriviallyDead should already return
false.
Ciao, Duncan.
>
> Modified:
> llvm/trunk/lib/Transforms/Utils/Local.cpp
>
> Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=137642&r1=137641&r2=137642&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/Local.cpp Mon Aug 15 15:10:51 2011
> @@ -226,6 +226,10 @@
> bool llvm::isInstructionTriviallyDead(Instruction *I) {
> if (!I->use_empty() || isa<TerminatorInst>(I)) return false;
>
> + // We don't want the landingpad instruction removed by anything this general.
> + if (isa<LandingPadInst>(I))
> + return false;
> +
> // We don't want debug info removed by anything this general, unless
> // debug info is empty.
> if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I)) {
>
>
> _______________________________________________
> 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