[mlir] Add software pipelining transformation for scf.For op
authorthomasraoux <thomasraoux@google.com>
Tue, 13 Jul 2021 03:49:21 +0000 (20:49 -0700)
committerthomasraoux <thomasraoux@google.com>
Mon, 19 Jul 2021 20:43:26 +0000 (13:43 -0700)
commitf6f88e66cedcebbabfaf7e68344d46835d9edc1d
tree28b034ff6a7ac448714cca72fb37ccf556189a7a
parentfbb45947b2a77c6295c110c7fbb648adac14d2c9
[mlir] Add software pipelining transformation for scf.For op

This is the first step to support software pipeline for scf.for loops.
This is only the transformation to create pipelined kernel and
prologue/epilogue.
The scheduling needs to be given by user as  many different algorithm
and heuristic could be applied.
This currently doesn't handle loop arguments, this will be added in a
follow up patch.

Differential Revision: https://reviews.llvm.org/D105868
mlir/include/mlir/Dialect/SCF/Transforms.h
mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp [new file with mode: 0644]
mlir/test/Dialect/SCF/loop-pipelining.mlir [new file with mode: 0644]
mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp