[Mlir-commits] [clang] [llvm] [mlir] [openmp] [Clang][OpenMP] Canonicalize Intra-tiles in Loop Tiling (PR #191114)
Michael Kruse
llvmlistbot at llvm.org
Fri Aug 28 04:37:36 PDT 2026
================
@@ -9695,8 +9744,19 @@ static bool checkOpenMPIterationSpace(
std::tie(ResultIterSpaces[CurrentNestedLoopCount].MinValue,
ResultIterSpaces[CurrentNestedLoopCount].MaxValue) =
ISC.buildMinMaxValues(DSA.getCurScope(), Captures);
- ResultIterSpaces[CurrentNestedLoopCount].FinalCondition =
- ISC.buildFinalCondition(DSA.getCurScope());
+ if (TileRectCond) {
+ // The body guard is the overshoot predicate, which is absent when the tile
+ // can never be partial. Lower bound is the live .floor.iv; wire as a floor
+ // dependence for collapse
+ // (see design note in ActOnOpenMPTileDirective).
+ ResultIterSpaces[CurrentNestedLoopCount].FinalCondition = TileBodyPredicate;
+ ResultIterSpaces[CurrentNestedLoopCount].ReinterpretTileLB = true;
+ ResultIterSpaces[CurrentNestedLoopCount].ReinterpretTileLoc =
+ ISC.getInitSrcRange().getBegin();
+ } else {
+ ResultIterSpaces[CurrentNestedLoopCount].FinalCondition =
+ ISC.buildFinalCondition(DSA.getCurScope());
----------------
Meinersbur wrote:
The `ISC.buildFinalCondition` is not executed in a intratile loop anymore. Can it be either combined with `TileBodyPredicate` or `assert`-ed to be `nullptr`?
https://github.com/llvm/llvm-project/pull/191114
More information about the Mlir-commits
mailing list