Alexey Bataev
bd1c03d7b7
[OPENMP50]Codegen for inscan reductions in worksharing directives.
...
Summary:
Implemented codegen for reduction clauses with inscan modifiers in
worksharing constructs.
Emits the code for the directive with inscan reductions.
The code is the following:
```
size num_iters = <num_iters>;
<type> buffer[num_iters];
for (i: 0..<num_iters>) {
<input phase>;
buffer[i] = red;
}
for (int k = 0; k != ceil(log2(num_iters)); ++k)
for (size cnt = last_iter; cnt >= pow(2, k); --k)
buffer[i] op= buffer[i-pow(2,k)];
for (0..<num_iters>) {
red = InclusiveScan ? buffer[i] : buffer[i-1];
<scan phase>;
}
```
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, arphaman, cfe-commits, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79948
2020-06-04 16:29:33 -04:00
Alexey Bataev
49764dc30c
[OPENMP50]Add basic support for inscan reduction modifier.
...
Added basic support (parsing/sema checks) for the inscan modifier in the
reduction clauses.
2020-03-27 13:54:38 -04:00
Alexey Bataev
ee27df5552
Revert "[OPENMP50]Add basic support for inscan reduction modifier."
...
This reverts commit 36ed0ceec7
to fix a
crash in scan_messages.cpp test.
2020-03-27 11:25:47 -04:00
Alexey Bataev
36ed0ceec7
[OPENMP50]Add basic support for inscan reduction modifier.
...
Added basic support (parsing/sema checks) for the inscan modifier in the
reduction clauses.
2020-03-27 10:38:25 -04:00
Alexey Bataev
2a43a1610d
[OPENMP50]Fix the checks for the nesting of scan directives.
...
Fixed the check for the orhaned scan directives and improved checks for
parallel for and parallel for simd directives.
2020-03-26 17:30:02 -04:00
Alexey Bataev
f9e71f4d9d
Revert "[OPENMP50]Add basic support for inscan reduction modifier."
...
This reverts commit 8099e0fe82
to fix the
problems with the Windows-based buildbots.
2020-03-26 15:57:19 -04:00
Alexey Bataev
8099e0fe82
[OPENMP50]Add basic support for inscan reduction modifier.
...
Added basic support (parsing/sema checks) for the inscan modifier in the
reduction clauses.
2020-03-26 14:51:09 -04:00
Alexey Bataev
63828a35da
[OPENMP50]Bassic support for exclusive clause.
...
Added basic support (parsing/sema/serialization) for exclusive clause in
scan directives.
2020-03-23 13:12:52 -04:00
Alexey Bataev
9b95929a26
[OPENMP50]Do not allow several scan directives in the same parent
...
region.
According to OpenMP 5.0, exactly one scan directive must appear in the loop body of an enclosing worksharing-loop, worksharing-loop SIMD, or simd construct on which a reduction clause with the inscan modifier is present.
2020-03-20 15:45:31 -04:00
Alexey Bataev
06dea73307
[OPENMP50]Initial support for inclusive clause.
...
Added parsing/sema/serialization support for inclusive clause in scan
directive.
2020-03-20 14:20:38 -04:00
Alexey Bataev
fcba7c3534
[OPENMP50]Initial support for scan directive.
...
Addedi basic parsing/sema/serialization support for scan directive.
2020-03-20 07:58:15 -04:00