Open yanyh15 opened 4 years ago
SgOmpForStatement
is used to represent loop worksharing in the REX compiler. To implement UPIR, we rename this node to SgUpirLoopParallelStatement
for worksharing. In addition, SgUpirLoopStatement
is implemented for the affine loop.
Given a loop in OpenMP:
#pragma omp for
for (int i = 0; i < 10; i++)
...
Originally, we have:
SgOmpForStatement
for-loop
In UPIR:
SgUpirLoopParallelStatement
SgUpirLoopStatement
for-loop
The syntax of the worksharing-loop construct is as follows
where
loop-nest
is a canonical loop nest andclause
is one of the following:XOMP for worksharing-loop are currently as follows:
APIs of kmp and gomp for parallel directive
Handling of clauses
Compilation
Tests