[Mlir-commits] [mlir] e124f73 - [mlir][docs] Convert block comments to line comments.
Ingo Müller
llvmlistbot at llvm.org
Wed Mar 30 01:08:46 PDT 2022
Author: Ingo Müller
Date: 2022-03-30T08:08:42Z
New Revision: e124f73b52adfe445d5fc97db22d34a99c78b162
URL: https://github.com/llvm/llvm-project/commit/e124f73b52adfe445d5fc97db22d34a99c78b162
DIFF: https://github.com/llvm/llvm-project/commit/e124f73b52adfe445d5fc97db22d34a99c78b162.diff
LOG: [mlir][docs] Convert block comments to line comments.
The op documentation of the ops of the scf dialect used /**/ style block
comments which doesn't seem to exists (anymore?).
Reviewed By: nicolasvasilache, ingomueller-net
Differential Revision: https://reviews.llvm.org/D122565
Added:
Modified:
mlir/include/mlir/Dialect/SCF/SCFOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SCF/SCFOps.td b/mlir/include/mlir/Dialect/SCF/SCFOps.td
index f30b4ecac6a1f..638d45d8f15dc 100644
--- a/mlir/include/mlir/Dialect/SCF/SCFOps.td
+++ b/mlir/include/mlir/Dialect/SCF/SCFOps.td
@@ -587,21 +587,21 @@ def WhileOp : SCF_Op<"while",
```mlir
%res = scf.while (%arg1 = %init1) : (f32) -> f32 {
- /* "Before" region.
- * In a "while" loop, this region computes the condition. */
+ // "Before" region.
+ // In a "while" loop, this region computes the condition.
%condition = call @evaluate_condition(%arg1) : (f32) -> i1
- /* Forward the argument (as result or "after" region argument). */
+ // Forward the argument (as result or "after" region argument).
scf.condition(%condition) %arg1 : f32
} do {
^bb0(%arg2: f32):
- /* "After region.
- * In a "while" loop, this region is the loop body. */
+ // "After" region.
+ // In a "while" loop, this region is the loop body.
%next = call @payload(%arg2) : (f32) -> f32
- /* Forward the new value to the "before" region.
- * The operand types must match the types of the `scf.while` operands. */
+ // Forward the new value to the "before" region.
+ // The operand types must match the types of the `scf.while` operands.
scf.yield %next : f32
}
```
@@ -611,20 +611,20 @@ def WhileOp : SCF_Op<"while",
```mlir
%res = scf.while (%arg1 = %init1) : (f32) -> f32 {
- /* "Before" region.
- * In a "do-while" loop, this region contains the loop body. */
+ // "Before" region.
+ // In a "do-while" loop, this region contains the loop body.
%next = call @payload(%arg1) : (f32) -> f32
- /* And also evaluates the condition. */
+ // And also evaluates the condition.
%condition = call @evaluate_condition(%arg1) : (f32) -> i1
- /* Loop through the "after" region. */
+ // Loop through the "after" region.
scf.condition(%condition) %next : f32
} do {
^bb0(%arg2: f32):
- /* "After" region.
- * Forwards the values back to "before" region unmodified. */
+ // "After" region.
+ // Forwards the values back to "before" region unmodified.
scf.yield %arg2 : f32
}
```
@@ -639,27 +639,27 @@ def WhileOp : SCF_Op<"while",
```mlir
%res = scf.while (%arg1 = %init1) : (f32) -> i64 {
- /* One can perform some computations, e.g., necessary to evaluate the
- * condition, in the "before" region and forward their results to the
- * "after" region. */
+ // One can perform some computations, e.g., necessary to evaluate the
+ // condition, in the "before" region and forward their results to the
+ // "after" region.
%shared = call @shared_compute(%arg1) : (f32) -> i64
- /* Evaluate the condition. */
+ // Evaluate the condition.
%condition = call @evaluate_condition(%arg1, %shared) : (f32, i64) -> i1
- /* Forward the result of the shared computation to the "after" region.
- * The types must match the arguments of the "after" region as well as
- * those of the `scf.while` results. */
+ // Forward the result of the shared computation to the "after" region.
+ // The types must match the arguments of the "after" region as well as
+ // those of the `scf.while` results.
scf.condition(%condition) %shared : i64
} do {
^bb0(%arg2: i64) {
- /* Use the partial result to compute the rest of the payload in the
- * "after" region. */
+ // Use the partial result to compute the rest of the payload in the
+ // "after" region.
%res = call @payload(%arg2) : (i64) -> f32
- /* Forward the new value to the "before" region.
- * The operand types must match the types of the `scf.while` operands. */
+ // Forward the new value to the "before" region.
+ // The operand types must match the types of the `scf.while` operands.
scf.yield %res : f32
}
```
More information about the Mlir-commits
mailing list