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 | b6e0631a942d83947eec7808e643e17648a08da5 (patch) | |
tree | f96c999f8530ec5105f6c8618d63ea7b610b954e /lib/Transforms | |
parent | b257e219050ca3457c60aa993e97dc19c089b6e2 (diff) | |
download | external_llvm-b6e0631a942d83947eec7808e643e17648a08da5.zip external_llvm-b6e0631a942d83947eec7808e643e17648a08da5.tar.gz external_llvm-b6e0631a942d83947eec7808e643e17648a08da5.tar.bz2 |
Fix the problem with running cleanups in bugpoint: We were deleting arguments
of intrinsic functions, causing the verifier to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 265c626..9003f88 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/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) { |