mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14389 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user