Change attribute to be input argument.
authorJacques Pienaar <jpienaar@google.com>
Thu, 20 Dec 2018 10:57:32 +0000 (02:57 -0800)
committerjpienaar <jpienaar@google.com>
Fri, 29 Mar 2019 21:33:31 +0000 (14:33 -0700)
commitdf90f000a8edb35a886298ee264e6f3369744ded
tree7abbf371677e01f280636d664eb12881b03b4254
parent2570fb5bb7d3963ea6681e7512a1c20ab42e46bf
Change attribute to be input argument.

Change operands to arguments in Op and use it for both operands and arguments. This unifies the way that operands and attributes are specified and the intended way that matching/creating ops with attributes will look. Both can now be represented using the same dag structure (and also makes the ordering more explicit). Derived attributes are not considered as part of the arguments (as they are inferred from the created op, not something needed to created it).
* Generate named operand accessors;
* Simplified the way of specifying Attr and use ElementAttr for TFL_Const instead.
* Fix a incorrect assertion generated;

The input parsing can be made more robust, I'll address that in a follow up.

PiperOrigin-RevId: 226307424
mlir/include/mlir/IR/op_base.td
mlir/tools/mlir-op-gen/mlir-op-gen.cpp