[PATCH] D78604: Add `//` before the banner displayed in `--print-ir-before/after-all`

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 17:53:15 PDT 2020


mehdi_amini created this revision.
mehdi_amini added a reviewer: rriddle.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar.
Herald added 1 blocking reviewer(s): rriddle.
Herald added a project: LLVM.
rriddle accepted this revision.
rriddle added a comment.
This revision is now accepted and ready to land.

nit: Can you add a space between the / and the *?


This is making the output file (when the stream is a file) a valid MLIR
file.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78604

Files:
  mlir/lib/Pass/IRPrinting.cpp


Index: mlir/lib/Pass/IRPrinting.cpp
===================================================================
--- mlir/lib/Pass/IRPrinting.cpp
+++ mlir/lib/Pass/IRPrinting.cpp
@@ -141,7 +141,7 @@
     beforePassFingerPrints.try_emplace(pass, op);
 
   config->printBeforeIfEnabled(pass, op, [&](raw_ostream &out) {
-    out << formatv("*** IR Dump Before {0} ***", pass->getName());
+    out << formatv("//*** IR Dump Before {0} ***", pass->getName());
     printIR(op, config->shouldPrintAtModuleScope(), out, OpPrintingFlags());
     out << "\n\n";
   });
@@ -165,7 +165,7 @@
   }
 
   config->printAfterIfEnabled(pass, op, [&](raw_ostream &out) {
-    out << formatv("*** IR Dump After {0} ***", pass->getName());
+    out << formatv("//*** IR Dump After {0} ***", pass->getName());
     printIR(op, config->shouldPrintAtModuleScope(), out, OpPrintingFlags());
     out << "\n\n";
   });
@@ -178,7 +178,7 @@
     beforePassFingerPrints.erase(pass);
 
   config->printAfterIfEnabled(pass, op, [&](raw_ostream &out) {
-    out << formatv("*** IR Dump After {0} Failed ***", pass->getName());
+    out << formatv("//*** IR Dump After {0} Failed ***", pass->getName());
     printIR(op, config->shouldPrintAtModuleScope(), out,
             OpPrintingFlags().printGenericOpForm());
     out << "\n\n";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78604.259137.patch
Type: text/x-patch
Size: 1295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200422/dcefa203/attachment.bin>


More information about the llvm-commits mailing list