[Mlir-commits] [mlir] [mlir][Interfaces][NFC] Better documentation for `RegionBranchOpInterface` (PR #66920)

Markus Böck llvmlistbot at llvm.org
Wed Sep 20 08:52:37 PDT 2023


================
@@ -147,32 +178,44 @@ def RegionBranchOpInterface : OpInterface<"RegionBranchOpInterface"> {
       }]
     >,
     InterfaceMethod<[{
-        Returns the viable region successors that are branched to when first
-        executing the op.
+        Returns the potentional region successors when first executing the op.
+
         Unlike `getSuccessorRegions`, this method also passes along the
-        constant operands of this op. Based on these, different region
-        successors can be determined.
-        `operands` contains an entry for every operand of the implementing
-        op with a null attribute if the operand has no constant value or
-        the corresponding attribute if it is a constant.
+        constant operands of this op. Based on these, the implementation may
+        filter out certain successors. By default, simply dispatches to
+        `getSuccessorRegions`. `operands` contains an entry for every
+        operand of this op, with a null attribute if the operand has no constant
+        value.
 
-        By default, simply dispatches to `getSuccessorRegions`.
+        Example: In the above example, this method may return two region
+        region successors: the single region of the `scf.for` op and the this
----------------
zero9178 wrote:

Does this "this" here refer to `this` in the C++ sense or the operation? In the latter case, "the this operation" reads oddly and in the former it can maybe be wrapped with backticks as well. Same three lines below.

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


More information about the Mlir-commits mailing list