[MLIR] Add LocationAttr declarations to ODS
authorAndrew Young <youngar17@gmail.com>
Tue, 24 Jan 2023 04:08:35 +0000 (20:08 -0800)
committerAndrew Young <youngar17@gmail.com>
Tue, 24 Jan 2023 04:42:14 +0000 (20:42 -0800)
commita2f71d2732d3fa2700ae2f899fef112955b07af9
tree4125df0dec4ca1f1563dc758eeb05d37898ec0a9
parentfedbc689e16b3843d6a5ac7cb6a293fb22475121
[MLIR] Add LocationAttr declarations to ODS

This commit adds location attributes and arrays of locations to OpBase.td.
Using LocationAttrs directly in an operation is useful when the location does
not correspond 1-1 to an operation or value in the IR.  We use this in CIRCT to
store the declaration location of result ports of HWModule operations.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D142148
mlir/include/mlir/IR/OpBase.td