* Code Cleanups
* Removal dependencies on Type.h & remove uses of getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1718 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index 879b01e..9af470a 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -143,17 +143,16 @@
// 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 @@
} 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";
}