[llvm-commits] [llvm] r78360 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Evan Cheng
evan.cheng at apple.com
Thu Aug 6 17:28:58 PDT 2009
Author: evancheng
Date: Thu Aug 6 19:28:58 2009
New Revision: 78360
URL: http://llvm.org/viewvc/llvm-project?rev=78360&view=rev
Log:
Code clean up.
Modified:
llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=78360&r1=78359&r2=78360&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Thu Aug 6 19:28:58 2009
@@ -108,6 +108,7 @@
void ProcessCopy(MachineInstr *MI, MachineBasicBlock *MBB,
SmallPtrSet<MachineInstr*, 8> &Processed);
+
public:
static char ID; // Pass identification, replacement for typeid
TwoAddressInstructionPass() : MachineFunctionPass(&ID) {}
@@ -782,7 +783,7 @@
if (FirstTied) {
++NumTwoAddressInstrs;
- DOUT << '\t'; DEBUG(mi->print(*cerr.stream(), &TM));
+ DOUT << '\t' << *mi;
}
FirstTied = false;
@@ -803,7 +804,7 @@
unsigned regASubIdx = mi->getOperand(ti).getSubReg();
assert(TargetRegisterInfo::isVirtualRegister(regB) &&
- "cannot update physical register live information");
+ "cannot make instruction into two-address form");
#ifndef NDEBUG
// First, verify that we don't have a use of a in the instruction (a =
@@ -976,7 +977,7 @@
LV->addVirtualRegisterDead(regB, prevMI);
}
- DOUT << "\t\tprepend:\t"; DEBUG(prevMI->print(*cerr.stream(), &TM));
+ DOUT << "\t\tprepend:\t" << *prevMI;
// Replace all occurences of regB with regA.
for (unsigned i = 0, e = mi->getNumOperands(); i != e; ++i) {
@@ -990,7 +991,7 @@
mi->getOperand(ti).setReg(mi->getOperand(si).getReg());
MadeChange = true;
- DOUT << "\t\trewrite to:\t"; DEBUG(mi->print(*cerr.stream(), &TM));
+ DOUT << "\t\trewrite to:\t" << *mi;
}
mi = nmi;
More information about the llvm-commits
mailing list