diff options
| author | Jacques Pienaar <jpienaar@google.com> | 2019-12-19 16:43:35 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-19 16:44:56 -0800 |
| commit | b6d54a1ba3f73aab629f73be1844674abc604294 (patch) | |
| tree | 5efab8486883c7264e81f08a17c1d992f91db9e2 /mlir/include | |
| parent | 8020ad3e396bcca8dba94cea397cece81b76b119 (diff) | |
| download | bcm5719-llvm-b6d54a1ba3f73aab629f73be1844674abc604294.tar.gz bcm5719-llvm-b6d54a1ba3f73aab629f73be1844674abc604294.zip | |
Unique trait list during ODS Operator trait construction
Concatting lists in TableGen is easy, creating unique lists less so. There is no reason for duplicated op traits so we could throw an error instead but duplicates could occur due to concatting different list of traits in ODS (e.g., for convenience reasons), so just dedup them during Operator trait construction instead.
PiperOrigin-RevId: 286488423
Diffstat (limited to 'mlir/include')
| -rw-r--r-- | mlir/include/mlir/IR/OpBase.td | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td index 8f6770f297e..24e48b329d5 100644 --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -1586,6 +1586,7 @@ class Op<Dialect dialect, string mnemonic, list<OpTrait> props = []> { bit hasFolder = 0; // Op traits. + // Note: The list of traits will be uniqued by ODS. list<OpTrait> traits = props; // Additional code that will be added to the public part of the generated |

