summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-18 00:35:06 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-18 00:35:06 +0000
commit26583db8b6c45a3055b5d2b074039a8557e7df0c (patch)
treefb8ce5129c5aa2480fa05701b4878779a5dd153f /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
parent30f7be686e56c9ea90188890fa4228427a6b769b (diff)
downloadbcm5719-llvm-26583db8b6c45a3055b5d2b074039a8557e7df0c.tar.gz
bcm5719-llvm-26583db8b6c45a3055b5d2b074039a8557e7df0c.zip
Beautify debug output.
llvm-svn: 11573
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/TwoAddressInstructionPass.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 79c47ac26f4..a992baffad1 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/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));
}
}
OpenPOWER on IntegriCloud