@@ -284,6 +284,15 @@ def EmptyTensorToAllocTensorPass : Pass<"empty-tensor-to-alloc-tensor"> {
284
284
let dependentDialects = ["tensor::TensorDialect"];
285
285
}
286
286
287
+ def layoutMapClValues {
288
+ string values = [{
289
+ ::llvm::cl::values(
290
+ clEnumValN(LayoutMapOption::InferLayoutMap, "infer-layout-map", ""),
291
+ clEnumValN(LayoutMapOption::IdentityLayoutMap, "identity-layout-map", ""),
292
+ clEnumValN(LayoutMapOption::FullyDynamicLayoutMap, "fully-dynamic-layout-map", "")
293
+ )}];
294
+ }
295
+
287
296
def OneShotBufferizePass : Pass<"one-shot-bufferize", "ModuleOp"> {
288
297
let summary = "One-Shot Bufferize";
289
298
let description = [{
@@ -424,9 +433,10 @@ def OneShotBufferizePass : Pass<"one-shot-bufferize", "ModuleOp"> {
424
433
"Skip analysis of functions with these symbol names."
425
434
"Set copyBeforeWrite to true when bufferizing them.">,
426
435
Option<"functionBoundaryTypeConversion",
427
- "function-boundary-type-conversion", "std::string",
428
- /*default=*/"\"infer-layout-map\"",
429
- "Controls layout maps when bufferizing function signatures.">,
436
+ "function-boundary-type-conversion", "LayoutMapOption",
437
+ /*default=*/"LayoutMapOption::InferLayoutMap",
438
+ "Controls layout maps when bufferizing function signatures.",
439
+ layoutMapClValues.values>,
430
440
Option<"mustInferMemorySpace", "must-infer-memory-space", "bool",
431
441
/*default=*/"false",
432
442
"The memory space of an memref types must always be inferred. If "
@@ -444,9 +454,10 @@ def OneShotBufferizePass : Pass<"one-shot-bufferize", "ModuleOp"> {
444
454
/*default=*/"false",
445
455
"Test only: Annotate IR with RaW conflicts. Requires "
446
456
"test-analysis-only.">,
447
- Option<"unknownTypeConversion", "unknown-type-conversion", "std::string",
448
- /*default=*/"\"fully-dynamic-layout-map\"",
449
- "Controls layout maps for non-inferrable memref types.">,
457
+ Option<"unknownTypeConversion", "unknown-type-conversion", "LayoutMapOption",
458
+ /*default=*/"LayoutMapOption::FullyDynamicLayoutMap",
459
+ "Controls layout maps for non-inferrable memref types.",
460
+ layoutMapClValues.values>,
450
461
Option<"bufferAlignment", "buffer-alignment", "uint64_t",
451
462
/*default=*/"64",
452
463
"Sets the alignment of newly allocated buffers.">,
0 commit comments