forked from OSchip/llvm-project
032cb1650f
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 |
||
---|---|---|
.. | ||
bufferize.mlir | ||
canonicalize.mlir | ||
for-loop-canonicalization.mlir | ||
for-loop-peeling.mlir | ||
for-loop-specialization.mlir | ||
for-loop-to-while-loop.mlir | ||
invalid.mlir | ||
loop-pipelining.mlir | ||
loop-range.mlir | ||
loop-unroll.mlir | ||
ops.mlir | ||
parallel-loop-fusion.mlir | ||
parallel-loop-specialization.mlir | ||
parallel-loop-tiling-inbound-check.mlir | ||
parallel-loop-tiling.mlir |