[PATCH] D80420: [mlir] Expand operand adapter to take attributes
Jacques Pienaar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 24 20:47:20 PDT 2020
jpienaar added a comment.
Updated, thanks
================
Comment at: mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp:1875
+ << "\n return odsAttrs.get(\"" << name << "\").";
+ if (attr.isOptional() || attr.hasDefaultValue())
+ body << "dyn_cast_or_null<";
----------------
antiagainst wrote:
> Do we want to construct the default value here like https://github.com/llvm/llvm-project/blob/master/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp#L368-L378?
Good point, this might also provide a different path to fixing that todo :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80420/new/
https://reviews.llvm.org/D80420
More information about the llvm-commits
mailing list