diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-07 21:54:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-07 21:54:50 +0000 |
commit | 7e6f5090afbb5c05c8f73c836d56aadb16425bb0 (patch) | |
tree | 1e41a97a7b52ba4c9b5aa74a029959a5f72e2b49 /lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | f0b607027254989f47ebb75a28d1a6f2cc6b0762 (diff) |
Fix a minor bug and turn debug output into, well, debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 2745af893b..639c518037 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -93,7 +93,7 @@ bool ArgPromotion::run(Module &M) { // 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 @@ void ArgPromotion::DoPromotion(Function *F, std::vector<Argument*> &Args2Prom) { // 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()) { |