[all-commits] [llvm/llvm-project] 38818b: Move from llvm::makeArrayRef to ArrayRef deduction...
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Thu Jan 5 05:12:55 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 38818b60c58c76ba89b990978cdfd2d7b6799260
https://github.com/llvm/llvm-project/commit/38818b60c58c76ba89b990978cdfd2d7b6799260
Author: serge-sans-paille <sguelton at mozilla.com>
Date: 2023-01-05 (Thu, 05 Jan 2023)
Changed paths:
M llvm/docs/TableGen/BackEnds.rst
M llvm/include/llvm/ADT/SmallBitVector.h
M llvm/include/llvm/Analysis/ConstraintSystem.h
M llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
M llvm/include/llvm/Bitcode/BitcodeConvenience.h
M llvm/include/llvm/Bitstream/BitstreamWriter.h
M llvm/include/llvm/CodeGen/CostTable.h
M llvm/include/llvm/CodeGen/LiveRangeEdit.h
M llvm/include/llvm/CodeGen/MachineInstr.h
M llvm/include/llvm/CodeGen/RegisterClassInfo.h
M llvm/include/llvm/CodeGen/SelectionDAG.h
M llvm/include/llvm/CodeGen/SelectionDAGNodes.h
M llvm/include/llvm/CodeGen/TargetRegisterInfo.h
M llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h
M llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
M llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
M llvm/include/llvm/IR/Constants.h
M llvm/include/llvm/IR/DataLayout.h
M llvm/include/llvm/IR/DerivedTypes.h
M llvm/include/llvm/IR/IRBuilder.h
M llvm/include/llvm/IR/Instruction.h
M llvm/include/llvm/IR/Metadata.h
M llvm/include/llvm/IR/PredIteratorCache.h
M llvm/include/llvm/IR/Type.h
M llvm/include/llvm/Object/ELF.h
M llvm/include/llvm/Object/ELFObjectFile.h
M llvm/include/llvm/Support/ARMWinEH.h
M llvm/include/llvm/Support/BinaryByteStream.h
M llvm/include/llvm/Support/HashBuilder.h
M llvm/include/llvm/Support/ScopedPrinter.h
M llvm/include/llvm/TableGen/Record.h
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/lib/Analysis/ConstraintSystem.cpp
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/lib/Analysis/LazyCallGraph.cpp
M llvm/lib/Analysis/PHITransAddr.cpp
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/AsmParser/LLParser.cpp
M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
M llvm/lib/Bitcode/Writer/ValueEnumerator.h
M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
M llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
M llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
M llvm/lib/CodeGen/AtomicExpandPass.cpp
M llvm/lib/CodeGen/CodeGenPrepare.cpp
M llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
M llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
M llvm/lib/CodeGen/MachineCombiner.cpp
M llvm/lib/CodeGen/MachineTraceMetrics.cpp
M llvm/lib/CodeGen/RegAllocGreedy.cpp
M llvm/lib/CodeGen/RegisterUsageInfo.cpp
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
M llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
M llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/lib/CodeGen/SjLjEHPrepare.cpp
M llvm/lib/CodeGen/VirtRegMap.cpp
M llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
M llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
M llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
M llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp
M llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
M llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
M llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
M llvm/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp
M llvm/lib/DebugInfo/CodeView/EnumTables.cpp
M llvm/lib/DebugInfo/CodeView/Formatters.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/TypeDumpVisitor.cpp
M llvm/lib/DebugInfo/CodeView/TypeHashing.cpp
M llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp
M llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
M llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
M llvm/lib/DebugInfo/PDB/Native/EnumTables.cpp
M llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
M llvm/lib/DebugInfo/PDB/Native/LinePrinter.cpp
M llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
M llvm/lib/DebugInfo/PDB/UDTLayout.cpp
M llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
M llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
M llvm/lib/FuzzMutate/IRMutator.cpp
M llvm/lib/FuzzMutate/Operations.cpp
M llvm/lib/IR/AttributeImpl.h
M llvm/lib/IR/Attributes.cpp
M llvm/lib/IR/AutoUpgrade.cpp
M llvm/lib/IR/ConstantFold.cpp
M llvm/lib/IR/Constants.cpp
M llvm/lib/IR/Core.cpp
M llvm/lib/IR/DebugInfoMetadata.cpp
M llvm/lib/IR/Function.cpp
M llvm/lib/IR/Verifier.cpp
M llvm/lib/LTO/LTO.cpp
M llvm/lib/Linker/IRMover.cpp
M llvm/lib/MC/ELFObjectWriter.cpp
M llvm/lib/MC/MCCodeView.cpp
M llvm/lib/MC/MCDwarf.cpp
M llvm/lib/MC/WinCOFFObjectWriter.cpp
M llvm/lib/ObjCopy/COFF/COFFObjcopy.cpp
M llvm/lib/ObjCopy/wasm/WasmObjcopy.cpp
M llvm/lib/Object/COFFObjectFile.cpp
M llvm/lib/Object/ELF.cpp
M llvm/lib/Object/MachOObjectFile.cpp
M llvm/lib/Object/WindowsResource.cpp
M llvm/lib/Object/XCOFFObjectFile.cpp
M llvm/lib/ObjectYAML/ELFEmitter.cpp
M llvm/lib/ObjectYAML/MinidumpEmitter.cpp
M llvm/lib/ObjectYAML/MinidumpYAML.cpp
M llvm/lib/Option/OptTable.cpp
M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
M llvm/lib/ProfileData/InstrProf.cpp
M llvm/lib/ProfileData/SampleProfReader.cpp
M llvm/lib/Support/APFloat.cpp
M llvm/lib/Support/APInt.cpp
M llvm/lib/Support/ARMAttributeParser.cpp
M llvm/lib/Support/BinaryStreamRef.cpp
M llvm/lib/Support/CSKYAttributeParser.cpp
M llvm/lib/Support/ELFAttributeParser.cpp
M llvm/lib/Support/MD5.cpp
M llvm/lib/Support/MSP430AttributeParser.cpp
M llvm/lib/Support/Path.cpp
M llvm/lib/Support/RISCVAttributeParser.cpp
M llvm/lib/Support/RISCVISAInfo.cpp
M llvm/lib/Support/SourceMgr.cpp
M llvm/lib/Support/StringRef.cpp
M llvm/lib/TableGen/Record.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
M llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
M llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
M llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp
M llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
M llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
M llvm/lib/Target/ARM/ARMISelLowering.cpp
M llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp
M llvm/lib/Target/AVR/AVRISelLowering.cpp
M llvm/lib/Target/CSKY/CSKYISelLowering.cpp
M llvm/lib/Target/DirectX/DXILWriter/DXILValueEnumerator.h
M llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
M llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
M llvm/lib/Target/Hexagon/HexagonSubtarget.h
M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
M llvm/lib/Target/Lanai/LanaiInstrInfo.cpp
M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
M llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
M llvm/lib/Target/M68k/M68kInstrInfo.cpp
M llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
M llvm/lib/Target/Mips/MipsInstrInfo.cpp
M llvm/lib/Target/Mips/MipsSEISelLowering.cpp
M llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
M llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
M llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
M llvm/lib/Target/X86/ImmutableGraph.h
M llvm/lib/Target/X86/X86CallingConv.cpp
M llvm/lib/Target/X86/X86EvexToVex.cpp
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
M llvm/lib/Target/X86/X86InstrFMA3Info.cpp
M llvm/lib/Target/X86/X86InstrFoldTables.cpp
M llvm/lib/Target/X86/X86InstrInfo.cpp
M llvm/lib/Target/X86/X86InterleavedAccess.cpp
M llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
M llvm/lib/Target/X86/X86WinEHState.cpp
M llvm/lib/Transforms/IPO/LowerTypeTests.cpp
M llvm/lib/Transforms/IPO/MergeFunctions.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
M llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
M llvm/lib/Transforms/Scalar/LoopDeletion.cpp
M llvm/lib/Transforms/Scalar/LoopSink.cpp
M llvm/lib/Transforms/Scalar/NewGVN.cpp
M llvm/lib/Transforms/Scalar/SROA.cpp
M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
M llvm/lib/Transforms/Utils/ModuleUtils.cpp
M llvm/lib/Transforms/Utils/SCCPSolver.cpp
M llvm/lib/Transforms/Utils/ValueMapper.cpp
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/tools/dsymutil/MachOUtils.cpp
M llvm/tools/dsymutil/dsymutil.cpp
M llvm/tools/llvm-ar/llvm-ar.cpp
M llvm/tools/llvm-cvtres/llvm-cvtres.cpp
M llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
M llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp
M llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp
M llvm/tools/llvm-exegesis/lib/X86/Target.cpp
M llvm/tools/llvm-lipo/llvm-lipo.cpp
M llvm/tools/llvm-ml/llvm-ml.cpp
M llvm/tools/llvm-mt/llvm-mt.cpp
M llvm/tools/llvm-nm/llvm-nm.cpp
M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
M llvm/tools/llvm-objcopy/llvm-objcopy.cpp
M llvm/tools/llvm-objdump/COFFDump.cpp
M llvm/tools/llvm-objdump/MachODump.cpp
M llvm/tools/llvm-objdump/llvm-objdump.cpp
M llvm/tools/llvm-rc/llvm-rc.cpp
M llvm/tools/llvm-readobj/ARMEHABIPrinter.h
M llvm/tools/llvm-readobj/COFFDumper.cpp
M llvm/tools/llvm-readobj/ELFDumper.cpp
M llvm/tools/llvm-readobj/MachODumper.cpp
M llvm/tools/llvm-readobj/WasmDumper.cpp
M llvm/tools/llvm-readobj/Win64EHDumper.cpp
M llvm/tools/llvm-readobj/XCOFFDumper.cpp
M llvm/tools/llvm-stress/llvm-stress.cpp
M llvm/tools/lto/lto.cpp
M llvm/tools/obj2yaml/elf2yaml.cpp
M llvm/unittests/ADT/ArrayRefTest.cpp
M llvm/unittests/ADT/EditDistanceTest.cpp
M llvm/unittests/ADT/SmallVectorTest.cpp
M llvm/unittests/ADT/TinyPtrVectorTest.cpp
M llvm/unittests/Analysis/MemoryProfileInfoTest.cpp
M llvm/unittests/Analysis/VectorUtilsTest.cpp
M llvm/unittests/Bitstream/BitstreamReaderTest.cpp
M llvm/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
M llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
M llvm/unittests/IR/AttributesTest.cpp
M llvm/unittests/IR/DebugInfoTest.cpp
M llvm/unittests/IR/MetadataTest.cpp
M llvm/unittests/Object/ELFTypesTest.cpp
M llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
M llvm/unittests/ProfileData/CoverageMappingTest.cpp
M llvm/unittests/ProfileData/InstrProfTest.cpp
M llvm/unittests/Remarks/YAMLRemarksSerializerTest.cpp
M llvm/unittests/Support/BinaryStreamTest.cpp
M llvm/unittests/Support/CRCTest.cpp
M llvm/unittests/Support/CommandLineTest.cpp
M llvm/unittests/Support/ConvertUTFTest.cpp
M llvm/unittests/Support/HashBuilderTest.cpp
M llvm/unittests/Support/IndexedAccessorTest.cpp
M llvm/unittests/Support/MD5Test.cpp
M llvm/unittests/Support/ScopedPrinterTest.cpp
M llvm/unittests/Support/SourceMgrTest.cpp
M llvm/unittests/TableGen/AutomataTest.cpp
M llvm/unittests/Target/AArch64/AArch64InstPrinterTest.cpp
M llvm/utils/TableGen/AsmWriterEmitter.cpp
M llvm/utils/TableGen/CodeEmitterGen.cpp
M llvm/utils/TableGen/CodeGenRegisters.h
M llvm/utils/TableGen/CodeGenSchedule.cpp
M llvm/utils/TableGen/CodeGenSchedule.h
M llvm/utils/TableGen/GlobalISelEmitter.cpp
M llvm/utils/TableGen/IntrinsicEmitter.cpp
M llvm/utils/TableGen/PseudoLoweringEmitter.cpp
M llvm/utils/TableGen/RegisterInfoEmitter.cpp
M llvm/utils/TableGen/SearchableTableEmitter.cpp
M llvm/utils/TableGen/SubtargetEmitter.cpp
Log Message:
-----------
Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
Use deduction guides instead of helper functions.
The only non-automatic changes have been:
1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*))
2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase.
3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated.
4. The "reference mode" of makeArrayRef(ArrayRef<T> &) that acts as no-op is not supported (a constructor cannot achieve that).
Per reviewers' comment, some useless makeArrayRef have been removed in the process.
This is a follow-up to https://reviews.llvm.org/D140896 that introduced
the deduction guides.
Differential Revision: https://reviews.llvm.org/D140955
More information about the All-commits
mailing list