[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
This commit is contained in:
parent
75047577d6
commit
e124f73b52
|
@ -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
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue