Introduce Deaffinator pass.
authorAlex Zinenko <zinenko@google.com>
Wed, 21 Nov 2018 15:42:16 +0000 (07:42 -0800)
committerjpienaar <jpienaar@google.com>
Fri, 29 Mar 2019 21:07:16 +0000 (14:07 -0700)
commit615c41c78830329c3d44a459b7cf21e437f8192f
treec05caaae74e10e3199075f4783291a0257c2bc3b
parentac6bfa6780f263447da0432d330d8773732d2dd1
Introduce Deaffinator pass.

This function pass replaces affine_apply operations in CFG functions with
sequences of primitive arithmetic instructions that form the affine map.

The actual replacement functionality is located in LoweringUtils as a
standalone function operating on an individual affine_apply operation and
inserting the result at the location of the original operation.  It is expected
to be useful for other, target-specific lowering passes that may start at
MLFunction level that Deaffinator does not support.

PiperOrigin-RevId: 222406692
mlir/include/mlir/Transforms/LoweringUtils.h [new file with mode: 0644]
mlir/include/mlir/Transforms/Passes.h
mlir/lib/Transforms/Deaffinator.cpp [new file with mode: 0644]
mlir/lib/Transforms/Utils/LoweringUtils.cpp [new file with mode: 0644]
mlir/test/Transforms/deaffinator.mlir [new file with mode: 0644]