[llvm-branch-commits] [flang] [flang] Lower omp.workshare to other omp constructs (PR #101446)
Ivan R. Ivanov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Aug 4 04:37:16 PDT 2024
ivanradanov wrote:
@kiranchandramohan @tblah
I think this warrants another look if you have some time.
I have reiterated a bit and opted to have a omp loop nest wrapper op which signals to the workshare lowering which specific loops need to be parallelized (i.e. converted to wsloop { loop_nest}).
This will allow us to emit this in the frontend if it is needed and be more precise about the exact loops that need to be parallelized.
So the LowerWorksharePass that I have implemented here is tasked with parallelizing the loops nested in workshare_loop_wrapper and both the Fortran->mlir frontend and the hlfir lowering passes would be responsible for emitting the workshare_loop_wrapper ops where appropriate. For that I have started with some of the obvious lowerings in the hlfir bufferizations, but perhaps that can be done gradually and not everything needs to be covered by this PR. Let me know what you think.
https://github.com/llvm/llvm-project/pull/101446
More information about the llvm-branch-commits
mailing list