diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-05 21:53:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-05 21:53:41 +0000 |
commit | 4e1b467594bda512ad234df904cafe46580bc125 (patch) | |
tree | 76df5d7a44ce357be312c1a76e8a2430795d2a6a /llvm/lib | |
parent | a616c55ba9c6fb459ae4ffc08b90fc76f0065c20 (diff) | |
download | bcm5719-llvm-4e1b467594bda512ad234df904cafe46580bc125.tar.gz bcm5719-llvm-4e1b467594bda512ad234df904cafe46580bc125.zip |
Fix the problem with running cleanups in bugpoint: We were deleting arguments
of intrinsic functions, causing the verifier to fail.
llvm-svn: 9745
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp index 265c6267602..9003f8877f7 100644 --- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -99,6 +99,8 @@ namespace { 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 @@ void DAE::SurveyFunction(Function &F) { 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) { |