[PATCH] D41278: [MachineCombiner] Improve debug output (NFC)

Andrew V. Tischenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 01:47:34 PST 2018


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL326074: The final step to close D41278 [MachineCombiner] Improve debug output (NFC). (authored by avt77, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D41278?vs=134186&id=135874#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D41278

Files:
  llvm/trunk/lib/CodeGen/MachineCombiner.cpp
  llvm/trunk/lib/CodeGen/MachineInstr.cpp


Index: llvm/trunk/lib/CodeGen/MachineInstr.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp
@@ -1235,6 +1235,8 @@
   if (const MachineFunction *MF = getMFIfAvailable(*this)) {
     F = &MF->getFunction();
     M = F->getParent();
+    if (!TII)
+      TII = MF->getSubtarget().getInstrInfo();
   }
 
   ModuleSlotTracker MST(M);
Index: llvm/trunk/lib/CodeGen/MachineCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineCombiner.cpp
+++ llvm/trunk/lib/CodeGen/MachineCombiner.cpp
@@ -559,14 +559,12 @@
         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);
         }
       });
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41278.135874.patch
Type: text/x-patch
Size: 1414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180226/c307271c/attachment.bin>


More information about the llvm-commits mailing list