Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mlir/include/mlir/IR/Operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ class alignas(8) Operation final
void print(raw_ostream &os, AsmState &state);
void dump();

/// Pretty print for ease of debugging readabilty with unverified IR.
void dumpPrettyPrinted();

//===--------------------------------------------------------------------===//
// Operands
//===--------------------------------------------------------------------===//
Expand Down
5 changes: 5 additions & 0 deletions mlir/lib/IR/AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,11 @@ void Operation::dump() {
llvm::errs() << "\n";
}

void Operation::dumpPrettyPrinted() {
print(llvm::errs(), OpPrintingFlags().useLocalScope().assumeVerified());
llvm::errs() << "\n";
}

void Block::print(raw_ostream &os) {
Operation *parentOp = getParentOp();
if (!parentOp) {
Expand Down
Loading