summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-05 01:43:49 +0000
committerChris Lattner <sabre@nondot.org>2002-02-05 01:43:49 +0000
commit30e8fb69c5b963125cfcae7eb59a46f8bec37edb (patch)
treeb0e4c12a7951510e398339609b437debdac46d31 /llvm/lib/Target/Sparc
parent91c4a419e23cafac360a4f025f04c94c36187ac8 (diff)
downloadbcm5719-llvm-30e8fb69c5b963125cfcae7eb59a46f8bec37edb.tar.gz
bcm5719-llvm-30e8fb69c5b963125cfcae7eb59a46f8bec37edb.zip
* Code Cleanups
* Introduce RAV to allow stream I/O instead of using printValue llvm-svn: 1710
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/SparcRegInfo.cpp50
1 files changed, 17 insertions, 33 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
index f35af9e573a..6e2c1b0cd67 100644
--- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
@@ -563,11 +563,8 @@ void UltraSparcRegInfo::suggestRegs4CallArgs(const MachineInstr *CallMI,
// not possible to have a null LR since all args (even consts)
// must be defined before
- if( !LR ) {
- if( DEBUG_RA) {
- cerr << " ERROR: In call instr, no LR for arg: " ;
- printValue(CallArg); cerr << "\n";
- }
+ if (!LR) {
+ cerr << " ERROR: In call instr, no LR for arg: " << RAV(CallArg) << "\n";
assert(0 && "NO LR for call arg");
}
@@ -624,16 +621,12 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *CallMI,
const Value *RetVal = getCallInstRetVal( CallMI );
- if( RetVal ) {
-
- LiveRange * RetValLR = LRI.getLiveRangeForValue( RetVal );
+ if (RetVal) {
+ LiveRange *RetValLR = LRI.getLiveRangeForValue( RetVal );
- if( !RetValLR ) {
- cerr << "\nNo LR for:";
- printValue( RetVal );
- cerr << "\n";
- assert( RetValLR && "ERR:No LR for non-void return value");
- //return;
+ if (!RetValLR) {
+ cerr << "\nNo LR for:" << RAV(RetVal) << "\n";
+ assert(0 && "ERR:No LR for non-void return value");
}
unsigned RegClassID = (RetValLR->getRegClass())->getID();
@@ -755,13 +748,9 @@ void UltraSparcRegInfo::colorCallArgs(const MachineInstr *CallMI,
// not possible to have a null LR since all args (even consts)
// must be defined before
- if( !LR ) {
- if( DEBUG_RA) {
- cerr << " ERROR: In call instr, no LR for arg: " ;
- printValue(CallArg); cerr << "\n";
- }
+ if (!LR) {
+ cerr << " ERROR: In call instr, no LR for arg: " << RAV(CallArg) << "\n";
assert(0 && "NO LR for call arg");
- // continue;
}
@@ -942,13 +931,10 @@ void UltraSparcRegInfo::suggestReg4RetValue(const MachineInstr *RetMI,
LiveRange *const LR = LRI.getLiveRangeForValue( RetVal );
- if( !LR ) {
- cerr << "\nNo LR for:";
- printValue( RetVal );
- cerr << "\n";
- assert( LR && "No LR for return value of non-void method");
- //return;
- }
+ if (!LR) {
+ cerr << "\nNo LR for:" << RAV(RetVal) << "\n";
+ assert(0 && "No LR for return value of non-void method");
+ }
unsigned RegClassID = (LR->getRegClass())->getID();
@@ -981,12 +967,10 @@ void UltraSparcRegInfo::colorRetValue(const MachineInstr *RetMI,
LiveRange *LR = LRI.getLiveRangeForValue(RetVal);
- if( ! LR ) {
- cerr << "\nNo LR for:";
- printValue( RetVal );
- cerr << "\n";
- // assert( LR && "No LR for return value of non-void method");
- return;
+ if (!LR) {
+ cerr << "\nNo LR for:" << RAV(RetVal) << "\n";
+ // assert( LR && "No LR for return value of non-void method");
+ return;
}
unsigned RegClassID = getRegClassIDOfValue(RetVal);
OpenPOWER on IntegriCloud