llvm-project
96bc07d4 - [MLIR][OpenMP] Add canonical loop LLVM-IR lowering (#147069)

Commit
65 days ago
[MLIR][OpenMP] Add canonical loop LLVM-IR lowering (#147069) Support for translating the operations introduced in #144785 to LLVM-IR. In order to keep the lowering simple, `OpenMPIRBuider::unrollLoopHeuristic` is applied when encountering the `omp.unroll_heuristic` op. As a result, the operation that unrolling is applied to (`omp.canonical_loop`) must have been emitted before even though logically there is no such requirement. Eventually, all transformations on a loop must be applied directly after emitting `omp.canonical_loop`, i.e. future transformations must be looked-up when encountering `omp.canonical_loop` itself. This is because many OpenMPIRBuilder methods (e.g. `createParallel`) expect all the region code to be emitted withing a callback. In the case of `createParallel`, the region code is getting outlined into a new function. Therefore, making the operation order a formal requirement would not make the implementation any easier.
Author
Parents
Loading