[llvm-commits] CVS: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 10 23:48:07 PST 2004
Changes in directory llvm/lib/Transforms/IPO:
IPConstantPropagation.cpp updated: 1.12 -> 1.13
---
Log message:
Actually, leave the check in. This prevents us from counting dead arguments
as IPCP opportunities.
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
diff -u llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.12 llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.13
--- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.12 Thu Nov 11 01:46:29 2004
+++ llvm/lib/Transforms/IPO/IPConstantPropagation.cpp Thu Nov 11 01:47:54 2004
@@ -113,7 +113,7 @@
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);
More information about the llvm-commits
mailing list