diff options
| author | River Riddle <riverriddle@google.com> | 2020-01-13 13:12:37 -0800 |
|---|---|---|
| committer | River Riddle <riverriddle@google.com> | 2020-01-13 13:24:39 -0800 |
| commit | 4268e4f4b84b85266426e99050d31ec63f3ce8aa (patch) | |
| tree | d3a6b4cc366310f7ef6108d029155b06295c5495 /mlir/include | |
| parent | 26c7a4ed101fae85d2041ee1c8e8483b96e4460e (diff) | |
| download | bcm5719-llvm-4268e4f4b84b85266426e99050d31ec63f3ce8aa.tar.gz bcm5719-llvm-4268e4f4b84b85266426e99050d31ec63f3ce8aa.zip | |
[mlir] Change the syntax of AffineMapAttr and IntegerSetAttr to avoid conflicts with function types.
Summary: The current syntax for AffineMapAttr and IntegerSetAttr conflict with function types, making it currently impossible to round-trip function types(and e.g. FuncOp) in the IR. This revision changes the syntax for the attributes by wrapping them in a keyword. AffineMapAttr is wrapped with `affine_map<>` and IntegerSetAttr is wrapped with `affine_set<>`.
Reviewed By: nicolasvasilache, ftynse
Differential Revision: https://reviews.llvm.org/D72429
Diffstat (limited to 'mlir/include')
| -rw-r--r-- | mlir/include/mlir/IR/DialectImplementation.h | 6 | ||||
| -rw-r--r-- | mlir/include/mlir/IR/OpImplementation.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mlir/include/mlir/IR/DialectImplementation.h b/mlir/include/mlir/IR/DialectImplementation.h index 1eada8f264b..ec8e39cf35b 100644 --- a/mlir/include/mlir/IR/DialectImplementation.h +++ b/mlir/include/mlir/IR/DialectImplementation.h @@ -291,6 +291,12 @@ public: return success(); } + /// Parse an affine map instance into 'map'. + virtual ParseResult parseAffineMap(AffineMap &map) = 0; + + /// Parse an integer set instance into 'set'. + virtual ParseResult printIntegerSet(IntegerSet &set) = 0; + //===--------------------------------------------------------------------===// // Type Parsing //===--------------------------------------------------------------------===// diff --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h index 98ce1015886..97e3b97d696 100644 --- a/mlir/include/mlir/IR/OpImplementation.h +++ b/mlir/include/mlir/IR/OpImplementation.h @@ -379,6 +379,12 @@ public: virtual ParseResult parseOptionalAttrDictWithKeyword(SmallVectorImpl<NamedAttribute> &result) = 0; + /// Parse an affine map instance into 'map'. + virtual ParseResult parseAffineMap(AffineMap &map) = 0; + + /// Parse an integer set instance into 'set'. + virtual ParseResult printIntegerSet(IntegerSet &set) = 0; + //===--------------------------------------------------------------------===// // Identifier Parsing //===--------------------------------------------------------------------===// |

