Clean up return value on affineDataCopyGenerate utility. Return the
actual success/failure status instead of the "number of bytes" which
isn't being used in the codebase in any way. The success/failure status
wasn't being sent out earlier.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM. Just a minor comment.
mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp | ||
---|---|---|
98 | Not sure I understand the LogicalResult -> void in runOnBlock. If runOnBlock is calling affineDataCopyGenerate which is now returning a LogicalResult, wouldn't it make sense that runOnBlock continues to return LogicalResult and and propagates the return value of affineDataCopyGenerate when appropriate? |
mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp | ||
---|---|---|
98 | runOnBlock makes multiple calls to affineDataCopyGenerate and although we could make it return success if everything succeeded, the overall failure or success status of it isn't that meaningful or used in any way at the top level. runOnFunction itself calls runOnBlock multiple times and the IR is still valid and useful if even on partial failure. So I decided to not propagate "aggregate status" up further. |
Not sure I understand the LogicalResult -> void in runOnBlock. If runOnBlock is calling affineDataCopyGenerate which is now returning a LogicalResult, wouldn't it make sense that runOnBlock continues to return LogicalResult and and propagates the return value of affineDataCopyGenerate when appropriate?