[all-commits] [llvm/llvm-project] 557efc: [llvm] Remove unneeded cl::ZeroOrMore for cl::opt ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jun 3 21:59:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 557efc9a8b68628c2c944678c6471dac30ed9e8e
      https://github.com/llvm/llvm-project/commit/557efc9a8b68628c2c944678c6471dac30ed9e8e
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-06-03 (Fri, 03 Jun 2022)

  Changed paths:
    M llvm/include/llvm/Support/PluginLoader.h
    M llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
    M llvm/lib/Analysis/DDG.cpp
    M llvm/lib/Analysis/DependenceAnalysis.cpp
    M llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp
    M llvm/lib/Analysis/InlineCost.cpp
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/LLVMTargetMachine.cpp
    M llvm/lib/CodeGen/RegAllocEvictionAdvisor.cpp
    M llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
    M llvm/lib/CodeGen/VLIWMachineScheduler.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/lib/ProfileData/ProfileSummaryBuilder.cpp
    M llvm/lib/ProfileData/SampleProf.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64StackTagging.cpp
    M llvm/lib/Target/ARC/ARCOptAddrMode.cpp
    M llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp
    M llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp
    M llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
    M llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp
    M llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
    M llvm/lib/Target/Hexagon/HexagonGenInsert.cpp
    M llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
    M llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
    M llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
    M llvm/lib/Target/Hexagon/HexagonPeephole.cpp
    M llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
    M llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
    M llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
    M llvm/lib/Target/Hexagon/HexagonVExtract.cpp
    M llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
    M llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.cpp
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
    M llvm/lib/Transforms/IPO/GlobalDCE.cpp
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/lib/Transforms/IPO/PartialInlining.cpp
    M llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    M llvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp
    M llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    M llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
    M llvm/lib/Transforms/Utils/SampleProfileInference.cpp
    M llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/lib/Transforms/Utils/SizeOpts.cpp
    M llvm/tools/llvm-profdata/llvm-profdata.cpp
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-profgen/ProfileGenerator.cpp
    M llvm/tools/llvm-profgen/ProfiledBinary.cpp
    M llvm/tools/llvm-profgen/llvm-profgen.cpp
    M llvm/utils/FileCheck/FileCheck.cpp

  Log Message:
  -----------
  [llvm] Remove unneeded cl::ZeroOrMore for cl::opt options. NFC

Some cl::ZeroOrMore were added to avoid the `may only occur zero or one times!`
error. More were added due to cargo cult. Since the error has been removed,
cl::ZeroOrMore is unneeded.

Also remove cl::init(false) while touching the lines.




More information about the All-commits mailing list