@@ -79,9 +79,9 @@ When adding a new op, ask:
7979
80801 . Does it read from or write to the heap or stack? It should probably implement
8181 ` MemoryEffectsOpInterface ` .
82- 1 . Does these side effects ordered? It should probably set the stage of
83- side effects to make analysis more accurate.
84- 1 . Does These side effects act on every single value of resource? It probably
82+ 1 . Are these side effects ordered? The op should probably set the stage of
83+ side effects to make analyses more accurate.
84+ 1 . Do these side effects act on every single value of a resource? It probably
8585 should set the FullEffect on effect.
86861 . Does it have side effects that must be preserved, like a volatile store or a
8787 syscall? It should probably implement ` MemoryEffectsOpInterface ` and model
@@ -106,9 +106,9 @@ add side effect correctly.
106106
107107### SIMD compute operation
108108
109- If we have a SIMD backend dialect with a "simd.abs" operation, which reads all
109+ Consider a SIMD backend dialect with a "simd.abs" operation which reads all
110110values from the source memref, calculates their absolute values, and writes them
111- to the target memref.
111+ to the target memref:
112112
113113``` mlir
114114 func.func @abs(%source : memref<10xf32>, %target : memref<10xf32>) {
@@ -139,10 +139,10 @@ A typical approach is as follows:
139139 }
140140```
141141
142- In the above example, we attach the side effect [ MemReadAt<0, FullEffect>] to
142+ In the above example, we attach the side effect ` [MemReadAt<0, FullEffect>] ` to
143143the source, indicating that the abs operation reads each individual value from
144144the source during stage 0. Likewise, we attach the side effect
145- [ MemWriteAt<1, FullEffect>] to the target, indicating that the abs operation
145+ ` [MemWriteAt<1, FullEffect>] ` to the target, indicating that the abs operation
146146writes to each individual value within the target during stage 1 (after reading
147147from the source).
148148
@@ -174,7 +174,7 @@ A typical approach is as follows:
174174 }
175175```
176176
177- In the above example, we attach the side effect [ MemReadAt<0, PartialEffect>] to
177+ In the above example, we attach the side effect ` [MemReadAt<0, PartialEffect>] ` to
178178the source, indicating that the load operation reads parts of values from the
179179memref during stage 0. Since side effects typically occur at stage 0 and are
180- partial by default, we can abbreviate it as " [ MemRead] " .
180+ partial by default, we can abbreviate it as ` [MemRead] ` .
0 commit comments