[PATCH] D75411: [mlir][ods] Add query for derived attribute

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 11:36:36 PST 2020


jpienaar added a comment.

In D75411#1899715 <https://reviews.llvm.org/D75411#1899715>, @rriddle wrote:

> What is a derived attribute? When would this be used?


Derived attributes are attributes that are not stored in the Op but instead computed from properties of the op (https://mlir.llvm.org/docs/OpDefinitions/#operation-arguments). E.g., a derived attribute T corresponding to the result type results in a convenience accessor T() that returns the result type but is not additionally stored. This allows for convenience functions that query the op (and return the result in convenient user usable format) without needing to store redundant information.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75411





More information about the llvm-commits mailing list