forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a new op to the OpenMP dialect: `PrivateClauseOp`. This op will be later used to model `[first]private` clauses for differnt OpenMP directives. This is part of productizing the "delayed privatization" PoC wich can be found in llvm#79862.
- Loading branch information
Showing
4 changed files
with
250 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// RUN: mlir-opt -verify-diagnostics %s | mlir-opt | FileCheck %s | ||
|
||
// CHECK: omp.private {type = private} @x.privatizer : !llvm.ptr alloc { | ||
omp.private {type = private} @x.privatizer : !llvm.ptr alloc { | ||
// CHECK: ^bb0(%arg0: {{.*}}): | ||
^bb0(%arg0: !llvm.ptr): | ||
omp.yield(%arg0 : !llvm.ptr) | ||
} | ||
|
||
// CHECK: omp.private {type = firstprivate} @y.privatizer : !llvm.ptr alloc { | ||
omp.private {type = firstprivate} @y.privatizer : !llvm.ptr alloc { | ||
// CHECK: ^bb0(%arg0: {{.*}}): | ||
^bb0(%arg0: !llvm.ptr): | ||
omp.yield(%arg0 : !llvm.ptr) | ||
// CHECK: } copy { | ||
} copy { | ||
// CHECK: ^bb0(%arg0: {{.*}}, %arg1: {{.*}}): | ||
^bb0(%arg0: !llvm.ptr, %arg1: !llvm.ptr): | ||
omp.yield(%arg0 : !llvm.ptr) | ||
} | ||
|