Skip to content

Commit 254b7a5

Browse files
committed
[MLIR][OpenMP] Normalize lowering of omp.loop_nest
This patch refactors the translation of `omp.loop_nest` operations into LLVM IR so that it is handled similarly to other operations. Before this change, the responsibility of translating the loop nest fell into each loop wrapper, causing code duplication. This patch centralizes that handling of the loop. One consequence of this was fixing an issue lowering non-inclusive `omp.simd` loops. As a result, it is now expected that the handling of composite constructs is performed collaboratively among translating functions for each operation involved. At the moment, only `do/for simd` is supported by ignoring SIMD information, and this behavior is preserved. The translation of loop wrapper operations need access to the `llvm::CanonicalLoopInfo` loop information structure in order to apply transformations to it. This is now created in the nested call to `convertOmpLoopNest`, so it needs to be passed up to all associated loop wrapper translation functions. This is done via the creation of an `OpenMPLoopInfoStackFrame` within `convertOmpLoopNest` and its removal after its outermost associated loop wrapper has been translated.
1 parent 593f401 commit 254b7a5

File tree

3 files changed

+277
-276
lines changed

3 files changed

+277
-276
lines changed

0 commit comments

Comments
 (0)