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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Apr 8 12:51:10 PDT 2026


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

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"

>From f427a40402a16e4aae50b3cccff3213d37593a4e Mon Sep 17 00:00:00 2001
From: bernborgess <62393097+bernborgess at users.noreply.github.com>
Date: Wed, 8 Apr 2026 16:48:57 -0300
Subject: [PATCH] Clarity docs of mlir::Value

---
 mlir/include/mlir/IR/Value.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

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) {}



More information about the Mlir-commits mailing list