Add an option (cleanUpUnroll) to unroll cleanup loop even if the trip count is smaller the unroll factor.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@Groverkss Sorry if I'm pinging the wrong person. But could you review this PR when you get a chance or tell me who I should ask to take a look at this type of change?
mlir/include/mlir/Dialect/Affine/LoopUtils.h | ||
---|---|---|
53 | The option should be documented in the comment above. | |
mlir/include/mlir/Dialect/Affine/Passes.td | ||
216 | The "even if" wording would be inaccurate/confusing here -- since the question of a cleanup loop equal to and larger than the trip count doesn't arise in the first place. Instead: "Fully unroll the cleanup loop when possible."? | |
mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp | ||
125–126 | Use /*argName = ... style for any constant values passed as arguments. | |
133–134 | Likewise. | |
mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp | ||
1054–1080 | I don't think this would be the simpler approach. Instead, just simply use the unrollFull utility on any cleanup loop generated? | |
mlir/test/Dialect/Affine/unroll.mlir | ||
696 | It'll be good also to have a test case where the trip count is larger than the unroll factor. |
we can ensure ... -> unroll the cleanup loop fully
?