Skip to content

Commit b5d2c84

Browse files
[mlir][OpenMP] - Transform target offloading directives with dependencies during PFT to MLIR conversion
This patch changes PFT to MLIR lowering for the following directives when they have the `depend` clause on them. !$ omp target depend(..) !$ omp target enter data depend(..) !$ omp target update data depend(..) !$ omp target exit data depend(..) Lowering now involves the creation of an `omp.task` operation that encloses the `omp.target` operation that is otherwise generated for the target construct. In addition, the depend clause from the target is moved to the enclosing new `omp.task`. The new `omp.task` is a mergeable task. ``` !$ omp target map(..) depend(in:a) b = a ``` is transformed to the following MLIR ``` omp.task mergeable depend(in:a) { omp.target map(..) { //MLIR for b = a; } omp.terminator } ```
1 parent b1d66da commit b5d2c84

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/lib/Lower/OpenMP/ClauseProcessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,7 @@ bool ClauseProcessor::processTargetDepend(
817817
firOpBuilder.setInsertionPointToStart(&taskOp.getRegion().front());
818818
return true;
819819
}
820+
820821
bool ClauseProcessor::processIf(
821822
omp::clause::If::DirectiveNameModifier directiveName,
822823
mlir::omp::IfClauseOps &result) const {

0 commit comments

Comments
 (0)