[Mlir-commits] [mlir] 9a15556 - [OpenACC] add cl::values to ACCImplicitRoutineOptions (#168601)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Nov 18 16:56:28 PST 2025


Author: Scott Manley
Date: 2025-11-18T18:56:24-06:00
New Revision: 9a15556d6d6b207084bea8f02381b0459624a006

URL: https://github.com/llvm/llvm-project/commit/9a15556d6d6b207084bea8f02381b0459624a006
DIFF: https://github.com/llvm/llvm-project/commit/9a15556d6d6b207084bea8f02381b0459624a006.diff

LOG: [OpenACC] add cl::values to ACCImplicitRoutineOptions (#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"

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td b/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
index 970d9304d8289..cad78df2fbb0b 100644
--- a/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.td
@@ -97,7 +97,14 @@ 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::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