Skip to content

Commit e0c2848

Browse files
author
Jeff Niu
authored
[mlir] Update comment about propertiesAttr (NFC) (#89634)
The comment is misleading because `propertiesAttr` is not actually ignored when the operation isn't unregistered.
1 parent 03760ad commit e0c2848

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mlir/include/mlir/IR/OperationSupport.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -960,9 +960,12 @@ struct OperationState {
960960
/// Regions that the op will hold.
961961
SmallVector<std::unique_ptr<Region>, 1> regions;
962962

963-
// If we're creating an unregistered operation, this Attribute is used to
964-
// build the properties. Otherwise it is ignored. For registered operations
965-
// see the `getOrAddProperties` method.
963+
/// This Attribute is used to opaquely construct the properties of the
964+
/// operation. If we're creating an unregistered operation, the Attribute is
965+
/// used as-is as the Properties storage of the operation. Otherwise, the
966+
/// operation properties are constructed opaquely using its
967+
/// `setPropertiesFromAttr` hook. Note that `getOrAddProperties` is the
968+
/// preferred method to construct properties from C++.
966969
Attribute propertiesAttr;
967970

968971
private:

0 commit comments

Comments
 (0)