[Mlir-commits] [mlir] [NFC][MLIR][OpenMP] Correct attach_none to attach_never (PR #176855)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 19 21:01:35 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: None (agozillon)
<details>
<summary>Changes</summary>
Originally gave attach_never the incorrect name, so this patch corrects that to keep things consistent everywhere.
---
Full diff: https://github.com/llvm/llvm-project/pull/176855.diff
3 Files Affected:
- (modified) mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td (+2-2)
- (modified) mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp (+4-4)
- (modified) mlir/test/Dialect/OpenMP/ops.mlir (+2-2)
``````````diff
diff --git a/mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td b/mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td
index ea5489faaf4fc..707850cbb47b7 100644
--- a/mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td
+++ b/mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td
@@ -123,7 +123,7 @@ def ClauseMapFlagsPresent : I32BitEnumAttrCaseBit<"present", 10>;
def ClauseMapFlagsOMPXHold : I32BitEnumAttrCaseBit<"ompx_hold", 11>;
def ClauseMapFlagsAttach : I32BitEnumAttrCaseBit<"attach", 12>;
def ClauseMapFlagsAttachAlways : I32BitEnumAttrCaseBit<"attach_always", 13>;
-def ClauseMapFlagsAttachNone : I32BitEnumAttrCaseBit<"attach_none", 14>;
+def ClauseMapFlagsAttachNever : I32BitEnumAttrCaseBit<"attach_never", 14>;
def ClauseMapFlagsAttachAuto : I32BitEnumAttrCaseBit<"attach_auto", 15>;
def ClauseMapFlagsRefPtr : I32BitEnumAttrCaseBit<"ref_ptr", 16>;
def ClauseMapFlagsRefPtee : I32BitEnumAttrCaseBit<"ref_ptee", 17>;
@@ -148,7 +148,7 @@ def ClauseMapFlags : OpenMP_BitEnumAttr<
ClauseMapFlagsOMPXHold,
ClauseMapFlagsAttach,
ClauseMapFlagsAttachAlways,
- ClauseMapFlagsAttachNone,
+ ClauseMapFlagsAttachNever,
ClauseMapFlagsAttachAuto,
ClauseMapFlagsRefPtr,
ClauseMapFlagsRefPtee,
diff --git a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index cf25fc53e0238..be067008cb939 100644
--- a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -1803,8 +1803,8 @@ static ParseResult parseMapClause(OpAsmParser &parser,
if (mapTypeMod == "attach_always")
mapTypeBits |= ClauseMapFlags::attach_always;
- if (mapTypeMod == "attach_none")
- mapTypeBits |= ClauseMapFlags::attach_none;
+ if (mapTypeMod == "attach_never")
+ mapTypeBits |= ClauseMapFlags::attach_never;
if (mapTypeMod == "attach_auto")
mapTypeBits |= ClauseMapFlags::attach_auto;
@@ -1880,8 +1880,8 @@ static void printMapClause(OpAsmPrinter &p, Operation *op,
mapTypeStrs.push_back("attach");
if (mapTypeToBool(mapFlags, ClauseMapFlags::attach_always))
mapTypeStrs.push_back("attach_always");
- if (mapTypeToBool(mapFlags, ClauseMapFlags::attach_none))
- mapTypeStrs.push_back("attach_none");
+ if (mapTypeToBool(mapFlags, ClauseMapFlags::attach_never))
+ mapTypeStrs.push_back("attach_never");
if (mapTypeToBool(mapFlags, ClauseMapFlags::attach_auto))
mapTypeStrs.push_back("attach_auto");
if (mapTypeToBool(mapFlags, ClauseMapFlags::ref_ptr))
diff --git a/mlir/test/Dialect/OpenMP/ops.mlir b/mlir/test/Dialect/OpenMP/ops.mlir
index 902d962138fc9..c583d0ad3a8d3 100644
--- a/mlir/test/Dialect/OpenMP/ops.mlir
+++ b/mlir/test/Dialect/OpenMP/ops.mlir
@@ -3340,7 +3340,7 @@ func.func @omp_target_map_clause_type_test(%arg0 : memref<?xi32>) -> () {
// CHECK: %{{.*}}map_clauses(ompx_hold){{.*}}
// CHECK: %{{.*}}map_clauses(attach){{.*}}
// CHECK: %{{.*}}map_clauses(attach_always){{.*}}
- // CHECK: %{{.*}}map_clauses(attach_none){{.*}}
+ // CHECK: %{{.*}}map_clauses(attach_never){{.*}}
// CHECK: %{{.*}}map_clauses(attach_auto){{.*}}
// CHECK: %{{.*}}map_clauses(ref_ptr){{.*}}
// CHECK: %{{.*}}map_clauses(ref_ptee){{.*}}
@@ -3360,7 +3360,7 @@ func.func @omp_target_map_clause_type_test(%arg0 : memref<?xi32>) -> () {
%mapv12 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(ompx_hold) capture(ByRef) -> memref<?xi32> {name = ""}
%mapv13 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(attach) capture(ByRef) -> memref<?xi32> {name = ""}
%mapv14 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(attach_always) capture(ByRef) -> memref<?xi32> {name = ""}
- %mapv15 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(attach_none) capture(ByRef) -> memref<?xi32> {name = ""}
+ %mapv15 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(attach_never) capture(ByRef) -> memref<?xi32> {name = ""}
%mapv16 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(attach_auto) capture(ByRef) -> memref<?xi32> {name = ""}
%mapv17 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(ref_ptr) capture(ByRef) -> memref<?xi32> {name = ""}
%mapv18 = omp.map.info var_ptr(%arg0 : memref<?xi32>, tensor<?xi32>) map_clauses(ref_ptee) capture(ByRef) -> memref<?xi32> {name = ""}
``````````
</details>
https://github.com/llvm/llvm-project/pull/176855
More information about the Mlir-commits
mailing list