diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-05 03:52:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-05 03:52:29 +0000 |
commit | d30f989cdaf8e996c3c0f0497b50bff4bb649021 (patch) | |
tree | 9fafda92b0026b5d17fdf85ded5df7ab339bf487 /llvm/lib/Target/Sparc/SparcRegInfo.cpp | |
parent | f1223ace96046e0cc768c2bffd8218cc4d6d7897 (diff) | |
download | bcm5719-llvm-d30f989cdaf8e996c3c0f0497b50bff4bb649021.tar.gz bcm5719-llvm-d30f989cdaf8e996c3c0f0497b50bff4bb649021.zip |
* Code Cleanups
* Removal dependencies on Type.h & remove uses of getTypeID()
llvm-svn: 1718
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcRegInfo.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp index 879b01efc44..9af470aa012 100644 --- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp @@ -143,17 +143,16 @@ UltraSparcRegInfo::getCallInstRetAddr(const MachineInstr *CallMI) const { // of a LiveRange, Value and using the unified RegClassID // int UltraSparcRegInfo::getRegType(const LiveRange *LR) const { - unsigned Typ; switch (LR->getRegClass()->getID()) { case IntRegClassID: return IntRegType; - case FloatRegClassID: - Typ = LR->getTypeID(); - if (Typ == Type::FloatTyID) + case FloatRegClassID: { + const Type *Typ = LR->getType(); + if (Typ == Type::FloatTy) return FPSingleRegType; - else if (Typ == Type::DoubleTyID) + else if (Typ == Type::DoubleTy) return FPDoubleRegType; assert(0 && "Unknown type in FloatRegClass"); - + } case IntCCRegClassID: return IntCCRegType; case FloatCCRegClassID: return FloatCCRegType; default: assert( 0 && "Unknown reg class ID"); @@ -1444,7 +1443,7 @@ void UltraSparcRegInfo::printReg(const LiveRange *LR) { } else if (RegClassID == FloatRegClassID) { cerr << "[" << SparcFloatRegOrder::getRegName(LR->getColor()); - if( LR->getTypeID() == Type::DoubleTyID ) + if( LR->getType() == Type::DoubleTy) cerr << "+" << SparcFloatRegOrder::getRegName(LR->getColor()+1); cerr << "]\n"; } |