Use higher level methods, don't use TargetInstrDescriptors directly!
authorChris Lattner <sabre@nondot.org>
Tue, 29 Oct 2002 17:35:39 +0000 (17:35 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 29 Oct 2002 17:35:39 +0000 (17:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4389 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineInstr.cpp
lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index 4e340d3439d75be4032b8e34beddc4f3f3e9e795..6371d8dbc7ee85195f372adefcdd6cae151109e9 100644 (file)
@@ -157,7 +157,7 @@ OutputReg(std::ostream &os, unsigned int regNum)
 
 std::ostream &operator<<(std::ostream& os, const MachineInstr& minstr)
 {
-  os << TargetInstrDescriptors[minstr.opCode].opCodeString;
+  os << TargetInstrDescriptors[minstr.opCode].Name;
   
   for (unsigned i=0, N=minstr.getNumOperands(); i < N; i++) {
     os << "\t" << minstr.getOperand(i);
index c569a29e8efd3059fa89862f078a5e44b77c67e1..42698adc544be55210919879fb8eeb3989a7b7f6 100644 (file)
@@ -954,10 +954,10 @@ void PhyRegAlloc::printMachineCode()
 
     // iterate over all the machine instructions in BB
     for ( ; MII != MBB.end(); ++MII) {  
-      MachineInstr *const MInst = *MII; 
+      MachineInstr *MInst = *MII; 
 
       cerr << "\n\t";
-      cerr << TargetInstrDescriptors[MInst->getOpCode()].opCodeString;
+      cerr << TM.getInstrInfo().getName(MInst->getOpCode());
 
       for (unsigned OpNum=0; OpNum < MInst->getNumOperands(); ++OpNum) {
        MachineOperand& Op = MInst->getOperand(OpNum);
index c569a29e8efd3059fa89862f078a5e44b77c67e1..42698adc544be55210919879fb8eeb3989a7b7f6 100644 (file)
@@ -954,10 +954,10 @@ void PhyRegAlloc::printMachineCode()
 
     // iterate over all the machine instructions in BB
     for ( ; MII != MBB.end(); ++MII) {  
-      MachineInstr *const MInst = *MII; 
+      MachineInstr *MInst = *MII; 
 
       cerr << "\n\t";
-      cerr << TargetInstrDescriptors[MInst->getOpCode()].opCodeString;
+      cerr << TM.getInstrInfo().getName(MInst->getOpCode());
 
       for (unsigned OpNum=0; OpNum < MInst->getNumOperands(); ++OpNum) {
        MachineOperand& Op = MInst->getOperand(OpNum);