[all-commits] [llvm/llvm-project] bb4484: [OpenMPIRBuilder] Add support for target workshare...
Dominik Adamski via All-commits
all-commits at lists.llvm.org
Wed Dec 6 00:47:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bb4484d41e1ee7856ce71ae0572a724c20d989f2
https://github.com/llvm/llvm-project/commit/bb4484d41e1ee7856ce71ae0572a724c20d989f2
Author: Dominik Adamski <dominik.adamski at amd.com>
Date: 2023-12-06 (Wed, 06 Dec 2023)
Changed paths:
M llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Log Message:
-----------
[OpenMPIRBuilder] Add support for target workshare loops (#73360)
The workshare loop for target region uses the new OpenMP device runtime.
The code generation scheme for the new device runtime is presented
below:
Input code:
```
workshare-loop {
loop-body
}
```
Output code:
helper function which represents loop body:
```
function-loop-body(counter, loop-body-args) {
loop-body
}
```
workshare-loop is replaced by the proper device runtime call:
```
call __kmpc_new_worksharing_rtl(function-loop-body, loop-body-args,
loop-tripcount, ...)
```
This PR uses the new device runtime functions which were added in PR:
https://github.com/llvm/llvm-project/pull/73225
More information about the All-commits
mailing list