Output to cerr rather than cout so that debug info doesn't mess up assembly generation
llvm-svn: 840
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
index 15b1384..9d49f9c 100644
--- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
@@ -102,7 +102,7 @@
else {
// Do NOTHING as this will be colored as a normal value.
- if (DEBUG_RA) cout << " Int Regr not suggested for method arg\n";
+ if (DEBUG_RA) cerr << " Int Regr not suggested for method arg\n";
}
}
@@ -288,8 +288,8 @@
// must be defined before
if( !LR ) {
if( DEBUG_RA) {
- cout << " ERROR: In call instr, no LR for arg: " ;
- printValue(CallArg); cout << endl;
+ cerr << " ERROR: In call instr, no LR for arg: " ;
+ printValue(CallArg); cerr << endl;
}
assert(0 && "NO LR for call arg");
// continue;
@@ -305,7 +305,7 @@
else if (DEBUG_RA)
// Do NOTHING as this will be colored as a normal value.
- cout << " Regr not suggested for int call arg" << endl;
+ cerr << " Regr not suggested for int call arg" << endl;
}
else if( RegType == FPSingleRegType && (argNo*2 +1)< NumOfFloatArgRegs)
@@ -357,9 +357,9 @@
LiveRange * RetValLR = LRI.getLiveRangeForValue( RetVal );
if( !RetValLR ) {
- cout << "\nNo LR for:";
+ cerr << "\nNo LR for:";
printValue( RetVal );
- cout << endl;
+ cerr << endl;
assert( RetValLR && "ERR:No LR for non-void return value");
//return;
}
@@ -449,8 +449,8 @@
// must be defined before
if( !LR ) {
if( DEBUG_RA) {
- cout << " ERROR: In call instr, no LR for arg: " ;
- printValue(CallArg); cout << endl;
+ cerr << " ERROR: In call instr, no LR for arg: " ;
+ printValue(CallArg); cerr << endl;
}
assert(0 && "NO LR for call arg");
// continue;
@@ -516,9 +516,9 @@
LiveRange *const LR = LRI.getLiveRangeForValue( RetVal );
if( !LR ) {
- cout << "\nNo LR for:";
+ cerr << "\nNo LR for:";
printValue( RetVal );
- cout << endl;
+ cerr << endl;
assert( LR && "No LR for return value of non-void method");
//return;
}
@@ -554,9 +554,9 @@
LiveRange *const LR = LRI.getLiveRangeForValue( RetVal );
if( ! LR ) {
- cout << "\nNo LR for:";
+ cerr << "\nNo LR for:";
printValue( RetVal );
- cout << endl;
+ cerr << endl;
// assert( LR && "No LR for return value of non-void method");
return;
}
@@ -684,7 +684,7 @@
break;
default:
- cout << "Value Type: " << Val->getValueType() << endl;
+ cerr << "Value Type: " << Val->getValueType() << endl;
assert(0 && "Unknown val type - Only constants/globals/labels are valid");
}
@@ -736,33 +736,26 @@
unsigned RegClassID = (LR->getRegClass())->getID();
- cout << " *Node " << (LR->getUserIGNode())->getIndex();
+ cerr << " *Node " << (LR->getUserIGNode())->getIndex();
if( ! LR->hasColor() ) {
- cout << " - could not find a color" << endl;
+ cerr << " - could not find a color" << endl;
return;
}
// if a color is found
- cout << " colored with color "<< LR->getColor();
+ cerr << " colored with color "<< LR->getColor();
if( RegClassID == IntRegClassID ) {
- cout<< " [" << SparcIntRegOrder::getRegName(LR->getColor()) ;
- cout << "]" << endl;
+ cerr<< " [" << SparcIntRegOrder::getRegName(LR->getColor()) ;
+ cerr << "]" << endl;
}
else if ( RegClassID == FloatRegClassID) {
- cout << "[" << SparcFloatRegOrder::getRegName(LR->getColor());
+ cerr << "[" << SparcFloatRegOrder::getRegName(LR->getColor());
if( LR->getTypeID() == Type::DoubleTyID )
- cout << "+" << SparcFloatRegOrder::getRegName(LR->getColor()+1);
- cout << "]" << endl;
+ cerr << "+" << SparcFloatRegOrder::getRegName(LR->getColor()+1);
+ cerr << "]" << endl;
}
-
-
}
-
-
-
-
-