File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,11 @@ class alignas(8) Operation final
322322 void print (raw_ostream &os, AsmState &state);
323323 void dump ();
324324
325+ // Dump pretty printed IR. This method is helpful for better readability if
326+ // the Operation is not verified because it won't disable custom printers to
327+ // fall back to the generic one.
328+ LLVM_DUMP_METHOD void dumpPretty ();
329+
325330 // ===--------------------------------------------------------------------===//
326331 // Operands
327332 // ===--------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -4019,6 +4019,11 @@ void Operation::dump() {
40194019 llvm::errs () << " \n " ;
40204020}
40214021
4022+ void Operation::dumpPretty () {
4023+ print (llvm::errs (), OpPrintingFlags ().useLocalScope ().assumeVerified ());
4024+ llvm::errs () << " \n " ;
4025+ }
4026+
40224027void Block::print (raw_ostream &os) {
40234028 Operation *parentOp = getParentOp ();
40244029 if (!parentOp) {
You can’t perform that action at this time.
0 commit comments