summaryrefslogtreecommitdiffstats
path: root/mlir/g3doc/LangRef.md
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/g3doc/LangRef.md')
-rw-r--r--mlir/g3doc/LangRef.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/mlir/g3doc/LangRef.md b/mlir/g3doc/LangRef.md
index fdfc43ea39d..3448927d214 100644
--- a/mlir/g3doc/LangRef.md
+++ b/mlir/g3doc/LangRef.md
@@ -40,7 +40,7 @@ which means that values are defined before use and have scope defined by their
dominance relations. Operations may produce zero or more results, and each is a
distinct SSA value with its own type defined by the [type system](#type-system).
-MLIR incorporates polyhedral compiler concepts, including `affine.for` and
+MLIR incorporates polyhedral compiler concepts, including `for` and
`affine.if` operations defined by the [affine dialect](Dialects/Affine.md),
which model affine loops and affine conditionals. It also includes affine maps
integrated into the type system - they are key to the representation of data and
@@ -99,10 +99,10 @@ func @multiply(%A: memref<100x?xf32>, %B: memref<?x50xf32>)
%C = alloc memref<100x50xf32>()
// Multiplication loop nest.
- affine.for %i = 0 to 100 {
- affine.for %j = 0 to 50 {
+ for %i = 0 to 100 {
+ for %j = 0 to 50 {
store 0 to %C[%i, %j] : memref<100x50xf32>
- affine.for %k = 0 to %n {
+ for %k = 0 to %n {
%a_v = load %A[%i, %k] : memref<100x?xf32>
%b_v = load %B[%k, %j] : memref<?x50xf32>
%prod = mulf %a_v, %b_v : f32
@@ -1434,7 +1434,7 @@ The arity of indices is the rank of the memref (i.e., if the memref loaded from
is of rank 3, then 3 indices are required for the load following the memref
identifier).
-In an `affine.if` or `affine.for` body, the indices of a load are restricted to
+In an `affine.if` or `for` body, the indices of a load are restricted to
SSA values bound to surrounding loop induction variables,
[symbols](#dimensions-and-symbols), results of a
[`constant` operation](#'constant'-operation), or the result of an
@@ -1456,7 +1456,7 @@ Example:
**Context:** The `load` and `store` instructions are specifically crafted to
fully resolve a reference to an element of a memref, and (in affine `affine.if`
-and `affine.for` instructions) the compiler can follow use-def chains (e.g.
+and `for` instructions) the compiler can follow use-def chains (e.g.
through [`affine.apply`](Dialects/Affine.md#'affine.apply'-operation)
operations) to precisely analyze references at compile-time using polyhedral
techniques. This is possible because of the
@@ -1492,7 +1492,7 @@ store %100, %A[%1, 1023] : memref<4x?xf32, #layout, hbm>
**Context:** The `load` and `store` instructions are specifically crafted to
fully resolve a reference to an element of a memref, and (in polyhedral
-`affine.if` and `affine.for` instructions) the compiler can follow use-def
+`affine.if` and `for` instructions) the compiler can follow use-def
chains (e.g. through
[`affine.apply`](Dialects/Affine.md#'affine.apply'-operation) operations) to
precisely analyze references at compile-time using polyhedral techniques. This
OpenPOWER on IntegriCloud