summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp6
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index efdffe83d86..efb463f8810 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -559,14 +559,12 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) {
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);
}
});
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 98993b2146e..7d04e6b4d77 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1235,6 +1235,8 @@ void MachineInstr::print(raw_ostream &OS, bool IsStandalone, bool SkipOpers,
if (const MachineFunction *MF = getMFIfAvailable(*this)) {
F = &MF->getFunction();
M = F->getParent();
+ if (!TII)
+ TII = MF->getSubtarget().getInstrInfo();
}
ModuleSlotTracker MST(M);
OpenPOWER on IntegriCloud