diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-08-07 00:28:58 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-08-07 00:28:58 +0000 |
commit | 6d2db66d10e6fb4fe5ad8ba579f7a5db8265dd7d (patch) | |
tree | c21354778a7dde310982614d4912886aeb6ecf30 | |
parent | 25e9651afb26a004a9debda42da3f90234cc05e2 (diff) | |
download | external_llvm-6d2db66d10e6fb4fe5ad8ba579f7a5db8265dd7d.zip external_llvm-6d2db66d10e6fb4fe5ad8ba579f7a5db8265dd7d.tar.gz external_llvm-6d2db66d10e6fb4fe5ad8ba579f7a5db8265dd7d.tar.bz2 |
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78360 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index b18d1ef..0b4a180 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -108,6 +108,7 @@ namespace { 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 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { if (FirstTied) { ++NumTwoAddressInstrs; - DOUT << '\t'; DEBUG(mi->print(*cerr.stream(), &TM)); + DOUT << '\t' << *mi; } FirstTied = false; @@ -803,7 +804,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { 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 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { 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 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { 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; |