summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2004-06-25 00:13:11 +0000
committerTanya Lattner <tonic@nondot.org>2004-06-25 00:13:11 +0000
commit23dbc8170c91c09bf1c7f3f18d4321e05c500db3 (patch)
tree97c958f3a4f7910e0899d5bf5886ad8a41a71954 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
parent521eb8752b2e1ab7318169c10dd7a23acf78664b (diff)
downloadbcm5719-llvm-23dbc8170c91c09bf1c7f3f18d4321e05c500db3.tar.gz
bcm5719-llvm-23dbc8170c91c09bf1c7f3f18d4321e05c500db3.zip
Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
llvm-svn: 14389
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/TwoAddressInstructionPass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 066260c241a..2190f2162e4 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -98,7 +98,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
++numTwoAddressInstrs;
- DEBUG(std::cerr << '\t'; mi->print(std::cerr, TM));
+ DEBUG(std::cerr << '\t'; mi->print(std::cerr, &TM));
assert(mi->getOperand(1).isRegister() &&
mi->getOperand(1).getReg() &&
@@ -140,7 +140,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
MachineBasicBlock::iterator prevMi = prior(mi);
DEBUG(std::cerr << "\t\tprepend:\t";
- prevMi->print(std::cerr, TM));
+ prevMi->print(std::cerr, &TM));
if (LV) {
// update live variables for regA
@@ -170,7 +170,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
mi->RemoveOperand(1);
DEBUG(std::cerr << "\t\trewrite to:\t";
- mi->print(std::cerr, TM));
+ mi->print(std::cerr, &TM));
}
}
OpenPOWER on IntegriCloud