[PATCH] D77510: [mlir] Only number the parent operation in Block::printAsOperand

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 12:16:54 PDT 2020


rriddle created this revision.
rriddle added a reviewer: mehdi_amini.
Herald added subscribers: llvm-commits, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar.
Herald added a project: LLVM.

Blocks are numbered locally within a region, so numbering above the parent region is unnecessary.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77510

Files:
  mlir/lib/IR/AsmPrinter.cpp


Index: mlir/lib/IR/AsmPrinter.cpp
===================================================================
--- mlir/lib/IR/AsmPrinter.cpp
+++ mlir/lib/IR/AsmPrinter.cpp
@@ -2393,10 +2393,6 @@
     os << "<<UNLINKED BLOCK>>\n";
     return;
   }
-  // Get the top-level op.
-  while (auto *nextOp = parentOp->getParentOp())
-    parentOp = nextOp;
-
   AsmState state(parentOp);
   printAsOperand(os, state);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77510.255183.patch
Type: text/x-patch
Size: 406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200405/ed8e36b6/attachment.bin>


More information about the llvm-commits mailing list