Author: Fangrui Song
Date: 2026-09-23T23:19:28-07:00
New Revision: cd417a78a709c206b7079f484aa67388b2ae4c8f

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

LOG: Remove unneeded cl::Optional and cl::ZeroOrMore. NFC (#225628)

cl::Optional and cl::ZeroOrMore on a named argument have been no-op
since https://reviews.llvm.org/D120455 removed the "may only occur zero
or one times!" error.

LLM-aided

Added: 
    

Modified: 
    bolt/lib/Core/BinaryContext.cpp
    bolt/lib/Core/BinaryFunction.cpp
    bolt/lib/Core/BinaryFunctionProfile.cpp
    bolt/lib/Passes/BinaryPasses.cpp
    bolt/lib/Passes/FrameAnalysis.cpp
    bolt/lib/Passes/FrameOptimizer.cpp
    bolt/lib/Passes/IdenticalCodeFolding.cpp
    bolt/lib/Passes/IndirectCallPromotion.cpp
    bolt/lib/Passes/JTFootprintReduction.cpp
    bolt/lib/Passes/PLTCall.cpp
    bolt/lib/Passes/ProfileQualityStats.cpp
    bolt/lib/Passes/ReorderAlgorithm.cpp
    bolt/lib/Passes/ReorderData.cpp
    bolt/lib/Passes/ReorderFunctions.cpp
    bolt/lib/Passes/RetpolineInsertion.cpp
    bolt/lib/Passes/ShrinkWrapping.cpp
    bolt/lib/Passes/TailDuplication.cpp
    bolt/lib/Profile/DataAggregator.cpp
    bolt/lib/Rewrite/BinaryPassManager.cpp
    bolt/lib/Rewrite/DWARFRewriter.cpp
    bolt/lib/Rewrite/RewriteInstance.cpp
    bolt/lib/Utils/CommandLineOpts.cpp
    clang/lib/CodeGen/CoverageMappingGen.cpp
    llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    llvm/lib/Transforms/IPO/Instrumentor.cpp
    polly/lib/CodeGen/LoopGenerators.cpp
    polly/lib/Support/PollyDebug.cpp
    polly/lib/Transform/MatmulOptimizer.cpp
    polly/lib/Transform/ScheduleOptimizer.cpp

Removed: 
    


################################################################################
diff  --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp
index ae320ab695af3..8e479b92bc75b 100644
--- a/bolt/lib/Core/BinaryContext.cpp
+++ b/bolt/lib/Core/BinaryContext.cpp
@@ -65,7 +65,6 @@ static cl::opt<bool>
 PrintDebugInfo("print-debug-info",
   cl::desc("print debug info when printing functions"),
   cl::Hidden,
-  cl::ZeroOrMore,
   cl::cat(BoltCategory));
 
 cl::opt<bool> PrintRelocations(
@@ -77,7 +76,6 @@ static cl::opt<bool>
 PrintMemData("print-mem-data",
   cl::desc("print memory data annotations when printing functions"),
   cl::Hidden,
-  cl::ZeroOrMore,
   cl::cat(BoltCategory));
 
 cl::opt<std::string> CompDirOverride(
@@ -90,12 +88,12 @@ cl::opt<std::string> CompDirOverride(
 static cl::opt<bool> CloneConstantIsland("clone-constant-island",
                                          cl::desc("clone constant islands"),
                                          cl::Hidden, cl::init(true),
-                                         cl::ZeroOrMore, 
cl::cat(BoltCategory));
+                                         cl::cat(BoltCategory));
 
 static cl::opt<bool>
     FailOnInvalidPadding("fail-on-invalid-padding", cl::Hidden, 
cl::init(false),
                          cl::desc("treat invalid code padding as error"),
-                         cl::ZeroOrMore, cl::cat(BoltCategory));
+                         cl::cat(BoltCategory));
 
 static cl::opt<bool> DropDWOPageCache(
     "drop-dwo-page-cache",

diff  --git a/bolt/lib/Core/BinaryFunction.cpp 
b/bolt/lib/Core/BinaryFunction.cpp
index 39c4dd5595e3c..69eec01e098c1 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -103,7 +103,6 @@ JumpTables("jump-tables",
       clEnumValN(JTS_AGGRESSIVE, "aggressive",
                  "aggressively split jump tables section based on usage "
                  "of the tables")),
-  cl::ZeroOrMore,
   cl::cat(BoltOptCategory));
 
 static cl::opt<bool> NoScan(
@@ -141,7 +140,7 @@ static cl::opt<bool> TrapOnAVX512(
     "trap-avx512",
     cl::desc("in relocation mode trap upon entry to any function that uses "
              "AVX-512 instructions"),
-    cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory));
+    cl::init(false), cl::Hidden, cl::cat(BoltCategory));
 
 bool shouldPrint(const BinaryFunction &Function) {
   // PLT stubs are disassembled for BTI binaries, therefore they should be

diff  --git a/bolt/lib/Core/BinaryFunctionProfile.cpp 
b/bolt/lib/Core/BinaryFunctionProfile.cpp
index d30d08021f3c3..aed94e8a80073 100644
--- a/bolt/lib/Core/BinaryFunctionProfile.cpp
+++ b/bolt/lib/Core/BinaryFunctionProfile.cpp
@@ -36,7 +36,7 @@ cl::opt<IndirectCallPromotionType> ICP(
         clEnumValN(ICP_JUMP_TABLES, "jump-tables",
                    "perform ICP on jump tables"),
         clEnumValN(ICP_ALL, "all", "perform ICP on calls and jump tables")),
-    cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::cat(BoltOptCategory));
 
 static cl::alias ICPAlias("icp",
                           cl::desc("Alias for --indirect-call-promotion"),

diff  --git a/bolt/lib/Passes/BinaryPasses.cpp 
b/bolt/lib/Passes/BinaryPasses.cpp
index 16b1752c1db86..b36674344b17f 100644
--- a/bolt/lib/Passes/BinaryPasses.cpp
+++ b/bolt/lib/Passes/BinaryPasses.cpp
@@ -79,7 +79,6 @@ HotTextMoveSections("hot-text-move-sections",
            "the hot text. (default=\'.stub,.mover\')."),
   cl::value_desc("sec1,sec2,sec3,..."),
   cl::CommaSeparated,
-  cl::ZeroOrMore,
   cl::cat(BoltCategory));
 
 bool isHotTextMover(const BinaryFunction &Function) {
@@ -110,7 +109,7 @@ static cl::list<Peepholes::PeepholeOpts> Peepholes(
                           "remove useless conditional branches"),
                clEnumValN(Peepholes::PEEP_ALL, "all",
                           "enable all peephole optimizations")),
-    cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::cat(BoltOptCategory));
 
 static cl::opt<unsigned>
     PrintFuncStat("print-function-statistics",
@@ -135,7 +134,7 @@ static cl::list<bolt::DynoStats::Category>
 #undef D
                           clEnumValN(bolt::DynoStats::LAST_DYNO_STAT, "all",
                                      "sorted by all names")),
-                  cl::ZeroOrMore, cl::cat(BoltOptCategory));
+                  cl::cat(BoltOptCategory));
 
 static cl::opt<bool>
     PrintUnknown("print-unknown",
@@ -173,7 +172,7 @@ cl::opt<bolt::ReorderBasicBlocks::LayoutType> ReorderBlocks(
                    "perform layout optimizing I-cache behavior"),
         clEnumValN(bolt::ReorderBasicBlocks::LT_OPTIMIZE_SHUFFLE,
                    "cluster-shuffle", "perform random layout of clusters")),
-    cl::ZeroOrMore, cl::cat(BoltOptCategory),
+    cl::cat(BoltOptCategory),
     cl::callback([](const bolt::ReorderBasicBlocks::LayoutType &option) {
       if (option == bolt::ReorderBasicBlocks::LT_OPTIMIZE_CACHE_PLUS) {
         errs() << "BOLT-WARNING: '-reorder-blocks=cache+' is deprecated, 
please"
@@ -210,7 +209,6 @@ SctcMode("sctc-mode",
     clEnumValN(SctcHeuristic,
       "heuristic",
       "use branch prediction data to control sctc")),
-  cl::ZeroOrMore,
   cl::cat(BoltOptCategory));
 
 static cl::opt<unsigned>

diff  --git a/bolt/lib/Passes/FrameAnalysis.cpp 
b/bolt/lib/Passes/FrameAnalysis.cpp
index 0b26da3371234..b5a50417285ba 100644
--- a/bolt/lib/Passes/FrameAnalysis.cpp
+++ b/bolt/lib/Passes/FrameAnalysis.cpp
@@ -41,7 +41,7 @@ static cl::opt<bool> TimeFA("time-fa", cl::desc("time frame 
analysis steps"),
 static cl::opt<bool>
     ExperimentalSW("experimental-shrink-wrapping",
                    cl::desc("process functions with stack pointer arithmetic"),
-                   cl::ReallyHidden, cl::ZeroOrMore, cl::cat(BoltOptCategory));
+                   cl::ReallyHidden, cl::cat(BoltOptCategory));
 
 bool shouldFrameOptimize(const llvm::bolt::BinaryFunction &Function) {
   if (Function.hasUnknownControlFlow())

diff  --git a/bolt/lib/Passes/FrameOptimizer.cpp 
b/bolt/lib/Passes/FrameOptimizer.cpp
index b0b7207feac01..344c6a234e0c4 100644
--- a/bolt/lib/Passes/FrameOptimizer.cpp
+++ b/bolt/lib/Passes/FrameOptimizer.cpp
@@ -40,7 +40,6 @@ FrameOptimization("frame-opt",
     clEnumValN(FOP_NONE, "none", "do not perform frame optimization"),
     clEnumValN(FOP_HOT, "hot", "perform FOP on hot functions"),
     clEnumValN(FOP_ALL, "all", "perform FOP on all functions")),
-  cl::ZeroOrMore,
   cl::cat(BoltOptCategory));
 
 static cl::opt<bool> RemoveStores(

diff  --git a/bolt/lib/Passes/IdenticalCodeFolding.cpp 
b/bolt/lib/Passes/IdenticalCodeFolding.cpp
index 18c901e45116f..0c8f01e103a4b 100644
--- a/bolt/lib/Passes/IdenticalCodeFolding.cpp
+++ b/bolt/lib/Passes/IdenticalCodeFolding.cpp
@@ -43,7 +43,6 @@ static cl::opt<bool>
 TimeICF("time-icf",
   cl::desc("time icf steps"),
   cl::ReallyHidden,
-  cl::ZeroOrMore,
   cl::cat(BoltOptCategory));
 
 cl::opt<bolt::IdenticalCodeFolding::ICFLevel, false,
@@ -63,7 +62,7 @@ cl::opt<bolt::IdenticalCodeFolding::ICFLevel, false,
                               "Disable identical code folding (default)"),
                    clEnumValN(bolt::IdenticalCodeFolding::ICFLevel::Safe,
                               "safe", "Enable safe identical code folding")),
-        cl::ZeroOrMore, cl::ValueOptional, cl::cat(BoltOptCategory));
+        cl::ValueOptional, cl::cat(BoltOptCategory));
 } // namespace opts
 
 bool IdenticalCodeFolding::shouldOptimize(const BinaryFunction &BF) const {

diff  --git a/bolt/lib/Passes/IndirectCallPromotion.cpp 
b/bolt/lib/Passes/IndirectCallPromotion.cpp
index 39ae4cda145c4..3384dba63453c 100644
--- a/bolt/lib/Passes/IndirectCallPromotion.cpp
+++ b/bolt/lib/Passes/IndirectCallPromotion.cpp
@@ -39,7 +39,7 @@ static cl::opt<unsigned> ICPJTRemainingPercentThreshold(
     "icp-jt-remaining-percent-threshold",
     cl::desc("The percentage threshold against remaining unpromoted indirect "
              "call count for the promotion for jump tables"),
-    cl::init(30), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
+    cl::init(30), cl::Hidden, cl::cat(BoltOptCategory));
 
 static cl::opt<unsigned> ICPJTTotalPercentThreshold(
     "icp-jt-total-percent-threshold",

diff  --git a/bolt/lib/Passes/JTFootprintReduction.cpp 
b/bolt/lib/Passes/JTFootprintReduction.cpp
index afd6c0953b906..f33481397543a 100644
--- a/bolt/lib/Passes/JTFootprintReduction.cpp
+++ b/bolt/lib/Passes/JTFootprintReduction.cpp
@@ -32,7 +32,7 @@ static cl::opt<bool> JTFootprintOnlyPIC(
     "jt-footprint-optimize-for-icache",
     cl::desc("with jt-footprint-reduction, only process PIC jumptables and 
turn"
              " off other transformations that increase code size"),
-    cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::init(false), cl::cat(BoltOptCategory));
 
 } // namespace opts
 

diff  --git a/bolt/lib/Passes/PLTCall.cpp b/bolt/lib/Passes/PLTCall.cpp
index a41b3870af666..c9b66c6fff927 100644
--- a/bolt/lib/Passes/PLTCall.cpp
+++ b/bolt/lib/Passes/PLTCall.cpp
@@ -33,7 +33,7 @@ static cl::opt<bolt::PLTCall::OptType>
                               "optimize executed (hot) PLT calls"),
                    clEnumValN(bolt::PLTCall::OT_ALL, "all",
                               "optimize all PLT calls")),
-        cl::ZeroOrMore, cl::cat(BoltOptCategory));
+        cl::cat(BoltOptCategory));
 }
 
 namespace llvm {

diff  --git a/bolt/lib/Passes/ProfileQualityStats.cpp 
b/bolt/lib/Passes/ProfileQualityStats.cpp
index f88133714e206..877f689f8d449 100644
--- a/bolt/lib/Passes/ProfileQualityStats.cpp
+++ b/bolt/lib/Passes/ProfileQualityStats.cpp
@@ -29,12 +29,12 @@ static cl::opt<unsigned> TopFunctionsForProfileQualityCheck(
     "top-functions-for-profile-quality-check",
     cl::desc("number of hottest functions to print aggregated "
              "profile quality stats of."),
-    cl::init(1000), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
+    cl::init(1000), cl::Hidden, cl::cat(BoltOptCategory));
 static cl::opt<unsigned> PercentileForProfileQualityCheck(
     "percentile-for-profile-quality-check",
     cl::desc("Percentile of profile quality distributions over hottest "
              "functions to report."),
-    cl::init(95), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
+    cl::init(95), cl::Hidden, cl::cat(BoltOptCategory));
 } // namespace opts
 
 namespace {

diff  --git a/bolt/lib/Passes/ReorderAlgorithm.cpp 
b/bolt/lib/Passes/ReorderAlgorithm.cpp
index 8fa6b2c53dc87..eb6cfabf4014f 100644
--- a/bolt/lib/Passes/ReorderAlgorithm.cpp
+++ b/bolt/lib/Passes/ReorderAlgorithm.cpp
@@ -37,7 +37,7 @@ static cl::opt<unsigned> ColdThreshold(
              "threshold when evaluating whether a basic block is cold "
              "(0 means it is only considered cold if the block has zero "
              "samples). Default: 0 "),
-    cl::init(0), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
+    cl::init(0), cl::Hidden, cl::cat(BoltOptCategory));
 
 static cl::opt<bool> PrintClusters("print-clusters", cl::desc("print 
clusters"),
                                    cl::Hidden, cl::cat(BoltOptCategory));

diff  --git a/bolt/lib/Passes/ReorderData.cpp b/bolt/lib/Passes/ReorderData.cpp
index cdb38021965f5..a9fb80e645681 100644
--- a/bolt/lib/Passes/ReorderData.cpp
+++ b/bolt/lib/Passes/ReorderData.cpp
@@ -52,7 +52,6 @@ ReorderAlgorithm("reorder-data-algo",
     clEnumValN(REORDER_FUNCS,
       "funcs",
       "sort hot data by hot function usage and count")),
-  cl::ZeroOrMore,
   cl::cat(BoltOptCategory));
 
 static cl::opt<unsigned>

diff  --git a/bolt/lib/Passes/ReorderFunctions.cpp 
b/bolt/lib/Passes/ReorderFunctions.cpp
index f38f502e75ced..9fbf73078a537 100644
--- a/bolt/lib/Passes/ReorderFunctions.cpp
+++ b/bolt/lib/Passes/ReorderFunctions.cpp
@@ -53,7 +53,7 @@ cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions(
                           "reorder functions randomly"),
                clEnumValN(bolt::ReorderFunctions::RT_USER, "user",
                           "use function order specified by -function-order")),
-    cl::ZeroOrMore, cl::cat(BoltOptCategory),
+    cl::cat(BoltOptCategory),
     cl::callback([](const bolt::ReorderFunctions::ReorderType &option) {
       if (option == bolt::ReorderFunctions::RT_HFSORT_PLUS) {
         errs() << "BOLT-WARNING: '-reorder-functions=hfsort+' is deprecated,"
@@ -94,7 +94,7 @@ static cl::opt<bool> CgFromPerfData(
     "cg-from-perf-data",
     cl::desc("use perf data directly when constructing the call graph"
              " for stale functions"),
-    cl::init(true), cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::init(true), cl::cat(BoltOptCategory));
 
 static cl::opt<bool> CgIgnoreRecursiveCalls(
     "cg-ignore-recursive-calls",
@@ -105,7 +105,7 @@ static cl::opt<bool> CgUseSplitHotSize(
     "cg-use-split-hot-size",
     cl::desc("use hot/cold data on basic blocks to determine hot sizes for "
              "call graph functions"),
-    cl::init(false), cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::init(false), cl::cat(BoltOptCategory));
 
 } // namespace opts
 

diff  --git a/bolt/lib/Passes/RetpolineInsertion.cpp 
b/bolt/lib/Passes/RetpolineInsertion.cpp
index 4000e59e80ba2..9c3ff80ed6a8c 100644
--- a/bolt/lib/Passes/RetpolineInsertion.cpp
+++ b/bolt/lib/Passes/RetpolineInsertion.cpp
@@ -42,7 +42,7 @@ static llvm::cl::opt<bool>
 static llvm::cl::opt<bool> RetpolineLfence(
     "retpoline-lfence",
     cl::desc("determine if lfence instruction should exist in the retpoline"),
-    cl::init(true), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory));
+    cl::init(true), cl::Hidden, cl::cat(BoltCategory));
 
 static cl::opt<RetpolineInsertion::AvailabilityOptions> R11Availability(
     "r11-availability",
@@ -54,7 +54,7 @@ static cl::opt<RetpolineInsertion::AvailabilityOptions> 
R11Availability(
                           "always", "r11 available before calls and jumps"),
                clEnumValN(RetpolineInsertion::AvailabilityOptions::ABI, "abi",
                           "r11 available before calls but not before jumps")),
-    cl::ZeroOrMore, cl::cat(BoltCategory));
+    cl::cat(BoltCategory));
 
 } // namespace opts
 

diff  --git a/bolt/lib/Passes/ShrinkWrapping.cpp 
b/bolt/lib/Passes/ShrinkWrapping.cpp
index 5f0af2d68182f..e9345a2c033a3 100644
--- a/bolt/lib/Passes/ShrinkWrapping.cpp
+++ b/bolt/lib/Passes/ShrinkWrapping.cpp
@@ -32,7 +32,7 @@ static cl::opt<unsigned> ShrinkWrappingThreshold(
     cl::desc("Percentage of prologue execution count to use as threshold when"
              " evaluating whether a block is cold enough to be profitable to"
              " move eligible spills there"),
-    cl::init(30), cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::init(30), cl::cat(BoltOptCategory));
 } // namespace opts
 
 namespace llvm {

diff  --git a/bolt/lib/Passes/TailDuplication.cpp 
b/bolt/lib/Passes/TailDuplication.cpp
index a4a5876943ec4..c8c9298805268 100644
--- a/bolt/lib/Passes/TailDuplication.cpp
+++ b/bolt/lib/Passes/TailDuplication.cpp
@@ -38,7 +38,7 @@ static cl::opt<bolt::TailDuplication::DuplicationMode> 
TailDuplicationMode(
                           "moderate strategy"),
                clEnumValN(bolt::TailDuplication::TD_CACHE, "cache",
                           "cache-aware duplication strategy")),
-    cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
+    cl::Hidden, cl::cat(BoltOptCategory));
 
 static cl::opt<unsigned>
     TailDuplicationMinimumOffset("tail-duplication-minimum-offset",
@@ -51,7 +51,7 @@ static cl::opt<unsigned> TailDuplicationMaximumDuplication(
     "tail-duplication-maximum-duplication",
     cl::desc("tail blocks whose size (in bytes) exceeds the value are never "
              "duplicated"),
-    cl::ZeroOrMore, cl::ReallyHidden, cl::init(24), cl::cat(BoltOptCategory));
+    cl::ReallyHidden, cl::init(24), cl::cat(BoltOptCategory));
 
 static cl::opt<unsigned> TailDuplicationMinimumDuplication(
     "tail-duplication-minimum-duplication",

diff  --git a/bolt/lib/Profile/DataAggregator.cpp 
b/bolt/lib/Profile/DataAggregator.cpp
index 94952e23ad05e..a18e4d3d3a0d2 100644
--- a/bolt/lib/Profile/DataAggregator.cpp
+++ b/bolt/lib/Profile/DataAggregator.cpp
@@ -88,7 +88,7 @@ static cl::list<unsigned long long>
     FilterPID("pid",
               cl::desc("only use samples from process with specified PID(s) "
                        "(comma-separated)"),
-              cl::CommaSeparated, cl::ZeroOrMore, cl::cat(AggregatorCategory));
+              cl::CommaSeparated, cl::cat(AggregatorCategory));
 
 static cl::opt<bool> ImputeTraceFallthrough(
     "impute-trace-fall-through",
@@ -138,7 +138,6 @@ static cl::opt<bool>
 TimeAggregator("time-aggr",
   cl::desc("time BOLT aggregator"),
   cl::init(false),
-  cl::ZeroOrMore,
   cl::cat(AggregatorCategory));
 
 } // namespace opts

diff  --git a/bolt/lib/Rewrite/BinaryPassManager.cpp 
b/bolt/lib/Rewrite/BinaryPassManager.cpp
index dbbedea2f70bc..11e91630a612d 100644
--- a/bolt/lib/Rewrite/BinaryPassManager.cpp
+++ b/bolt/lib/Rewrite/BinaryPassManager.cpp
@@ -61,10 +61,9 @@ extern cl::opt<bolt::IdenticalCodeFolding::ICFLevel, false,
                llvm::bolt::DeprecatedICFNumericOptionParser>
     ICF;
 
-static cl::opt<bool>
-DynoStatsAll("dyno-stats-all",
-  cl::desc("print dyno stats after each stage"),
-  cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory));
+static cl::opt<bool> DynoStatsAll("dyno-stats-all",
+                                  cl::desc("print dyno stats after each 
stage"),
+                                  cl::Hidden, cl::cat(BoltCategory));
 
 static cl::opt<bool>
     EliminateUnreachable("eliminate-unreachable",
@@ -247,12 +246,13 @@ cl::opt<bool> SimplifyRODataLoads(
              "operand with the constant found in the corresponding section"),
     cl::init(false), cl::cat(BoltOptCategory));
 
-static cl::list<std::string>
-SpecializeMemcpy1("memcpy1-spec",
-  cl::desc("list of functions with call sites for which to specialize memcpy() 
"
-           "for size 1"),
-  cl::value_desc("func1,func2:cs1:cs2,func3:cs1,..."),
-  cl::ZeroOrMore, cl::cat(BoltOptCategory));
+static cl::list<std::string> SpecializeMemcpy1(
+    "memcpy1-spec",
+    cl::desc(
+        "list of functions with call sites for which to specialize memcpy() "
+        "for size 1"),
+    cl::value_desc("func1,func2:cs1:cs2,func3:cs1,..."),
+    cl::cat(BoltOptCategory));
 
 static cl::opt<bool> Stoke("stoke", cl::desc("turn on the stoke analysis"),
                            cl::cat(BoltOptCategory));

diff  --git a/bolt/lib/Rewrite/DWARFRewriter.cpp 
b/bolt/lib/Rewrite/DWARFRewriter.cpp
index 0b4598cccf1c3..acb1ba6c8468b 100644
--- a/bolt/lib/Rewrite/DWARFRewriter.cpp
+++ b/bolt/lib/Rewrite/DWARFRewriter.cpp
@@ -378,8 +378,7 @@ static cl::opt<bool>
     DebugSkeletonCu("debug-skeleton-cu",
                     cl::desc("prints out offsets for abbrev and debug_info of "
                              "Skeleton CUs that get patched."),
-                    cl::ZeroOrMore, cl::Hidden, cl::init(false),
-                    cl::cat(BoltCategory));
+                    cl::Hidden, cl::init(false), cl::cat(BoltCategory));
 
 static cl::opt<unsigned> BatchSize(
     "cu-processing-batch-size",

diff  --git a/bolt/lib/Rewrite/RewriteInstance.cpp 
b/bolt/lib/Rewrite/RewriteInstance.cpp
index d7078907cf514..845fc4661ac13 100644
--- a/bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/bolt/lib/Rewrite/RewriteInstance.cpp
@@ -193,7 +193,6 @@ LiteThresholdPct("lite-threshold-pct",
             "threshold of 90 means only top 10 percent of functions with "
             "profile will be processed."),
   cl::init(0),
-  cl::ZeroOrMore,
   cl::Hidden,
   cl::cat(BoltOptCategory));
 
@@ -284,7 +283,6 @@ static cl::opt<bool>
 UseGnuStack("use-gnu-stack",
   cl::desc("use GNU_STACK program header for new segment (workaround for "
            "issues with strip/objcopy)"),
-  cl::ZeroOrMore,
   cl::cat(BoltCategory));
 
 static cl::opt<uint64_t> CustomAllocationVMA(
@@ -320,7 +318,7 @@ static cl::list<GadgetKindBitmask> GadgetScannersToRun(
         clEnumValN(GS_PTRAUTH_ALL_MASK, "ptrauth-all",
                    "All Pointer Authentication scanners"),
         clEnumValN(GS_ALL_MASK, "all", "All implemented scanners")),
-    cl::ZeroOrMore, cl::CommaSeparated, cl::cat(BinaryAnalysisCategory));
+    cl::CommaSeparated, cl::cat(BinaryAnalysisCategory));
 
 // Primary targets for hooking runtime library initialization hooking
 // with fallback to next item in case if current item is not available
@@ -342,7 +340,7 @@ cl::opt<RuntimeLibInitHookTarget> RuntimeLibInitHook(
                clEnumValN(RLIH_INIT, "init", "use ELF DT_INIT entry"),
                clEnumValN(RLIH_INIT_ARRAY, "init_array",
                           "use ELF .init_array entry")),
-    cl::ZeroOrMore, cl::cat(BoltOptCategory));
+    cl::cat(BoltOptCategory));
 
 } // namespace opts
 

diff  --git a/bolt/lib/Utils/CommandLineOpts.cpp 
b/bolt/lib/Utils/CommandLineOpts.cpp
index 52ed4289927aa..57838e2fe85e7 100644
--- a/bolt/lib/Utils/CommandLineOpts.cpp
+++ b/bolt/lib/Utils/CommandLineOpts.cpp
@@ -57,7 +57,7 @@ cl::opt<bool> AlignBlocks("align-blocks", cl::desc("align 
basic blocks"),
 cl::opt<unsigned> AlignBlocksMinSize(
     "align-blocks-min-size",
     cl::desc("minimal size of the basic block that should be aligned"),
-    cl::init(0), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
+    cl::init(0), cl::Hidden, cl::cat(BoltOptCategory));
 
 cl::opt<unsigned> AlignBlocksThreshold(
     "align-blocks-threshold",
@@ -76,7 +76,7 @@ cl::opt<unsigned> AlignFunctionsMaxBytes(
 cl::opt<unsigned>
     BlockAlignment("block-alignment",
                    cl::desc("boundary to use for alignment of basic blocks"),
-                   cl::init(16), cl::ZeroOrMore, cl::cat(BoltOptCategory));
+                   cl::init(16), cl::cat(BoltOptCategory));
 
 cl::opt<bool>
     PreserveBlocksAlignment("preserve-blocks-alignment",
@@ -119,14 +119,13 @@ cl::opt<bool>
 EnableBAT("enable-bat",
   cl::desc("write BOLT Address Translation tables"),
   cl::init(false),
-  cl::ZeroOrMore,
   cl::cat(BoltCategory));
 
 cl::opt<bool> EqualizeBBCounts(
     "equalize-bb-counts",
     cl::desc("use same count for BBs that should have equivalent count (used "
              "in non-LBR and shrink wrapping)"),
-    cl::ZeroOrMore, cl::init(false), cl::Hidden, cl::cat(BoltOptCategory));
+    cl::init(false), cl::Hidden, cl::cat(BoltOptCategory));
 
 llvm::cl::opt<bool> ForcePatch(
     "force-patch",
@@ -142,7 +141,6 @@ ExecutionCountThreshold("execution-count-threshold",
   cl::desc("perform profiling accuracy-sensitive optimizations only if "
            "function execution count >= the threshold (default: 0)"),
   cl::init(0),
-  cl::ZeroOrMore,
   cl::Hidden,
   cl::cat(BoltOptCategory));
 
@@ -271,7 +269,7 @@ cl::opt<bool> HotText(
         "Generate hot text symbols. Apply this option to a precompiled binary "
         "that manually calls into hugify, such that at runtime hugify call "
         "will put hot code into 2M pages. This requires relocation."),
-    cl::ZeroOrMore, cl::cat(BoltCategory));
+    cl::cat(BoltCategory));
 
 cl::opt<bool> Hugify(
     "hugify",
@@ -337,7 +335,7 @@ cl::opt<ProfileFormatKind> ProfileFormat(
                clEnumValN(PF_PreAgg, "preagg", "pre-aggregated profile 
format"),
                clEnumValN(PF_PerfScript, "perfscript",
                           "perfscript profile format")),
-    cl::ZeroOrMore, cl::Hidden, cl::cat(BoltCategory));
+    cl::Hidden, cl::cat(BoltCategory));
 
 cl::list<std::string> ReorderData(
     "reorder-data", cl::CommaSeparated, cl::desc("list of sections to 
reorder"),
@@ -380,7 +378,7 @@ cl::opt<bool> UpdateDebugSections(
 
 cl::opt<unsigned>
     Verbosity("v", cl::desc("set verbosity level for diagnostic output"),
-              cl::init(0), cl::ZeroOrMore, cl::cat(BoltCategory),
+              cl::init(0), cl::cat(BoltCategory),
               cl::sub(cl::SubCommand::getAll()));
 
 cl::opt<bool> FixBranchesWithLiveness(

diff  --git a/clang/lib/CodeGen/CoverageMappingGen.cpp 
b/clang/lib/CodeGen/CoverageMappingGen.cpp
index b4e6642c592c1..970812f7b0f75 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -34,7 +34,6 @@
 namespace llvm {
 cl::opt<bool>
     EnableSingleByteCoverage("enable-single-byte-coverage",
-                             llvm::cl::ZeroOrMore,
                              llvm::cl::desc("Enable single byte coverage"),
                              llvm::cl::Hidden, llvm::cl::init(false));
 } // namespace llvm

diff  --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp 
b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
index 7cad384c98a8d..c91d06d38b389 100644
--- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -35,7 +35,7 @@ static cl::opt<bool> EnableSpillSGPRToVGPR(
 static cl::opt<bool> EnableSpillCFISavedRegs(
     "amdgpu-spill-cfi-saved-regs",
     cl::desc("Enable spilling the registers required for CFI emission"),
-    cl::ReallyHidden, cl::init(false), cl::ZeroOrMore);
+    cl::ReallyHidden, cl::init(false));
 
 static cl::opt<unsigned> StressVGPRLimit(
     "amdgpu-stress-vgpr", cl::Hidden, cl::init(0),

diff  --git a/llvm/lib/Transforms/IPO/Instrumentor.cpp 
b/llvm/lib/Transforms/IPO/Instrumentor.cpp
index 393e90fdf7d02..c12ff5e69c03d 100644
--- a/llvm/lib/Transforms/IPO/Instrumentor.cpp
+++ b/llvm/lib/Transforms/IPO/Instrumentor.cpp
@@ -82,7 +82,7 @@ static cl::list<std::string>
     ConfigFiles("instrumentor-read-config-files",
                 cl::desc("Read the instrumentor configuration from the "
                          "specified JSON files (comma separated)"),
-                cl::ZeroOrMore, cl::CommaSeparated);
+                cl::CommaSeparated);
 
 /// The user option to specify an input file to read the configuration file
 /// paths from.

diff  --git a/polly/lib/CodeGen/LoopGenerators.cpp 
b/polly/lib/CodeGen/LoopGenerators.cpp
index 22af6f76f208e..e467abea8322c 100644
--- a/polly/lib/CodeGen/LoopGenerators.cpp
+++ b/polly/lib/CodeGen/LoopGenerators.cpp
@@ -38,7 +38,7 @@ static cl::opt<int, true>
 cl::opt<bool> PollyVectorizeMetadata(
     "polly-annotate-metadata-vectorize",
     cl::desc("Append vectorize enable/disable metadata from polly"),
-    cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+    cl::init(false), cl::cat(PollyCategory));
 
 static cl::opt<OMPGeneralSchedulingType, true> XPollyScheduling(
     "polly-scheduling",

diff  --git a/polly/lib/Support/PollyDebug.cpp 
b/polly/lib/Support/PollyDebug.cpp
index 9dcd8ed03694f..218baf7a70dd4 100644
--- a/polly/lib/Support/PollyDebug.cpp
+++ b/polly/lib/Support/PollyDebug.cpp
@@ -24,4 +24,4 @@ bool polly::getPollyDebugFlag() { return PollyDebugFlag; }
 static cl::opt<bool, true>
     PollyDebug("polly-debug",
                cl::desc("Enable debug output for only polly passes."),
-               cl::Hidden, cl::location(PollyDebugFlag), cl::ZeroOrMore);
+               cl::Hidden, cl::location(PollyDebugFlag));

diff  --git a/polly/lib/Transform/MatmulOptimizer.cpp 
b/polly/lib/Transform/MatmulOptimizer.cpp
index 7a6b3d25871c3..2acb7b66298da 100644
--- a/polly/lib/Transform/MatmulOptimizer.cpp
+++ b/polly/lib/Transform/MatmulOptimizer.cpp
@@ -132,19 +132,19 @@ static cl::opt<bool>
     PMBasedTCOpts("polly-tc-opt",
                   cl::desc("Perform optimizations of tensor contractions based 
"
                            "on pattern matching"),
-                  cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+                  cl::init(false), cl::cat(PollyCategory));
 
 static cl::opt<bool>
     PMBasedMMMOpts("polly-matmul-opt",
                    cl::desc("Perform optimizations of matrix multiplications "
                             "based on pattern matching"),
-                   cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory));
+                   cl::init(true), cl::cat(PollyCategory));
 
 static cl::opt<int> OptComputeOut(
     "polly-tc-dependences-computeout",
     cl::desc("Bound the dependence analysis by a maximal amount of "
              "computational steps (0 means no bound)"),
-    cl::Hidden, cl::init(500000), cl::ZeroOrMore, cl::cat(PollyCategory));
+    cl::Hidden, cl::init(500000), cl::cat(PollyCategory));
 
 namespace {
 /// Parameters of the micro kernel.

diff  --git a/polly/lib/Transform/ScheduleOptimizer.cpp 
b/polly/lib/Transform/ScheduleOptimizer.cpp
index b9b9abbd85ae4..68de330729955 100644
--- a/polly/lib/Transform/ScheduleOptimizer.cpp
+++ b/polly/lib/Transform/ScheduleOptimizer.cpp
@@ -101,8 +101,7 @@ static cl::opt<int>
     ScheduleComputeOut("polly-schedule-computeout",
                        cl::desc("Bound the scheduler by maximal amount"
                                 "of computational steps. "),
-                       cl::Hidden, cl::init(300000), cl::ZeroOrMore,
-                       cl::cat(PollyCategory));
+                       cl::Hidden, cl::init(300000), cl::cat(PollyCategory));
 
 static cl::opt<bool>
     GreedyFusion("polly-loopfusion-greedy",


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to