diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-18 00:35:06 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-18 00:35:06 +0000 |
commit | 3a9986f5d8432d2c8228311cabd9768ffaa23487 (patch) | |
tree | 5cd32a8c0068e7426c82de9d80527cfeb4e9312e /lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | d9a7349fc3df1f3977134714134248e3758104c7 (diff) |
Beautify debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 79c47ac26f..a992baffad 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -28,6 +28,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "twoaddrinstr" +#include "llvm/Function.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/MachineFunctionPass.h" @@ -81,6 +82,10 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { bool MadeChange = false; + DEBUG(std::cerr << "********** REWRITING TWO-ADDR INSTRS **********\n"); + DEBUG(std::cerr << "********** Function: " + << MF.getFunction()->getName() << '\n'); + for (MachineFunction::iterator mbbi = MF.begin(), mbbe = MF.end(); mbbi != mbbe; ++mbbi) { for (MachineBasicBlock::iterator mi = mbbi->begin(), me = mbbi->end(); @@ -93,7 +98,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { ++numTwoAddressInstrs; - DEBUG(std::cerr << "\tinstruction: "; mi->print(std::cerr, TM)); + DEBUG(std::cerr << '\t'; mi->print(std::cerr, TM)); assert(mi->getOperand(1).isRegister() && mi->getOperand(1).getReg() && @@ -134,7 +139,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { numInstrsAdded += Added; MachineBasicBlock::iterator prevMi = prior(mi); - DEBUG(std::cerr << "\t\tadded instruction: "; + DEBUG(std::cerr << "\t\tprepend:\t"; prevMi->print(std::cerr, TM)); if (LV) { @@ -164,7 +169,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { mi->getOperand(0).setUse(); mi->RemoveOperand(1); - DEBUG(std::cerr << "\t\tmodified original to: "; + DEBUG(std::cerr << "\t\trewrite to:\t"; mi->print(std::cerr, TM)); } } |