[PATCH] D77008: [MLIR][NFC] Move test/Transforms/lower-affine.mlir -> test/Conversion
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 11:28:15 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5f9bf3f65614: [MLIR][NFC] Move test/Transforms/lower-affine.mlir -> test/Conversion (authored by bondhugula).
Changed prior to commit:
https://reviews.llvm.org/D77008?vs=253931&id=253936#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77008/new/
https://reviews.llvm.org/D77008
Files:
mlir/docs/Passes.md
mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
mlir/test/Conversion/AffineToStandard/lower-affine.mlir
mlir/test/Transforms/lower-affine.mlir
Index: mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
===================================================================
--- mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
+++ mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
@@ -597,4 +597,4 @@
static PassRegistration<LowerAffinePass>
pass("lower-affine",
- "Lower If, For, AffineApply operations to primitive equivalents");
+ "Lower affine dialect operations to loop/standard dialect ones");
Index: mlir/docs/Passes.md
===================================================================
--- mlir/docs/Passes.md
+++ mlir/docs/Passes.md
@@ -4,21 +4,21 @@
[TOC]
-## Affine control lowering (`-lower-affine`)
+## Affine dialect lowering (`-lower-affine`)
-Convert operations related to affine control into a graph of blocks using
-operations from the standard dialect.
+Convert operations from the affine dialect into operations from the loop and
+standard dialects.
-Loop statements are converted to a subgraph of blocks (initialization, condition
-checking, subgraph of body blocks) with loop induction variable being passed as
-the block argument of the condition checking block. Conditional statements are
-converted to a subgraph of blocks (chain of condition checking with
-short-circuit logic, subgraphs of 'then' and 'else' body blocks). `affine.apply`
-operations are converted into sequences of primitive arithmetic operations that
-have the same effect, using operands of the `index` type. Consequently, named
-maps and sets may be removed from the module.
+`affine.for` operations are converted to `loop.for` operations that are free of
+certain structural restrictions (on their bounds and step). `affine.if` is
+similarly converted to the `loop.if` operation. `affine.apply` operations are
+converted into sequences of primitive arithmetic operations from the standard
+dialect that have the same effect, using operands of the `index` type.
+Consequently, named maps and sets thare are no longer in use may be removed from
+the module.
-For example, `%r = affine.apply (d0, d1)[s0] -> (d0 + 2*d1 + s0)(%d0, %d1)[%s0]`
+For example, `%r = affine.apply affine_map<(d0, d1)[s0] -> (d0 + 2*d1 +
+s0)>(%d0, %d1)[%s0]`
can be converted into:
```mlir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77008.253936.patch
Type: text/x-patch
Size: 2277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200331/1c7e7782/attachment.bin>
More information about the llvm-commits
mailing list