Fix affine loop unroll for zero trip count loops. Add missing check.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Simple clarification.
mlir/lib/Transforms/Utils/LoopUtils.cpp | ||
---|---|---|
1056 | return failure() here ?, since nothing is done. I see that the return value is being used only at one place, and failure() would be more appropriate. |
This comment was removed by bondhugula.
mlir/lib/Transforms/Utils/LoopUtils.cpp | ||
---|---|---|
1056 | The failure() is meant to indicate the utility failed to do the desired transformation (i.e., it could not because of some condition that wasn't supported, handled, or other inability). This isn't really a failure but a trivial success (it has been unrolled trivially so to say). |
return failure() here ?, since nothing is done. I see that the return value is being used only at one place, and failure() would be more appropriate.