[llvm] r326074 - The final step to close D41278 [MachineCombiner] Improve debug output (NFC).
Andrew V. Tischenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 01:43:21 PST 2018
Author: avt77
Date: Mon Feb 26 01:43:21 2018
New Revision: 326074
URL: http://llvm.org/viewvc/llvm-project?rev=326074&view=rev
Log:
The final step to close D41278 [MachineCombiner] Improve debug output (NFC).
Differential Revision: https://reviews.llvm.org/D41278
Modified:
llvm/trunk/lib/CodeGen/MachineCombiner.cpp
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCombiner.cpp?rev=326074&r1=326073&r2=326074&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCombiner.cpp Mon Feb 26 01:43:21 2018
@@ -559,14 +559,12 @@ bool MachineCombiner::combineInstruction
dbgs() << "\tFor the Pattern (" << (int)P << ") these instructions could be removed\n";
for (auto const *InstrPtr : DelInstrs) {
dbgs() << "\t\t" << STI->getSchedInfoStr(*InstrPtr) << ": ";
- InstrPtr->print(dbgs(), false, false, TII);
- dbgs() << "\n";
+ InstrPtr->print(dbgs(), false, false, false, TII);
}
dbgs() << "\tThese instructions could replace the removed ones\n";
for (auto const *InstrPtr : InsInstrs) {
dbgs() << "\t\t" << STI->getSchedInfoStr(*InstrPtr) << ": ";
- InstrPtr->print(dbgs(), false, false, TII);
- dbgs() << "\n";
+ InstrPtr->print(dbgs(), false, false, false, TII);
}
});
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=326074&r1=326073&r2=326074&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Mon Feb 26 01:43:21 2018
@@ -1235,6 +1235,8 @@ void MachineInstr::print(raw_ostream &OS
if (const MachineFunction *MF = getMFIfAvailable(*this)) {
F = &MF->getFunction();
M = F->getParent();
+ if (!TII)
+ TII = MF->getSubtarget().getInstrInfo();
}
ModuleSlotTracker MST(M);
More information about the llvm-commits
mailing list