[Mlir-commits] [mlir] 1e0fe3b - [OpenMP] Add OutlineableOpenMPOpInterface trait to TargetOp

Akash Banerjee llvmlistbot at llvm.org
Thu Sep 28 08:48:41 PDT 2023


Author: Akash Banerjee
Date: 2023-09-28T16:48:33+01:00
New Revision: 1e0fe3bc3cdf23fe54c04565d09b18a494710e3f

URL: https://github.com/llvm/llvm-project/commit/1e0fe3bc3cdf23fe54c04565d09b18a494710e3f
DIFF: https://github.com/llvm/llvm-project/commit/1e0fe3bc3cdf23fe54c04565d09b18a494710e3f.diff

LOG: [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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
index bcd60d8046c8925..5da05476a683725 100644
--- a/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
@@ -1375,7 +1375,7 @@ def Target_ExitDataOp: OpenMP_Op<"target_exit_data",
 // 2.14.5 target construct
 //===----------------------------------------------------------------------===//
 
-def TargetOp : OpenMP_Op<"target",[AttrSizedOperandSegments]> {
+def TargetOp : OpenMP_Op<"target",[OutlineableOpenMPOpInterface, AttrSizedOperandSegments]> {
   let summary = "target construct";
   let description = [{
     The target construct includes a region of code which is to be executed


        


More information about the Mlir-commits mailing list