@@ -32,9 +32,17 @@ def Canonicalizer : Pass<"canonicalize"> {
3232 Option<"topDownProcessingEnabled", "top-down", "bool",
3333 /*default=*/"true",
3434 "Seed the worklist in general top-down order">,
35- Option<"enableRegionSimplification", "region-simplify", "bool",
36- /*default=*/"true",
37- "Perform control flow optimizations to the region tree">,
35+ Option<"enableRegionSimplification", "region-simplify", "mlir::GreedySimplifyRegionLevel",
36+ /*default=*/"mlir::GreedySimplifyRegionLevel::Normal",
37+ "Perform control flow optimizations to the region tree",
38+ [{::llvm::cl::values(
39+ clEnumValN(mlir::GreedySimplifyRegionLevel::Disabled, "disabled",
40+ "Don't run any control-flow simplification."),
41+ clEnumValN(mlir::GreedySimplifyRegionLevel::Normal, "normal",
42+ "Perform simple control-flow simplifications (e.g. dead args elimination)."),
43+ clEnumValN(mlir::GreedySimplifyRegionLevel::Aggressive, "aggressive",
44+ "Perform aggressive control-flow simplification (e.g. block merging).")
45+ )}]>,
3846 Option<"maxIterations", "max-iterations", "int64_t",
3947 /*default=*/"10",
4048 "Max. iterations between applying patterns / simplifying regions">,
0 commit comments