[PATCH] D76205: Add support for custom op parser/printer hooks to know about result names.

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 13:09:13 PDT 2020


lattner added inline comments.


================
Comment at: mlir/lib/Parser/Parser.cpp:4020
+        auto name = std::get<0>(entry).drop_front();
+        return {name, resultNo};
+      }
----------------
mehdi_amini wrote:
> I don't get this loop, in the example you git in the comment above: `%x, %y:2, %z = foo.op`
> 
> I expect to loop over `{ {"x", 1}, {"y", 2}, {"z", 1} }`, but your test `if (resultNo < std::get<1>(entry)) {` will compare against 1, 2, and 1 ; so `getResultName(2)` and `getResultName(3)` would never match, what do I miss?
> 
You're not missing anything, this is a bug!  Thank you!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76205/new/

https://reviews.llvm.org/D76205





More information about the llvm-commits mailing list