The boundary is always 1 if the tile size is 1.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Just a minor readability comment.
| mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp | ||
|---|---|---|
| 171 | The if-then-else-if logic is a bit hard to follow. Maybe move that into a helper method like OpFoldResult getBoundedTileSize(OpBuilder &b, Value tileSize) {
Optional<int64_t> ts = getConstantIntValue(tileSize)
if (ts && ts.value() == 1)
return getAsOpFoldResult(tileSize);
if (tileDividesIterationDomain(...))
return tileSize;
return b.create<AffineMinOp>(...);
} | |
The if-then-else-if logic is a bit hard to follow. Maybe move that into a helper method like
OpFoldResult getBoundedTileSize(OpBuilder &b, Value tileSize) { Optional<int64_t> ts = getConstantIntValue(tileSize) if (ts && ts.value() == 1) return getAsOpFoldResult(tileSize); if (tileDividesIterationDomain(...)) return tileSize; return b.create<AffineMinOp>(...); }