[Mlir-commits] [mlir] [mlir] Add property combinators, initial ODS support (PR #94732)
Christian Ulmann
llvmlistbot at llvm.org
Mon Jun 17 22:43:34 PDT 2024
================
@@ -68,18 +69,67 @@ class Property<string storageTypeParam = "", string desc = ""> {
// - `$_storage` is the variable to hash.
//
// The expression should define a llvm::hash_code.
- code hashProperty = [{
- llvm::hash_value($_storage);
+ // If unspecified, defaults to `llvm::hash_value($_storage)`.
+ // The default is not specified in tablegen because many combinators, like
+ // ArrayProperty, can fall back to more efficient implementations of
+ // `hashProperty` when their underlying elements have trivial hashing.
+ code hashProperty = "";
+
+ // The body of the parser for a value of this property.
+ // Format:
+ // - `$_parser` is the OpAsmParser.
+ // - `$_storage` is the location into which the value is to be placed if it is
+ // present.
+ // - `$_cxtx` is a `MLIRContext *`
----------------
Dinistro wrote:
```suggestion
// - `$_ctxt` is a `MLIRContext *`
```
https://github.com/llvm/llvm-project/pull/94732
More information about the Mlir-commits
mailing list