[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp SparcV9InstrSelection.cpp SparcV9InstrSelectionSupport.h SparcV9RegInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jun 17 13:25:22 PDT 2004


Changes in directory llvm/lib/Target/SparcV9:

SparcV9AsmPrinter.cpp updated: 1.114 -> 1.115
SparcV9InstrSelection.cpp updated: 1.143 -> 1.144
SparcV9InstrSelectionSupport.h updated: 1.16 -> 1.17
SparcV9RegInfo.cpp updated: 1.129 -> 1.130

---
Log message:

Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()


---
Diffs of the changes:  (+9 -10)

Index: llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp:1.114 llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp:1.115
--- llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp:1.114	Wed Jun  2 00:54:42 2004
+++ llvm/lib/Target/SparcV9/SparcV9AsmPrinter.cpp	Thu Jun 17 13:17:08 2004
@@ -85,8 +85,7 @@
 
   inline const std::string
   TypeToDataDirective(const Type* type) {
-    switch(type->getPrimitiveID())
-    {
+    switch(type->getTypeID()) {
     case Type::BoolTyID: case Type::UByteTyID: case Type::SByteTyID:
       return ".byte";
     case Type::UShortTyID: case Type::ShortTyID:


Index: llvm/lib/Target/SparcV9/SparcV9InstrSelection.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9InstrSelection.cpp:1.143 llvm/lib/Target/SparcV9/SparcV9InstrSelection.cpp:1.144
--- llvm/lib/Target/SparcV9/SparcV9InstrSelection.cpp:1.143	Wed Jun  2 21:45:09 2004
+++ llvm/lib/Target/SparcV9/SparcV9InstrSelection.cpp	Thu Jun 17 13:17:08 2004
@@ -650,7 +650,7 @@
   if (resultType->isInteger() || isa<PointerType>(resultType)) {
       opCode = V9::SUBr;
   } else {
-    switch(resultType->getPrimitiveID())
+    switch(resultType->getTypeID())
     {
     case Type::FloatTyID:  opCode = V9::FSUBS; break;
     case Type::DoubleTyID: opCode = V9::FSUBD; break;
@@ -691,7 +691,7 @@
   MachineOpCode opCode = V9::INVALID_OPCODE;
   
   Value* operand = ((InstrTreeNode*) instrNode->leftChild())->getValue();
-  switch(operand->getType()->getPrimitiveID()) {
+  switch(operand->getType()->getTypeID()) {
   case Type::FloatTyID:  opCode = V9::FCMPS; break;
   case Type::DoubleTyID: opCode = V9::FCMPD; break;
   default: assert(0 && "Invalid type for FCMP instruction"); break; 
@@ -727,7 +727,7 @@
   if (resultType->isInteger())
     opCode = V9::MULXr;
   else
-    switch(resultType->getPrimitiveID())
+    switch(resultType->getTypeID())
     {
     case Type::FloatTyID:  opCode = V9::FMULS; break;
     case Type::DoubleTyID: opCode = V9::FMULD; break;
@@ -946,7 +946,7 @@
   if (resultType->isInteger())
     opCode = resultType->isSigned()? V9::SDIVXr : V9::UDIVXr;
   else
-    switch(resultType->getPrimitiveID())
+    switch(resultType->getTypeID())
       {
       case Type::FloatTyID:  opCode = V9::FDIVS; break;
       case Type::DoubleTyID: opCode = V9::FDIVD; break;


Index: llvm/lib/Target/SparcV9/SparcV9InstrSelectionSupport.h
diff -u llvm/lib/Target/SparcV9/SparcV9InstrSelectionSupport.h:1.16 llvm/lib/Target/SparcV9/SparcV9InstrSelectionSupport.h:1.17
--- llvm/lib/Target/SparcV9/SparcV9InstrSelectionSupport.h:1.16	Sun Apr 25 02:04:49 2004
+++ llvm/lib/Target/SparcV9/SparcV9InstrSelectionSupport.h	Thu Jun 17 13:17:10 2004
@@ -23,7 +23,7 @@
 inline MachineOpCode
 ChooseLoadInstruction(const Type *DestTy)
 {
-  switch (DestTy->getPrimitiveID()) {
+  switch (DestTy->getTypeID()) {
   case Type::BoolTyID:
   case Type::UByteTyID:   return V9::LDUBr;
   case Type::SByteTyID:   return V9::LDSBr;
@@ -46,7 +46,7 @@
 inline MachineOpCode
 ChooseStoreInstruction(const Type *DestTy)
 {
-  switch (DestTy->getPrimitiveID()) {
+  switch (DestTy->getTypeID()) {
   case Type::BoolTyID:
   case Type::UByteTyID:
   case Type::SByteTyID:   return V9::STBr;
@@ -79,7 +79,7 @@
     opCode = V9::ADDr;
   }
   else
-    switch(resultType->getPrimitiveID())
+    switch(resultType->getTypeID())
     {
     case Type::FloatTyID:  opCode = V9::FADDS; break;
     case Type::DoubleTyID: opCode = V9::FADDD; break;


Index: llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp:1.129 llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp:1.130
--- llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp:1.129	Fri Jun  4 15:51:40 2004
+++ llvm/lib/Target/SparcV9/SparcV9RegInfo.cpp	Thu Jun 17 13:17:10 2004
@@ -272,7 +272,7 @@
 //
 unsigned SparcV9RegInfo::getRegClassIDOfType(const Type *type,
                                                 bool isCCReg) const {
-  Type::PrimitiveID ty = type->getPrimitiveID();
+  Type::TypeID ty = type->getTypeID();
   unsigned res;
     
   // FIXME: Comparing types like this isn't very safe...





More information about the llvm-commits mailing list