[all-commits] [llvm/llvm-project] 343de6: [Transforms] Use std::nullopt instead of None (NFC)

kazutakahirata via All-commits all-commits at lists.llvm.org
Fri Dec 2 21:12:02 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 343de6856e16b58bcbd16d479fc633f54e22fadc
      https://github.com/llvm/llvm-project/commit/343de6856e16b58bcbd16d479fc633f54e22fadc
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/include/llvm/Transforms/Scalar/GVN.h
    M llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
    M llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
    M llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
    M llvm/lib/Transforms/Coroutines/CoroElide.cpp
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    M llvm/lib/Transforms/IPO/IROutliner.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
    M llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
    M llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
    M llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Scalar/Float2Int.cpp
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/lib/Transforms/Scalar/GVNSink.cpp
    M llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
    M llvm/lib/Transforms/Scalar/LoopFuse.cpp
    M llvm/lib/Transforms/Scalar/LoopPredication.cpp
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    M llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
    M llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    M llvm/lib/Transforms/Scalar/MergeICmps.cpp
    M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
    M llvm/lib/Transforms/Scalar/Scalarizer.cpp
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
    M llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/lib/Transforms/Utils/CodeMoverUtils.cpp
    M llvm/lib/Transforms/Utils/Debugify.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/LoopPeel.cpp
    M llvm/lib/Transforms/Utils/LoopUnroll.cpp
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/lib/Transforms/Utils/MemoryOpRemark.cpp
    M llvm/lib/Transforms/Utils/PredicateInfo.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/lib/Transforms/Utils/ValueMapper.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/lib/Transforms/Vectorize/VPlanSLP.cpp

  Log Message:
  -----------
  [Transforms] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


  Commit: 110115993cad38755afa0371caa87459a93d5451
      https://github.com/llvm/llvm-project/commit/110115993cad38755afa0371caa87459a93d5451
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M llvm/include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFListTable.h
    M llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
    M llvm/include/llvm/DebugInfo/GSYM/FunctionInfo.h
    M llvm/include/llvm/DebugInfo/GSYM/GsymReader.h
    M llvm/include/llvm/DebugInfo/GSYM/LineTable.h
    M llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h
    M llvm/include/llvm/DebugInfo/Symbolize/MarkupFilter.h
    M llvm/lib/DebugInfo/CodeView/AppendingTypeTableBuilder.cpp
    M llvm/lib/DebugInfo/CodeView/GlobalTypeTableBuilder.cpp
    M llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
    M llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp
    M llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
    M llvm/lib/DebugInfo/GSYM/GsymReader.cpp
    M llvm/lib/DebugInfo/GSYM/InlineInfo.cpp
    M llvm/lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp
    M llvm/lib/DebugInfo/PDB/Native/NativeInlineSiteSymbol.cpp
    M llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp
    M llvm/lib/DebugInfo/Symbolize/Markup.cpp
    M llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp

  Log Message:
  -----------
  [DebugInfo] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


  Commit: b4482f7ca04e852cf610ef0e16542c888844d93d
      https://github.com/llvm/llvm-project/commit/b4482f7ca04e852cf610ef0e16542c888844d93d
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M llvm/tools/bugpoint/ToolRunner.cpp
    M llvm/tools/dsymutil/MachODebugMapParser.cpp
    M llvm/tools/dsymutil/MachOUtils.cpp
    M llvm/tools/llvm-as/llvm-as.cpp
    M llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
    M llvm/tools/llvm-cov/CodeCoverage.cpp
    M llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
    M llvm/tools/llvm-cov/SourceCoverageViewText.cpp
    M llvm/tools/llvm-dwarfdump/Statistics.cpp
    M llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp
    M llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
    M llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
    M llvm/tools/llvm-ifs/llvm-ifs.cpp
    M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
    M llvm/tools/llvm-lipo/llvm-lipo.cpp
    M llvm/tools/llvm-nm/llvm-nm.cpp
    M llvm/tools/llvm-objdump/SourcePrinter.cpp
    M llvm/tools/llvm-objdump/XCOFFDump.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp
    M llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
    M llvm/tools/llvm-profgen/PerfReader.cpp
    M llvm/tools/llvm-readobj/ARMEHABIPrinter.h
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/tools/llvm-readobj/MachODumper.cpp
    M llvm/tools/llvm-readobj/XCOFFDumper.cpp
    M llvm/tools/llvm-reduce/TestRunner.cpp
    M llvm/tools/llvm-reduce/deltas/ReduceOpcodes.cpp
    M llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
    M llvm/tools/llvm-sim/llvm-sim.cpp
    M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
    M llvm/tools/lto/lto.cpp
    M llvm/tools/obj2yaml/dwarf2yaml.cpp
    M llvm/tools/obj2yaml/elf2yaml.cpp
    M llvm/tools/opt/NewPMDriver.cpp
    M llvm/tools/opt/opt.cpp

  Log Message:
  -----------
  [tools] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


  Commit: ed88e60b373383322c4b7465d43dc6c06092facb
      https://github.com/llvm/llvm-project/commit/ed88e60b373383322c4b7465d43dc6c06092facb
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M llvm/utils/TableGen/CodeGenRegisters.cpp
    M llvm/utils/TableGen/CodeGenTarget.cpp
    M llvm/utils/TableGen/GlobalISel/GIMatchTree.h
    M llvm/utils/TableGen/GlobalISelEmitter.cpp
    M llvm/utils/TableGen/IntrinsicEmitter.cpp
    M llvm/utils/not/not.cpp

  Log Message:
  -----------
  [utils] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from
llvm::Optional to std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


  Commit: aadaaface2ec96ee30d92bf46faa41dd9e68b64d
      https://github.com/llvm/llvm-project/commit/aadaaface2ec96ee30d92bf46faa41dd9e68b64d
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M llvm/include/llvm/AsmParser/LLParser.h
    M llvm/include/llvm/AsmParser/Parser.h
    M llvm/include/llvm/BinaryFormat/AMDGPUMetadataVerifier.h
    M llvm/include/llvm/BinaryFormat/Dwarf.def
    M llvm/include/llvm/Bitstream/BitstreamWriter.h
    M llvm/include/llvm/DWP/DWP.h
    M llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
    M llvm/include/llvm/ExecutionEngine/Orc/ELFNixPlatform.h
    M llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
    M llvm/include/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    M llvm/include/llvm/ExecutionEngine/Orc/Speculation.h
    M llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    M llvm/include/llvm/FuzzMutate/OpDescriptor.h
    M llvm/include/llvm/IRReader/IRReader.h
    M llvm/include/llvm/LTO/Config.h
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/MC/MCParser/MCAsmParser.h
    M llvm/include/llvm/MC/MCSectionXCOFF.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/include/llvm/MC/TargetRegistry.h
    M llvm/include/llvm/ObjCopy/CommonConfig.h
    M llvm/include/llvm/Object/ELF.h
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/include/llvm/Object/ObjectFile.h
    M llvm/include/llvm/Passes/PassBuilder.h
    M llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
    M llvm/include/llvm/ProfileData/InstrProf.h
    M llvm/include/llvm/Remarks/BitstreamRemarkSerializer.h
    M llvm/include/llvm/Remarks/HotnessThresholdParser.h
    M llvm/include/llvm/Remarks/RemarkLinker.h
    M llvm/include/llvm/Remarks/RemarkParser.h
    M llvm/include/llvm/Remarks/RemarkSerializer.h
    M llvm/include/llvm/Remarks/RemarkStreamer.h
    M llvm/include/llvm/Remarks/YAMLRemarkSerializer.h
    M llvm/include/llvm/Target/CodeGenCWrappers.h
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/AsmParser/Parser.cpp
    M llvm/lib/BinaryFormat/Dwarf.cpp
    M llvm/lib/Bitstream/Reader/BitstreamReader.cpp
    M llvm/lib/DWARFLinker/DWARFStreamer.cpp
    M llvm/lib/Debuginfod/BuildIDFetcher.cpp
    M llvm/lib/Debuginfod/Debuginfod.cpp
    M llvm/lib/ExecutionEngine/ExecutionEngine.cpp
    M llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
    M llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
    M llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
    M llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
    M llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp
    M llvm/lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp
    M llvm/lib/FileCheck/FileCheck.cpp
    M llvm/lib/FileCheck/FileCheckImpl.h
    M llvm/lib/Frontend/OpenMP/OMPContext.cpp
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/FuzzMutate/IRMutator.cpp
    M llvm/lib/FuzzMutate/Operations.cpp
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/lib/LTO/LTOModule.cpp
    M llvm/lib/LTO/ThinLTOCodeGenerator.cpp
    M llvm/lib/LineEditor/LineEditor.cpp
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/lib/MC/MCAsmBackend.cpp
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCCodeView.cpp
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
    M llvm/lib/MC/MCDwarf.cpp
    M llvm/lib/MC/MCInstrAnalysis.cpp
    M llvm/lib/MC/MCObjectFileInfo.cpp
    M llvm/lib/MC/MCObjectStreamer.cpp
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/lib/MC/MCParser/MasmParser.cpp
    M llvm/lib/MC/MCRegisterInfo.cpp
    M llvm/lib/MC/MCSubtargetInfo.cpp
    M llvm/lib/MC/MCWin64EH.cpp
    M llvm/lib/ObjCopy/MachO/MachOObject.cpp
    M llvm/lib/ObjCopy/MachO/MachOObject.h
    M llvm/lib/ObjCopy/MachO/MachOReader.cpp
    M llvm/lib/Object/Archive.cpp
    M llvm/lib/Object/BuildID.cpp
    M llvm/lib/Object/ELFObjectFile.cpp
    M llvm/lib/Object/MachOObjectFile.cpp
    M llvm/lib/Object/Minidump.cpp
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/lib/ObjectYAML/ELFYAML.cpp
    M llvm/lib/Option/ArgList.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassBuilderBindings.cpp
    M llvm/lib/Passes/StandardInstrumentations.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    M llvm/lib/ProfileData/SampleProfReader.cpp
    M llvm/lib/Remarks/BitstreamRemarkParser.cpp
    M llvm/lib/Remarks/BitstreamRemarkParser.h
    M llvm/lib/Remarks/BitstreamRemarkSerializer.cpp
    M llvm/lib/Remarks/RemarkLinker.cpp
    M llvm/lib/Remarks/RemarkParser.cpp
    M llvm/lib/Remarks/RemarkStreamer.cpp
    M llvm/lib/Remarks/YAMLRemarkParser.cpp
    M llvm/lib/Remarks/YAMLRemarkParser.h
    M llvm/lib/Remarks/YAMLRemarkSerializer.cpp
    M llvm/lib/Support/APInt.cpp
    M llvm/lib/Support/CrashRecoveryContext.cpp
    M llvm/lib/Support/DJB.cpp
    M llvm/lib/Support/ELFAttributes.cpp
    M llvm/lib/Support/FormatVariadic.cpp
    M llvm/lib/Support/GraphWriter.cpp
    M llvm/lib/Support/JSON.cpp
    M llvm/lib/Support/KnownBits.cpp
    M llvm/lib/Support/LineIterator.cpp
    M llvm/lib/Support/LockFileManager.cpp
    M llvm/lib/Support/OptimizedStructLayout.cpp
    M llvm/lib/Support/RISCVISAInfo.cpp
    M llvm/lib/Support/ScopedPrinter.cpp
    M llvm/lib/Support/Signals.cpp
    M llvm/lib/Support/SymbolRemappingReader.cpp
    M llvm/lib/Support/UnicodeNameToCodepoint.cpp
    M llvm/lib/Support/Unix/Process.inc
    M llvm/lib/Support/VirtualFileSystem.cpp
    M llvm/lib/Support/YAMLParser.cpp
    M llvm/lib/TableGen/Parser.cpp
    M llvm/lib/TableGen/Record.cpp
    M llvm/lib/TableGen/TGParser.cpp
    M llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
    M llvm/lib/XRay/InstrumentationMap.cpp

  Log Message:
  -----------
  [llvm] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716


Compare: https://github.com/llvm/llvm-project/compare/998960ee1f2c...aadaaface2ec


More information about the All-commits mailing list