[llvm-commits] [llvm] r137642 - /llvm/trunk/lib/Transforms/Utils/Local.cpp
Bill Wendling
isanbard at gmail.com
Mon Aug 15 13:10:51 PDT 2011
Author: void
Date: Mon Aug 15 15:10:51 2011
New Revision: 137642
URL: http://llvm.org/viewvc/llvm-project?rev=137642&view=rev
Log:
The "landingpad" instruction will never be "trivially" dead.
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)) {
More information about the llvm-commits
mailing list