From d9512caca8ec1e5488cdc94b34986c8ab2d447bb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 29 Oct 2002 17:35:39 +0000 Subject: [PATCH] Use higher level methods, don't use TargetInstrDescriptors directly! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4389 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineInstr.cpp | 2 +- lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 4 ++-- lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 4e340d3439d..6371d8dbc7e 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -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); diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index c569a29e8ef..42698adc544 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -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); diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index c569a29e8ef..42698adc544 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -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);