diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-11 07:47:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-11 07:47:54 +0000 |
commit | d79c7b43f4afeb2bb81128e7acf079ea9912a561 (patch) | |
tree | bad482c25bd459ec276a7988f196b91a213c603c /lib | |
parent | 3e062eacab10938825b92ffdfa5bf3d9cf228c36 (diff) | |
download | external_llvm-d79c7b43f4afeb2bb81128e7acf079ea9912a561.zip external_llvm-d79c7b43f4afeb2bb81128e7acf079ea9912a561.tar.gz external_llvm-d79c7b43f4afeb2bb81128e7acf079ea9912a561.tar.bz2 |
Actually, leave the check in. This prevents us from counting dead arguments
as IPCP opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 9daeb4f..bf2e3d7 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -113,7 +113,7 @@ bool IPCP::processFunction(Function &F) { bool MadeChange = false; for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI) // Do we have a constant argument!? - if (!ArgumentConstants[i].second) { + if (!ArgumentConstants[i].second && !AI->use_empty()) { Value *V = ArgumentConstants[i].first; if (V == 0) V = UndefValue::get(AI->getType()); AI->replaceAllUsesWith(V); |