[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Oct 17 16:45:17 PDT 2004



Changes in directory llvm/lib/Transforms/Scalar:

ADCE.cpp updated: 1.82 -> 1.83
---
Log message:

Getting ADCE to interact well with unreachable instructions seems like a nontrivial
exercise that I'm not interested in tackling right now.  Just punt and treat them
like unwind's.

This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll


---
Diffs of the changes:  (+3 -2)

Index: llvm/lib/Transforms/Scalar/ADCE.cpp
diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.82 llvm/lib/Transforms/Scalar/ADCE.cpp:1.83
--- llvm/lib/Transforms/Scalar/ADCE.cpp:1.82	Sat Oct 16 13:09:25 2004
+++ llvm/lib/Transforms/Scalar/ADCE.cpp	Sun Oct 17 18:45:06 2004
@@ -233,8 +233,9 @@
           markInstructionLive(I);
         }
       } else if (I->mayWriteToMemory() || isa<ReturnInst>(I) ||
-                 isa<UnwindInst>(I)) {
-        // Unreachable instructions are not marked intrinsically live here.
+                 isa<UnwindInst>(I) || isa<UnreachableInst>(I)) {
+        // FIXME: Unreachable instructions should not be marked intrinsically
+        // live here.
 	markInstructionLive(I);
       } else if (isInstructionTriviallyDead(I)) {
         // Remove the instruction from it's basic block...






More information about the llvm-commits mailing list