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

Andrew V. Tischenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 01:45:34 PST 2018


avt77 added inline comments.


================
Comment at: lib/CodeGen/MachineCombiner.cpp:437
-
-    DEBUG(dbgs() << "INSTR "; MI.dump(); dbgs() << "\n";);
     SmallVector<MachineCombinerPattern, 16> Patterns;
----------------
fhahn wrote:
> Why did you drop this debug message? It seems helpful to know which instructions the machine combiner already visited. Although I can also see why one could argue why dropping it is ok, as we have the reference in which basic block we are at through the debug message at the beginning of the function
Because we have such print below - see 479.


================
Comment at: lib/CodeGen/MachineCombiner.cpp:479
+    DEBUG(dbgs() << "\t" << STI->getSchedInfoStr(MI) << ": ";
+          MI.print(dbgs(), false, false, TII););
+
----------------
fhahn wrote:
> I think we need a `\n` after print().
Why? print adds \n: do you like to see an empty string here?


https://reviews.llvm.org/D41278





More information about the llvm-commits mailing list