Use higher level methods, don't use TargetInstrDescriptors directly!

llvm-svn: 4389
This commit is contained in:
Chris Lattner 2002-10-29 17:35:39 +00:00
parent 353b60a872
commit 660bf10981
2 changed files with 3 additions and 3 deletions

View 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);

View 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);