[PATCH] D140955: Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 23:39:24 PST 2023
serge-sans-paille created this revision.
Herald added subscribers: kmitropoulou, Enna1, kosarev, mattd, gchakrabarti, pmatos, asb, asavonic, ormris, foad, frasercrmck, ecnelises, wenlei, jdoerfert, kerbowa, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, arphaman, the_o, brucehoult, MartinMosbeck, rogfer01, steven_wu, atanasyan, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, fedor.sergeev, kbarton, hiraditya, jgravelle-google, arichardson, sbc100, jvesely, nemanjai, sdardis, dylanmckay, dschuff, arsenm, qcolombet, MatzeB.
Herald added a reviewer: JDevlieghere.
Herald added a reviewer: alexander-shaposhnikov.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a project: All.
serge-sans-paille requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, StephenFan, aheejin, jholewinski.
Herald added a project: LLVM.
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).
This is a follow-up to https://reviews.llvm.org/D140896 that introduced the deduction guides.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140955
Files:
llvm/docs/TableGen/BackEnds.rst
llvm/include/llvm/ADT/SmallBitVector.h
llvm/include/llvm/Analysis/ConstraintSystem.h
llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
llvm/include/llvm/Bitcode/BitcodeConvenience.h
llvm/include/llvm/Bitstream/BitstreamWriter.h
llvm/include/llvm/CodeGen/CostTable.h
llvm/include/llvm/CodeGen/LiveRangeEdit.h
llvm/include/llvm/CodeGen/MachineInstr.h
llvm/include/llvm/CodeGen/RegisterClassInfo.h
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/include/llvm/CodeGen/TargetRegisterInfo.h
llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h
llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
llvm/include/llvm/IR/Constants.h
llvm/include/llvm/IR/DataLayout.h
llvm/include/llvm/IR/DerivedTypes.h
llvm/include/llvm/IR/IRBuilder.h
llvm/include/llvm/IR/Instruction.h
llvm/include/llvm/IR/Metadata.h
llvm/include/llvm/IR/PredIteratorCache.h
llvm/include/llvm/IR/Type.h
llvm/include/llvm/Object/ELF.h
llvm/include/llvm/Object/ELFObjectFile.h
llvm/include/llvm/Support/ARMWinEH.h
llvm/include/llvm/Support/BinaryByteStream.h
llvm/include/llvm/Support/HashBuilder.h
llvm/include/llvm/Support/ScopedPrinter.h
llvm/include/llvm/TableGen/Record.h
llvm/lib/Analysis/ConstantFolding.cpp
llvm/lib/Analysis/ConstraintSystem.cpp
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/lib/Analysis/LazyCallGraph.cpp
llvm/lib/Analysis/PHITransAddr.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/ValueEnumerator.h
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
llvm/lib/CodeGen/AtomicExpandPass.cpp
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
llvm/lib/CodeGen/MachineCombiner.cpp
llvm/lib/CodeGen/MachineTraceMetrics.cpp
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/lib/CodeGen/RegisterUsageInfo.cpp
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SjLjEHPrepare.cpp
llvm/lib/CodeGen/VirtRegMap.cpp
llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp
llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
llvm/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp
llvm/lib/DebugInfo/CodeView/EnumTables.cpp
llvm/lib/DebugInfo/CodeView/Formatters.cpp
llvm/lib/DebugInfo/CodeView/GlobalTypeTableBuilder.cpp
llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp
llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
llvm/lib/DebugInfo/CodeView/TypeHashing.cpp
llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp
llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/EnumTables.cpp
llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/LinePrinter.cpp
llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
llvm/lib/DebugInfo/PDB/UDTLayout.cpp
llvm/lib/ExecutionEngine/Orc/COFFVCRuntimeSupport.cpp
llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
llvm/lib/FuzzMutate/IRMutator.cpp
llvm/lib/FuzzMutate/Operations.cpp
llvm/lib/IR/AttributeImpl.h
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/AutoUpgrade.cpp
llvm/lib/IR/ConstantFold.cpp
llvm/lib/IR/Constants.cpp
llvm/lib/IR/Core.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/Function.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/LTO/LTO.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/MC/ELFObjectWriter.cpp
llvm/lib/MC/MCCodeView.cpp
llvm/lib/MC/MCDwarf.cpp
llvm/lib/MC/WinCOFFObjectWriter.cpp
llvm/lib/ObjCopy/COFF/COFFObjcopy.cpp
llvm/lib/ObjCopy/wasm/WasmObjcopy.cpp
llvm/lib/Object/COFFObjectFile.cpp
llvm/lib/Object/ELF.cpp
llvm/lib/Object/MachOObjectFile.cpp
llvm/lib/Object/WindowsResource.cpp
llvm/lib/Object/XCOFFObjectFile.cpp
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/lib/ObjectYAML/MinidumpEmitter.cpp
llvm/lib/ObjectYAML/MinidumpYAML.cpp
llvm/lib/Option/OptTable.cpp
llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
llvm/lib/ProfileData/InstrProf.cpp
llvm/lib/ProfileData/SampleProfReader.cpp
llvm/lib/Support/APFloat.cpp
llvm/lib/Support/APInt.cpp
llvm/lib/Support/ARMAttributeParser.cpp
llvm/lib/Support/BinaryStreamRef.cpp
llvm/lib/Support/CSKYAttributeParser.cpp
llvm/lib/Support/ELFAttributeParser.cpp
llvm/lib/Support/MD5.cpp
llvm/lib/Support/MSP430AttributeParser.cpp
llvm/lib/Support/Path.cpp
llvm/lib/Support/RISCVAttributeParser.cpp
llvm/lib/Support/RISCVISAInfo.cpp
llvm/lib/Support/SourceMgr.cpp
llvm/lib/Support/StringRef.cpp
llvm/lib/TableGen/Record.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp
llvm/lib/Target/AVR/AVRISelLowering.cpp
llvm/lib/Target/CSKY/CSKYISelLowering.cpp
llvm/lib/Target/DirectX/DXILWriter/DXILValueEnumerator.h
llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/lib/Target/Hexagon/HexagonSubtarget.h
llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
llvm/lib/Target/Lanai/LanaiInstrInfo.cpp
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
llvm/lib/Target/M68k/M68kInstrInfo.cpp
llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
llvm/lib/Target/Mips/MipsInstrInfo.cpp
llvm/lib/Target/Mips/MipsSEISelLowering.cpp
llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
llvm/lib/Target/X86/ImmutableGraph.h
llvm/lib/Target/X86/X86CallingConv.cpp
llvm/lib/Target/X86/X86EvexToVex.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
llvm/lib/Target/X86/X86InstrFMA3Info.cpp
llvm/lib/Target/X86/X86InstrFoldTables.cpp
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InterleavedAccess.cpp
llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
llvm/lib/Target/X86/X86WinEHState.cpp
llvm/lib/Transforms/IPO/LowerTypeTests.cpp
llvm/lib/Transforms/IPO/MergeFunctions.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
llvm/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/lib/Transforms/Scalar/LoopSink.cpp
llvm/lib/Transforms/Scalar/NewGVN.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
llvm/lib/Transforms/Utils/ModuleUtils.cpp
llvm/lib/Transforms/Utils/SCCPSolver.cpp
llvm/lib/Transforms/Utils/ValueMapper.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/tools/dsymutil/MachOUtils.cpp
llvm/tools/dsymutil/dsymutil.cpp
llvm/tools/llvm-ar/llvm-ar.cpp
llvm/tools/llvm-cvtres/llvm-cvtres.cpp
llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp
llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp
llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
llvm/tools/llvm-lipo/llvm-lipo.cpp
llvm/tools/llvm-ml/llvm-ml.cpp
llvm/tools/llvm-mt/llvm-mt.cpp
llvm/tools/llvm-nm/llvm-nm.cpp
llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
llvm/tools/llvm-objcopy/llvm-objcopy.cpp
llvm/tools/llvm-objdump/COFFDump.cpp
llvm/tools/llvm-objdump/MachODump.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-rc/llvm-rc.cpp
llvm/tools/llvm-readobj/ARMEHABIPrinter.h
llvm/tools/llvm-readobj/COFFDumper.cpp
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/tools/llvm-readobj/MachODumper.cpp
llvm/tools/llvm-readobj/WasmDumper.cpp
llvm/tools/llvm-readobj/Win64EHDumper.cpp
llvm/tools/llvm-readobj/XCOFFDumper.cpp
llvm/tools/llvm-stress/llvm-stress.cpp
llvm/tools/lto/lto.cpp
llvm/tools/obj2yaml/elf2yaml.cpp
llvm/unittests/ADT/ArrayRefTest.cpp
llvm/unittests/ADT/EditDistanceTest.cpp
llvm/unittests/ADT/SmallVectorTest.cpp
llvm/unittests/ADT/TinyPtrVectorTest.cpp
llvm/unittests/Analysis/MemoryProfileInfoTest.cpp
llvm/unittests/Analysis/VectorUtilsTest.cpp
llvm/unittests/Bitstream/BitstreamReaderTest.cpp
llvm/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
llvm/unittests/IR/AttributesTest.cpp
llvm/unittests/IR/DebugInfoTest.cpp
llvm/unittests/IR/MetadataTest.cpp
llvm/unittests/Object/ELFTypesTest.cpp
llvm/unittests/ObjectYAML/MinidumpYAMLTest.cpp
llvm/unittests/ProfileData/CoverageMappingTest.cpp
llvm/unittests/ProfileData/InstrProfTest.cpp
llvm/unittests/Remarks/YAMLRemarksSerializerTest.cpp
llvm/unittests/Support/BinaryStreamTest.cpp
llvm/unittests/Support/CRCTest.cpp
(20 more files...)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140955.486175.patch
Type: text/x-patch
Size: 335831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230104/075fc474/attachment-0001.bin>
More information about the llvm-commits
mailing list