diff options
author | Jeff Niu <jeff@modular.com> | 2024-04-23 08:36:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 08:36:32 -0700 |
commit | e0c28485ad195f1650b6826ab2d856e7917788e2 (patch) | |
tree | b3f156374b3f5e2e444bc5b855dcffb41eeb7eca | |
parent | 03760ad09d49f74c026f0b5d41d982cad81c67d7 (diff) |
[mlir] Update comment about `propertiesAttr` (NFC) (#89634)
The comment is misleading because `propertiesAttr` is not actually
ignored when the operation isn't unregistered.
-rw-r--r-- | mlir/include/mlir/IR/OperationSupport.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h index 2c1c490aac49..cdb75a3777ad 100644 --- a/mlir/include/mlir/IR/OperationSupport.h +++ b/mlir/include/mlir/IR/OperationSupport.h @@ -960,9 +960,12 @@ struct OperationState { /// Regions that the op will hold. SmallVector<std::unique_ptr<Region>, 1> regions; - // If we're creating an unregistered operation, this Attribute is used to - // build the properties. Otherwise it is ignored. For registered operations - // see the `getOrAddProperties` method. + /// This Attribute is used to opaquely construct the properties of the + /// operation. If we're creating an unregistered operation, the Attribute is + /// used as-is as the Properties storage of the operation. Otherwise, the + /// operation properties are constructed opaquely using its + /// `setPropertiesFromAttr` hook. Note that `getOrAddProperties` is the + /// preferred method to construct properties from C++. Attribute propertiesAttr; private: |