Skip to content

Commit 1e0fe3b

Browse files
committed
[OpenMP] Add OutlineableOpenMPOpInterface trait to TargetOp
This patch adds the OutlineableOpenMPOpInterface to omp.target. This prevents other operations inside the target region such as WSLoop from hoisting new allocas outside the region.
1 parent ef1eb50 commit 1e0fe3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ def Target_ExitDataOp: OpenMP_Op<"target_exit_data",
13751375
// 2.14.5 target construct
13761376
//===----------------------------------------------------------------------===//
13771377

1378-
def TargetOp : OpenMP_Op<"target",[AttrSizedOperandSegments]> {
1378+
def TargetOp : OpenMP_Op<"target",[OutlineableOpenMPOpInterface, AttrSizedOperandSegments]> {
13791379
let summary = "target construct";
13801380
let description = [{
13811381
The target construct includes a region of code which is to be executed

0 commit comments

Comments
 (0)