[Mlir-commits] [mlir] e0c2848 - [mlir] Update comment about `propertiesAttr` (NFC) (#89634)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 23 08:36:37 PDT 2024
Author: Jeff Niu
Date: 2024-04-23T08:36:32-07:00
New Revision: e0c28485ad195f1650b6826ab2d856e7917788e2
URL: https://github.com/llvm/llvm-project/commit/e0c28485ad195f1650b6826ab2d856e7917788e2
DIFF: https://github.com/llvm/llvm-project/commit/e0c28485ad195f1650b6826ab2d856e7917788e2.diff
LOG: [mlir] Update comment about `propertiesAttr` (NFC) (#89634)
The comment is misleading because `propertiesAttr` is not actually
ignored when the operation isn't unregistered.
Added:
Modified:
mlir/include/mlir/IR/OperationSupport.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h
index 2c1c490aac49b8..cdb75a3777ad80 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:
More information about the Mlir-commits
mailing list