Add canoncalization patterns to remove zero-iteration 'for' loops, replace
single-iteration 'for' loops with their bodies; remove known-false conditionals
with no 'else' branch and replace conditionals with known value by the
respective region. Although similar transformations are performed at the CFG
level, not all flows reach that level, e.g., the GPU flow may want to remove
single-iteration loops before deciding on loop mapping to thread dimensions.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
It would be nice to also handle the case where op.lowerBound() == op.upperBound(). Not in this patch, though.