[llvm-commits] CVS: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 5 15:54:01 PST 2003


Changes in directory llvm/lib/Transforms/IPO:

DeadArgumentElimination.cpp updated: 1.11 -> 1.12

---
Log message:

Fix the problem with running cleanups in bugpoint:  We were deleting arguments
of intrinsic functions, causing the verifier to fail.


---
Diffs of the changes:  (+4 -1)

Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.11 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.12
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.11	Wed Nov  5 15:43:02 2003
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp	Wed Nov  5 15:53:41 2003
@@ -99,6 +99,8 @@
   struct DAH : public DAE {
     virtual bool ShouldHackArguments() const { return true; }
   };
+  RegisterPass<DAH> Y("deadarghaX0r",
+                      "Dead Argument Hacking (bugpoint usage only)");
 }
 
 /// createDeadArgEliminationPass - This pass removes arguments from functions
@@ -163,7 +165,8 @@
   bool FunctionIntrinsicallyLive = false;
   Liveness RetValLiveness = F.getReturnType() == Type::VoidTy ? Live : Dead;
 
-  if (!F.hasInternalLinkage() && !ShouldHackArguments()) 
+  if (!F.hasInternalLinkage() &&
+      (!ShouldHackArguments() || F.getIntrinsicID()))
     FunctionIntrinsicallyLive = true;
   else 
     for (Value::use_iterator I = F.use_begin(), E = F.use_end(); I != E; ++I) {





More information about the llvm-commits mailing list