[all-commits] [llvm/llvm-project] 43101d: [OPENMP50]Codegen for scan directive in simd loops.
Alexey Bataev via All-commits
all-commits at lists.llvm.org
Thu Jun 11 11:55:27 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 43101d10dbd58d48df732f974e078fd82376039e
https://github.com/llvm/llvm-project/commit/43101d10dbd58d48df732f974e078fd82376039e
Author: Alexey Bataev <a.bataev at hotmail.com>
Date: 2020-06-11 (Thu, 11 Jun 2020)
Changed paths:
M clang/lib/CodeGen/CGStmtOpenMP.cpp
M clang/lib/Sema/SemaOpenMP.cpp
A clang/test/OpenMP/scan_codegen.cpp
Log Message:
-----------
[OPENMP50]Codegen for scan directive in simd loops.
Added codegen for scan directives in simd loop. The codegen transforms
original code:
```
int x = 0;
#pragma omp simd reduction(inscan, +: x)
for (..) {
<first part>
#pragma omp scan inclusive(x)
<second part>
}
```
into
```
int x = 0;
for (..) {
int x_priv = 0;
<first part>
x = x_priv + x;
x_priv = x;
<second part>
}
```
and
```
int x = 0;
#pragma omp simd reduction(inscan, +: x)
for (..) {
<first part>
#pragma omp scan exclusive(x)
<second part>
}
```
into
```
int x = 0;
for (..) {
int x_priv = 0;
<second part>
int temp = x;
x = x_priv + x;
x_priv = temp;
<first part>
}
```
Differential revision: https://reviews.llvm.org/D78232
More information about the All-commits
mailing list