[Mlir-commits] [mlir] c9da04d - [mlir] Only number the parent operation in Block::printAsOperand
River Riddle
llvmlistbot at llvm.org
Sun Apr 5 16:20:37 PDT 2020
Author: River Riddle
Date: 2020-04-05T16:17:13-07:00
New Revision: c9da04d6604dda656bb2000e634e2e7764f486bf
URL: https://github.com/llvm/llvm-project/commit/c9da04d6604dda656bb2000e634e2e7764f486bf
DIFF: https://github.com/llvm/llvm-project/commit/c9da04d6604dda656bb2000e634e2e7764f486bf.diff
LOG: [mlir] Only number the parent operation in Block::printAsOperand
Summary: Blocks are numbered locally within a region, so numbering above the parent region is unnecessary.
Differential Revision: https://reviews.llvm.org/D77510
Added:
Modified:
mlir/lib/IR/AsmPrinter.cpp
Removed:
################################################################################
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index 939c5c8898bf..f66d26140f84 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -2398,10 +2398,6 @@ void Block::printAsOperand(raw_ostream &os, bool printType) {
os << "<<UNLINKED BLOCK>>\n";
return;
}
- // Get the top-level op.
- while (auto *nextOp = parentOp->getParentOp())
- parentOp = nextOp;
-
AsmState state(parentOp);
printAsOperand(os, state);
}
More information about the Mlir-commits
mailing list