From c9da04d6604dda656bb2000e634e2e7764f486bf Mon Sep 17 00:00:00 2001 From: River Riddle Date: Sun, 5 Apr 2020 16:16:54 -0700 Subject: [PATCH] [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 --- mlir/lib/IR/AsmPrinter.cpp | 4 ---- 1 file changed, 4 deletions(-) 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 << "<>\n"; return; } - // Get the top-level op. - while (auto *nextOp = parentOp->getParentOp()) - parentOp = nextOp; - AsmState state(parentOp); printAsOperand(os, state); }