[all-commits] [llvm/llvm-project] 9922aa: [OpenMPIRBuilder] Added `if` clause for `teams` (#...
Shraiysh via All-commits
all-commits at lists.llvm.org
Tue Oct 17 13:00:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9922aadf9e9d1b9d10dd69882d8515757f127a91
https://github.com/llvm/llvm-project/commit/9922aadf9e9d1b9d10dd69882d8515757f127a91
Author: Shraiysh <Shraiysh.Vaishay at amd.com>
Date: 2023-10-17 (Tue, 17 Oct 2023)
Changed paths:
M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Log Message:
-----------
[OpenMPIRBuilder] Added `if` clause for `teams` (#69139)
This patch adds support for the `if` clause on `teams` construct. The
value of the argument must be an integer value. If the value evaluates
to true (non-zero) integer, then the number of threads is determined by
`num_threads` clause (or default and ICV if `num_threads` is absent).
When the condition evaluates to false (zero), then the bounds are set to
1. ([OpenMP 5.2 Section
10.2](https://www.openmp.org/spec-html/5.2/openmpse58.html))
This essentially means that
```
upperbound = ifexpr ? upperbound : 1
lowerbound = ifexpr ? lowerbound : 1
```
More information about the All-commits
mailing list