llvm-project/mlir/test/Dialect/SCF
Morten Borup Petersen 032cb1650f [MLIR][SCF] Add for-to-while loop transformation pass
This pass transforms SCF.ForOp operations to SCF.WhileOp. The For loop condition is placed in the 'before' region of the while operation, and indctuion variable incrementation + the loop body in the 'after' region. The loop carried values of the while op are the induction variable (IV) of the for-loop + any iter_args specified for the for-loop.
Any 'yield' ops in the for-loop are rewritten to additionally yield the (incremented) induction variable.

This transformation is useful for passes where we want to consider structured control flow solely on the basis of a loop body and the computation of a loop condition. As an example, when doing high-level synthesis in CIRCT, the incrementation of an IV in a for-loop is "just another part" of a circuit datapath, and what we really care about is the distinction between our datapath and our control logic (the condition variable).

Differential Revision: https://reviews.llvm.org/D108454
2021-09-21 09:09:54 +01:00
..
bufferize.mlir [mlir][SCF] populateSCFStructuralTypeConversionsAndLegality WhileOp support 2021-07-14 12:43:04 +03:00
canonicalize.mlir [mlir][tensor] Insert explicit tensor.cast ops for insert_slice src 2021-08-24 19:45:04 +09:00
for-loop-canonicalization.mlir [mlir][scf] Fold dim(scf.for) to dim(iter_arg) 2021-09-09 13:47:13 +09:00
for-loop-peeling.mlir [mlir][scf] Loop peeling: Use scf.for for partial iteration 2021-09-10 19:07:09 +09:00
for-loop-specialization.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
for-loop-to-while-loop.mlir [MLIR][SCF] Add for-to-while loop transformation pass 2021-09-21 09:09:54 +01:00
invalid.mlir [mlir] Added new RegionBranchTerminatorOpInterface and adapted uses of hasTrait<ReturnLike>. 2021-07-26 06:39:31 +02:00
loop-pipelining.mlir [mlir] Extend scf pipeling to support loop carried dependencies 2021-07-21 18:32:38 -07:00
loop-range.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
loop-unroll.mlir Support post-processing Ops in unrolled loop iterations 2021-08-11 23:11:10 +00:00
ops.mlir [MLIR][SCF] Parenthesize multiple return types in scf.execute_region asm op 2021-08-19 21:31:51 +01:00
parallel-loop-fusion.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
parallel-loop-specialization.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
parallel-loop-tiling-inbound-check.mlir [MLIR][DISC] Revise ParallelLoopTilingPass with inbound_check mode 2021-08-16 14:02:53 +02:00
parallel-loop-tiling.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00