mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
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
This commit is contained in:
parent
f0b6070272
commit
7e6f5090af
@ -93,7 +93,7 @@ bool ArgPromotion::run(Module &M) {
|
|||||||
// See if we can transform all users to use the function directly.
|
// See if we can transform all users to use the function directly.
|
||||||
while (!CPR->use_empty()) {
|
while (!CPR->use_empty()) {
|
||||||
User *TheUser = CPR->use_back();
|
User *TheUser = CPR->use_back();
|
||||||
if (!isa<Constant>(TheUser)) {
|
if (!isa<Constant>(TheUser) && !isa<GlobalVariable>(TheUser)) {
|
||||||
Changed = true;
|
Changed = true;
|
||||||
TheUser->replaceUsesOfWith(CPR, I);
|
TheUser->replaceUsesOfWith(CPR, I);
|
||||||
} else {
|
} 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
|
// Otherwise, if we promoted this argument, then all users are load
|
||||||
// instructions, and all loads should be using the new argument that we
|
// instructions, and all loads should be using the new argument that we
|
||||||
// added.
|
// added.
|
||||||
/*DEBUG*/(std::cerr << "*** Promoted argument '" << I->getName()
|
DEBUG(std::cerr << "*** Promoted argument '" << I->getName()
|
||||||
<< "' of function '" << F->getName() << "'\n");
|
<< "' of function '" << F->getName() << "'\n");
|
||||||
I2->setName(I->getName()+".val");
|
I2->setName(I->getName()+".val");
|
||||||
while (!I->use_empty()) {
|
while (!I->use_empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user