[Mlir-commits] [mlir] [mlir][docs] Clarity docs of mlir::Value (PR #191042)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Apr 8 12:52:00 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Author: bernborgess

<details>
<summary>Changes</summary>

Change phrasing of the docs preceeding `mlir::Value`, to more precisely express the relation of "owned by a block" and "methods that modify this Value"

---
Full diff: https://github.com/llvm/llvm-project/pull/191042.diff


1 Files Affected:

- (modified) mlir/include/mlir/IR/Value.h (+7-7) 


``````````diff
diff --git a/mlir/include/mlir/IR/Value.h b/mlir/include/mlir/IR/Value.h
index 79d3fc5fd8a59..fa09209b93c71 100644
--- a/mlir/include/mlir/IR/Value.h
+++ b/mlir/include/mlir/IR/Value.h
@@ -86,13 +86,13 @@ class alignas(8) ValueImpl : public IRObjectWithUseList<OpOperand> {
 
 /// This class represents an instance of an SSA value in the MLIR system,
 /// representing a computable value that has a type and a set of users. An SSA
-/// value is either a BlockArgument or the result of an operation. Note: This
-/// class has value-type semantics and is just a simple wrapper around a
-/// ValueImpl that is either owner by a block(in the case of a BlockArgument) or
-/// an Operation(in the case of an OpResult).
-/// As most IR constructs, this isn't const-correct, but we keep method
-/// consistent and as such method that immediately modify this Value aren't
-/// marked `const` (include modifying the Value use-list).
+/// value is either a BlockArgument or the result of an operation.
+/// Note: This class has value-type semantics and is just a simple wrapper
+/// around a ValueImpl that is either owned by a block (in the case of a
+/// BlockArgument) or an Operation (in the case of an OpResult).
+/// As most IR constructs, this isn't const-correct, but we keep the method
+/// consistent, and therefore methods that immediately modify this Value aren't
+/// marked `const` (including modifying the Value's use-list).
 class Value {
 public:
   constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}

``````````

</details>


https://github.com/llvm/llvm-project/pull/191042


More information about the Mlir-commits mailing list