[Mlir-commits] [mlir] [OpenACC] add cl::values to ACCImplicitRoutineOptions (PR #168601)
Scott Manley
llvmlistbot at llvm.org
Tue Nov 18 11:37:00 PST 2025
https://github.com/rscottmanley created https://github.com/llvm/llvm-project/pull/168601
Add the cl::values to the pass options so an assert is not reached when trying to generate a reproducer e.g. "unknown data value for option"
>From da5dab89753b2aa0f35c69fe11610b5c13933895 Mon Sep 17 00:00:00 2001
From: Scott Manley <scmanley at nvidia.com>
Date: Tue, 18 Nov 2025 11:34:06 -0800
Subject: [PATCH] [OpenACC] add cl::values to ACCImplicitRoutineOptions
Add the cl::values to the pass options so an assert is not reached when
trying to generate a reproducer e.g. "unknown data value for option"
---
.../include/mlir/Dialect/OpenACC/Transforms/Passes.td | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td b/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
index 970d9304d8289..0b11f144f9014 100644
--- a/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
@@ -97,7 +97,16 @@ def ACCImplicitRoutine : Pass<"acc-implicit-routine", "mlir::ModuleOp"> {
"mlir::acc::DeviceType::None",
"Target device type for implicit routine generation. "
"Ensures that `acc routine` device_type clauses are "
- "properly considered not just default clauses.">
+ "properly considered not just default clauses.",
+ [{::llvm::cl::values(
+ clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
+ clEnumValN(mlir::acc::DeviceType::Star, "*", "*"),
+ clEnumValN(mlir::acc::DeviceType::Default, "default", "default"),
+ clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
+ clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
+ clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
+ clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
+ }]>
];
}
More information about the Mlir-commits
mailing list