File tree 2 files changed +10
-0
lines changed
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
322
322
void print (raw_ostream &os, AsmState &state);
323
323
void dump ();
324
324
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
+
325
330
// ===--------------------------------------------------------------------===//
326
331
// Operands
327
332
// ===--------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -4019,6 +4019,11 @@ void Operation::dump() {
4019
4019
llvm::errs () << " \n " ;
4020
4020
}
4021
4021
4022
+ void Operation::dumpPretty () {
4023
+ print (llvm::errs (), OpPrintingFlags ().useLocalScope ().assumeVerified ());
4024
+ llvm::errs () << " \n " ;
4025
+ }
4026
+
4022
4027
void Block::print (raw_ostream &os) {
4023
4028
Operation *parentOp = getParentOp ();
4024
4029
if (!parentOp) {
You can’t perform that action at this time.
0 commit comments