[llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Mar 7 19:23:45 PST 2004
Changes in directory llvm/lib/Transforms/IPO:
ArgumentPromotion.cpp updated: 1.1 -> 1.2
---
Log message:
Fix a minor bug and turn debug output into, well, debug output.
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.1 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.2
--- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.1 Sun Mar 7 15:29:54 2004
+++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Sun Mar 7 15:54:50 2004
@@ -93,7 +93,7 @@
// See if we can transform all users to use the function directly.
while (!CPR->use_empty()) {
User *TheUser = CPR->use_back();
- if (!isa<Constant>(TheUser)) {
+ if (!isa<Constant>(TheUser) && !isa<GlobalVariable>(TheUser)) {
Changed = true;
TheUser->replaceUsesOfWith(CPR, I);
} else {
@@ -312,7 +312,7 @@
// Otherwise, if we promoted this argument, then all users are load
// instructions, and all loads should be using the new argument that we
// added.
- /*DEBUG*/(std::cerr << "*** Promoted argument '" << I->getName()
+ DEBUG(std::cerr << "*** Promoted argument '" << I->getName()
<< "' of function '" << F->getName() << "'\n");
I2->setName(I->getName()+".val");
while (!I->use_empty()) {
More information about the llvm-commits
mailing list