[llvm] [Option] Add BoolOrDefault for OptionalBoolField and DefaultOnOffField (PR #228835)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 3 23:57:03 PDT 2026


================
@@ -137,48 +137,47 @@ STATISTIC(NumDbgValueMoved, "Number of debug value instructions moved");
 STATISTIC(NumSelectsExpanded, "Number of selects turned into branches");
 STATISTIC(NumStoreExtractExposed, "Number of store(extractelement) exposed");
 
-static cl::opt<bool> DisableBranchOpts(
-    "disable-cgp-branch-opts", cl::Hidden, cl::init(false),
-    cl::desc("Disable branch optimizations in CodeGenPrepare"));
+static cl::opt<bool>
+    EnableBranchOpts("cgp-branch-opts", cl::Hidden, cl::init(true),
+                     cl::desc("Enable branch optimizations in CodeGenPrepare"));
 
 static cl::opt<bool>
-    DisableGCOpts("disable-cgp-gc-opts", cl::Hidden, cl::init(false),
-                  cl::desc("Disable GC optimizations in CodeGenPrepare"));
+    EnableGCOpts("cgp-gc-opts", cl::Hidden, cl::init(true),
+                 cl::desc("Enable GC optimizations in CodeGenPrepare"));
 
 static cl::opt<bool>
-    DisableSelectToBranch("disable-cgp-select2branch", cl::Hidden,
-                          cl::init(false),
-                          cl::desc("Disable select to branch conversion."));
+    EnableSelectToBranch("cgp-select2branch", cl::Hidden, cl::init(true),
+                         cl::desc("Enable select to branch conversion."));
 
 static cl::opt<bool>
-    AddrSinkUsingGEPs("addr-sink-using-gep", cl::Hidden, cl::init(true),
+    AddrSinkUsingGEPs("cgp-addr-sink-using-gep", cl::Hidden, cl::init(true),
                       cl::desc("Address sinking in CGP using GEPs."));
 
 static cl::opt<bool>
-    EnableAndCmpSinking("enable-andcmp-sinking", cl::Hidden, cl::init(true),
+    EnableAndCmpSinking("cgp-andcmp-sinking", cl::Hidden, cl::init(true),
                         cl::desc("Enable sinking and/cmp into branches."));
 
-static cl::opt<bool> DisableStoreExtract(
-    "disable-cgp-store-extract", cl::Hidden, cl::init(false),
-    cl::desc("Disable store(extract) optimizations in CodeGenPrepare"));
+static cl::opt<bool> EnableStoreExtract(
----------------
MaskRay wrote:

Removed. Mixed pr-shadow and `gh stack`...

https://github.com/llvm/llvm-project/pull/228835


More information about the llvm-commits mailing list