aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
commit1d5ae1026e831016fc29fd927877c86af904481f (patch)
tree2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9
parente6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff)
downloadsrc-vendor/llvm.tar.gz
src-vendor/llvm.zip
Vendor import of stripped llvm trunk r375505, the last commit before thevendor/llvm/llvm-trunk-r375505vendor/llvm
upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/llvm/trunk@375505
Notes
Notes: svn path=/vendor/llvm/dist/; revision=353940 svn path=/vendor/llvm/llvm-r375505/; revision=353941; tag=vendor/llvm/llvm-trunk-r375505
-rw-r--r--include/llvm-c/Core.h22
-rw-r--r--include/llvm-c/DebugInfo.h47
-rw-r--r--include/llvm-c/Remarks.h17
-rw-r--r--include/llvm-c/Transforms/IPO.h18
-rw-r--r--include/llvm-c/Transforms/Scalar.h6
-rw-r--r--include/llvm-c/lto.h94
-rw-r--r--include/llvm/ADT/APFloat.h5
-rw-r--r--include/llvm/ADT/APInt.h9
-rw-r--r--include/llvm/ADT/Any.h4
-rw-r--r--include/llvm/ADT/ArrayRef.h6
-rw-r--r--include/llvm/ADT/DenseMap.h57
-rw-r--r--include/llvm/ADT/DenseMapInfo.h13
-rw-r--r--include/llvm/ADT/DirectedGraph.h270
-rw-r--r--include/llvm/ADT/Hashing.h1
-rw-r--r--include/llvm/ADT/IntervalMap.h4
-rw-r--r--include/llvm/ADT/PointerIntPair.h11
-rw-r--r--include/llvm/ADT/PointerUnion.h30
-rw-r--r--include/llvm/ADT/STLExtras.h168
-rw-r--r--include/llvm/ADT/SmallBitVector.h2
-rw-r--r--include/llvm/ADT/Statistic.h102
-rw-r--r--include/llvm/ADT/StringExtras.h2
-rw-r--r--include/llvm/ADT/StringMap.h59
-rw-r--r--include/llvm/ADT/StringRef.h18
-rw-r--r--include/llvm/ADT/StringSet.h8
-rw-r--r--include/llvm/ADT/TinyPtrVector.h38
-rw-r--r--include/llvm/ADT/VariadicFunction.h330
-rw-r--r--include/llvm/ADT/iterator_range.h1
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h2
-rw-r--r--include/llvm/Analysis/AliasSetTracker.h5
-rw-r--r--include/llvm/Analysis/AssumptionCache.h4
-rw-r--r--include/llvm/Analysis/CFG.h2
-rw-r--r--include/llvm/Analysis/CFLAndersAliasAnalysis.h5
-rw-r--r--include/llvm/Analysis/CFLSteensAliasAnalysis.h5
-rw-r--r--include/llvm/Analysis/CGSCCPassManager.h31
-rw-r--r--include/llvm/Analysis/CaptureTracking.h6
-rw-r--r--include/llvm/Analysis/DDG.h430
-rw-r--r--include/llvm/Analysis/DOTGraphTraitsPass.h4
-rw-r--r--include/llvm/Analysis/DependenceGraphBuilder.h119
-rw-r--r--include/llvm/Analysis/DivergenceAnalysis.h16
-rw-r--r--include/llvm/Analysis/GlobalsModRef.h12
-rw-r--r--include/llvm/Analysis/InstructionSimplify.h36
-rw-r--r--include/llvm/Analysis/LazyCallGraph.h10
-rw-r--r--include/llvm/Analysis/LegacyDivergenceAnalysis.h16
-rw-r--r--include/llvm/Analysis/Loads.h22
-rw-r--r--include/llvm/Analysis/LoopAnalysisManager.h10
-rw-r--r--include/llvm/Analysis/LoopCacheAnalysis.h281
-rw-r--r--include/llvm/Analysis/LoopInfo.h37
-rw-r--r--include/llvm/Analysis/LoopInfoImpl.h8
-rw-r--r--include/llvm/Analysis/MemoryBuiltins.h26
-rw-r--r--include/llvm/Analysis/MemoryDependenceAnalysis.h14
-rw-r--r--include/llvm/Analysis/MemorySSA.h4
-rw-r--r--include/llvm/Analysis/MemorySSAUpdater.h3
-rw-r--r--include/llvm/Analysis/MustExecute.h285
-rw-r--r--include/llvm/Analysis/Passes.h7
-rw-r--r--include/llvm/Analysis/ProfileSummaryInfo.h23
-rw-r--r--include/llvm/Analysis/RegionInfoImpl.h2
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h6
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h22
-rw-r--r--include/llvm/Analysis/TargetLibraryInfo.h17
-rw-r--r--include/llvm/Analysis/TargetTransformInfo.h180
-rw-r--r--include/llvm/Analysis/TargetTransformInfoImpl.h55
-rw-r--r--include/llvm/Analysis/TypeMetadataUtils.h2
-rw-r--r--include/llvm/Analysis/Utils/Local.h22
-rw-r--r--include/llvm/Analysis/ValueTracking.h67
-rw-r--r--include/llvm/Analysis/VectorUtils.h144
-rw-r--r--include/llvm/BinaryFormat/Dwarf.def198
-rw-r--r--include/llvm/BinaryFormat/Dwarf.h125
-rw-r--r--include/llvm/BinaryFormat/ELF.h66
-rw-r--r--include/llvm/BinaryFormat/ELFRelocs/AArch64.def7
-rw-r--r--include/llvm/BinaryFormat/MachO.h5
-rw-r--r--include/llvm/BinaryFormat/Magic.h1
-rw-r--r--include/llvm/BinaryFormat/Minidump.h68
-rw-r--r--include/llvm/BinaryFormat/MinidumpConstants.def41
-rw-r--r--include/llvm/BinaryFormat/Wasm.h14
-rw-r--r--include/llvm/BinaryFormat/XCOFF.h116
-rw-r--r--include/llvm/Bitcode/BitcodeAnalyzer.h1
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h2
-rw-r--r--include/llvm/Bitstream/BitCodes.h5
-rw-r--r--include/llvm/Bitstream/BitstreamReader.h1
-rw-r--r--include/llvm/CodeGen/AccelTable.h2
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h21
-rw-r--r--include/llvm/CodeGen/BasicTTIImpl.h73
-rw-r--r--include/llvm/CodeGen/CallingConvLower.h18
-rw-r--r--include/llvm/CodeGen/DFAPacketizer.h44
-rw-r--r--include/llvm/CodeGen/DIE.h12
-rw-r--r--include/llvm/CodeGen/FastISel.h4
-rw-r--r--include/llvm/CodeGen/FunctionLoweringInfo.h2
-rw-r--r--include/llvm/CodeGen/GlobalISel/CallLowering.h127
-rw-r--r--include/llvm/CodeGen/GlobalISel/CombinerHelper.h127
-rw-r--r--include/llvm/CodeGen/GlobalISel/CombinerInfo.h15
-rw-r--r--include/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h11
-rw-r--r--include/llvm/CodeGen/GlobalISel/GISelKnownBits.h111
-rw-r--r--include/llvm/CodeGen/GlobalISel/IRTranslator.h12
-rw-r--r--include/llvm/CodeGen/GlobalISel/InstructionSelector.h34
-rw-r--r--include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h66
-rw-r--r--include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h92
-rw-r--r--include/llvm/CodeGen/GlobalISel/LegalizerHelper.h20
-rw-r--r--include/llvm/CodeGen/GlobalISel/LegalizerInfo.h61
-rw-r--r--include/llvm/CodeGen/GlobalISel/MIPatternMatch.h20
-rw-r--r--include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h93
-rw-r--r--include/llvm/CodeGen/GlobalISel/Utils.h22
-rw-r--r--include/llvm/CodeGen/ISDOpcodes.h41
-rw-r--r--include/llvm/CodeGen/LiveInterval.h6
-rw-r--r--include/llvm/CodeGen/LiveIntervals.h21
-rw-r--r--include/llvm/CodeGen/LiveRangeCalc.h (renamed from lib/CodeGen/LiveRangeCalc.h)10
-rw-r--r--include/llvm/CodeGen/LiveRegUnits.h4
-rw-r--r--include/llvm/CodeGen/MIRYamlMapping.h1
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h36
-rw-r--r--include/llvm/CodeGen/MachineCombinerPattern.h21
-rw-r--r--include/llvm/CodeGen/MachineDominators.h63
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h62
-rw-r--r--include/llvm/CodeGen/MachineFunction.h61
-rw-r--r--include/llvm/CodeGen/MachineInstr.h99
-rw-r--r--include/llvm/CodeGen/MachineInstrBuilder.h62
-rw-r--r--include/llvm/CodeGen/MachineLoopUtils.h41
-rw-r--r--include/llvm/CodeGen/MachineMemOperand.h7
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h52
-rw-r--r--include/llvm/CodeGen/MachineOperand.h49
-rw-r--r--include/llvm/CodeGen/MachinePipeliner.h80
-rw-r--r--include/llvm/CodeGen/MachinePostDominators.h46
-rw-r--r--include/llvm/CodeGen/MachineRegionInfo.h2
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h70
-rw-r--r--include/llvm/CodeGen/MachineScheduler.h1
-rw-r--r--include/llvm/CodeGen/ModuloSchedule.h367
-rw-r--r--include/llvm/CodeGen/PBQP/Math.h12
-rw-r--r--include/llvm/CodeGen/Passes.h4
-rw-r--r--include/llvm/CodeGen/Register.h118
-rw-r--r--include/llvm/CodeGen/RegisterClassInfo.h2
-rw-r--r--include/llvm/CodeGen/RegisterPressure.h9
-rw-r--r--include/llvm/CodeGen/RegisterScavenging.h24
-rw-r--r--include/llvm/CodeGen/ScheduleDAGInstrs.h12
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h95
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h36
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h105
-rw-r--r--include/llvm/CodeGen/StackProtector.h6
-rw-r--r--include/llvm/CodeGen/SwitchLoweringUtils.h5
-rw-r--r--include/llvm/CodeGen/TargetCallingConv.h23
-rw-r--r--include/llvm/CodeGen/TargetFrameLowering.h30
-rw-r--r--include/llvm/CodeGen/TargetInstrInfo.h102
-rw-r--r--include/llvm/CodeGen/TargetLowering.h399
-rw-r--r--include/llvm/CodeGen/TargetLoweringObjectFileImpl.h34
-rw-r--r--include/llvm/CodeGen/TargetPassConfig.h2
-rw-r--r--include/llvm/CodeGen/TargetRegisterInfo.h94
-rw-r--r--include/llvm/CodeGen/TargetSubtargetInfo.h10
-rw-r--r--include/llvm/CodeGen/ValueTypes.h4
-rw-r--r--include/llvm/CodeGen/ValueTypes.td247
-rw-r--r--include/llvm/CodeGen/VirtRegMap.h43
-rw-r--r--include/llvm/DebugInfo/CodeView/CVTypeVisitor.h4
-rw-r--r--include/llvm/DebugInfo/CodeView/CodeViewRecordIO.h13
-rw-r--r--include/llvm/DebugInfo/CodeView/CodeViewRegisters.def128
-rw-r--r--include/llvm/DebugInfo/CodeView/EnumTables.h11
-rw-r--r--include/llvm/DebugInfo/CodeView/SymbolDeserializer.h2
-rw-r--r--include/llvm/DebugInfo/CodeView/SymbolRecord.h304
-rw-r--r--include/llvm/DebugInfo/CodeView/TypeDeserializer.h2
-rw-r--r--include/llvm/DebugInfo/CodeView/TypeRecordMapping.h1
-rw-r--r--include/llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h5
-rw-r--r--include/llvm/DebugInfo/DIContext.h14
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h4
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h68
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFAttribute.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFContext.h8
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h13
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h6
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h6
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h4
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h8
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h10
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugLine.h27
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h35
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h4
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h7
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugRnglists.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDie.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFExpression.h14
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFFormValue.h10
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFListTable.h77
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFObject.h30
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFUnit.h51
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFVerifier.h4
-rw-r--r--include/llvm/DebugInfo/GSYM/FileEntry.h7
-rw-r--r--include/llvm/DebugInfo/GSYM/FileWriter.h124
-rw-r--r--include/llvm/DebugInfo/GSYM/FunctionInfo.h154
-rw-r--r--include/llvm/DebugInfo/GSYM/GsymCreator.h229
-rw-r--r--include/llvm/DebugInfo/GSYM/GsymReader.h228
-rw-r--r--include/llvm/DebugInfo/GSYM/Header.h129
-rw-r--r--include/llvm/DebugInfo/GSYM/InlineInfo.h63
-rw-r--r--include/llvm/DebugInfo/GSYM/LineEntry.h7
-rw-r--r--include/llvm/DebugInfo/GSYM/LineTable.h198
-rw-r--r--include/llvm/DebugInfo/GSYM/Range.h33
-rw-r--r--include/llvm/DebugInfo/GSYM/StringTable.h7
-rw-r--r--include/llvm/DebugInfo/PDB/GenericError.h2
-rw-r--r--include/llvm/DebugInfo/PDB/Native/SymbolCache.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbol.h2
-rw-r--r--include/llvm/DebugInfo/Symbolize/Symbolize.h1
-rw-r--r--include/llvm/Demangle/Demangle.h9
-rw-r--r--include/llvm/Demangle/DemangleConfig.h7
-rw-r--r--include/llvm/Demangle/ItaniumDemangle.h419
-rw-r--r--include/llvm/Demangle/MicrosoftDemangle.h1
-rw-r--r--include/llvm/Demangle/MicrosoftDemangleNodes.h7
-rw-r--r--include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h39
-rw-r--r--include/llvm/ExecutionEngine/JITLink/JITLink.h1244
-rw-r--r--include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h17
-rw-r--r--include/llvm/ExecutionEngine/JITLink/MachO_arm64.h60
-rw-r--r--include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h1
-rw-r--r--include/llvm/ExecutionEngine/JITSymbol.h5
-rw-r--r--include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h10
-rw-r--r--include/llvm/ExecutionEngine/Orc/Core.h137
-rw-r--r--include/llvm/ExecutionEngine/Orc/ExecutionUtils.h46
-rw-r--r--include/llvm/ExecutionEngine/Orc/IRTransformLayer.h3
-rw-r--r--include/llvm/ExecutionEngine/Orc/LLJIT.h4
-rw-r--r--include/llvm/ExecutionEngine/Orc/LambdaResolver.h5
-rw-r--r--include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h40
-rw-r--r--include/llvm/ExecutionEngine/Orc/LazyReexports.h13
-rw-r--r--include/llvm/ExecutionEngine/Orc/Legacy.h2
-rw-r--r--include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h23
-rw-r--r--include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h4
-rw-r--r--include/llvm/ExecutionEngine/Orc/RPCSerialization.h12
-rw-r--r--include/llvm/ExecutionEngine/Orc/RPCUtils.h65
-rw-r--r--include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h6
-rw-r--r--include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h21
-rw-r--r--include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h84
-rw-r--r--include/llvm/ExecutionEngine/Orc/Speculation.h207
-rw-r--r--include/llvm/ExecutionEngine/Orc/ThreadSafeModule.h53
-rw-r--r--include/llvm/ExecutionEngine/RuntimeDyld.h23
-rw-r--r--include/llvm/IR/Attributes.h49
-rw-r--r--include/llvm/IR/AutoUpgrade.h10
-rw-r--r--include/llvm/IR/BasicBlock.h5
-rw-r--r--include/llvm/IR/CallSite.h9
-rw-r--r--include/llvm/IR/CallingConv.h13
-rw-r--r--include/llvm/IR/Constant.h6
-rw-r--r--include/llvm/IR/ConstantRange.h10
-rw-r--r--include/llvm/IR/DataLayout.h125
-rw-r--r--include/llvm/IR/DebugInfoFlags.def6
-rw-r--r--include/llvm/IR/DebugInfoMetadata.h4
-rw-r--r--include/llvm/IR/DerivedTypes.h75
-rw-r--r--include/llvm/IR/DiagnosticInfo.h25
-rw-r--r--include/llvm/IR/FixedMetadataKinds.def43
-rw-r--r--include/llvm/IR/Function.h15
-rw-r--r--include/llvm/IR/GlobalAlias.h4
-rw-r--r--include/llvm/IR/GlobalIFunc.h4
-rw-r--r--include/llvm/IR/GlobalIndirectSymbol.h8
-rw-r--r--include/llvm/IR/GlobalObject.h26
-rw-r--r--include/llvm/IR/GlobalVariable.h1
-rw-r--r--include/llvm/IR/IRBuilder.h90
-rw-r--r--include/llvm/IR/InlineAsm.h1
-rw-r--r--include/llvm/IR/InstrTypes.h12
-rw-r--r--include/llvm/IR/Instruction.h10
-rw-r--r--include/llvm/IR/Instructions.h99
-rw-r--r--include/llvm/IR/IntrinsicInst.h23
-rw-r--r--include/llvm/IR/Intrinsics.h10
-rw-r--r--include/llvm/IR/Intrinsics.td295
-rw-r--r--include/llvm/IR/IntrinsicsAArch64.td125
-rw-r--r--include/llvm/IR/IntrinsicsAMDGPU.td121
-rw-r--r--include/llvm/IR/IntrinsicsARM.td9
-rw-r--r--include/llvm/IR/IntrinsicsBPF.td3
-rw-r--r--include/llvm/IR/IntrinsicsMips.td16
-rw-r--r--include/llvm/IR/IntrinsicsNVVM.td125
-rw-r--r--include/llvm/IR/IntrinsicsWebAssembly.td58
-rw-r--r--include/llvm/IR/IntrinsicsX86.td12
-rw-r--r--include/llvm/IR/LLVMContext.h31
-rw-r--r--include/llvm/IR/MDBuilder.h5
-rw-r--r--include/llvm/IR/Metadata.h4
-rw-r--r--include/llvm/IR/Module.h1
-rw-r--r--include/llvm/IR/ModuleSummaryIndex.h18
-rw-r--r--include/llvm/IR/ModuleSummaryIndexYAML.h2
-rw-r--r--include/llvm/IR/Operator.h21
-rw-r--r--include/llvm/IR/PassManager.h5
-rw-r--r--include/llvm/IR/PassManagerInternal.h2
-rw-r--r--include/llvm/IR/PatternMatch.h155
-rw-r--r--include/llvm/IR/RemarkStreamer.h28
-rw-r--r--include/llvm/IR/Type.h15
-rw-r--r--include/llvm/IR/User.h2
-rw-r--r--include/llvm/IR/Value.h58
-rw-r--r--include/llvm/IR/ValueMap.h15
-rw-r--r--include/llvm/InitializePasses.h10
-rw-r--r--include/llvm/LTO/Config.h2
-rw-r--r--include/llvm/LTO/LTO.h10
-rw-r--r--include/llvm/LTO/legacy/LTOCodeGenerator.h2
-rw-r--r--include/llvm/LinkAllPasses.h2
-rw-r--r--include/llvm/MC/MCAsmInfo.h18
-rw-r--r--include/llvm/MC/MCAsmInfoXCOFF.h5
-rw-r--r--include/llvm/MC/MCAsmMacro.h11
-rw-r--r--include/llvm/MC/MCContext.h23
-rw-r--r--include/llvm/MC/MCDirectives.h1
-rw-r--r--include/llvm/MC/MCDwarf.h3
-rw-r--r--include/llvm/MC/MCExpr.h8
-rw-r--r--include/llvm/MC/MCFixup.h119
-rw-r--r--include/llvm/MC/MCFragment.h16
-rw-r--r--include/llvm/MC/MCInstPrinter.h2
-rw-r--r--include/llvm/MC/MCInstrAnalysis.h6
-rw-r--r--include/llvm/MC/MCInstrDesc.h23
-rw-r--r--include/llvm/MC/MCLinkerOptimizationHint.h2
-rw-r--r--include/llvm/MC/MCRegister.h110
-rw-r--r--include/llvm/MC/MCRegisterInfo.h98
-rw-r--r--include/llvm/MC/MCSection.h7
-rw-r--r--include/llvm/MC/MCSectionXCOFF.h22
-rw-r--r--include/llvm/MC/MCStreamer.h41
-rw-r--r--include/llvm/MC/MCSubtargetInfo.h46
-rw-r--r--include/llvm/MC/MCSymbolWasm.h7
-rw-r--r--include/llvm/MC/MCSymbolXCOFF.h32
-rw-r--r--include/llvm/MC/MCWasmObjectWriter.h4
-rw-r--r--include/llvm/MC/MCXCOFFStreamer.h2
-rw-r--r--include/llvm/MC/StringTableBuilder.h2
-rw-r--r--include/llvm/MC/SubtargetFeature.h139
-rw-r--r--include/llvm/MCA/CodeEmitter.h72
-rw-r--r--include/llvm/MCA/Context.h5
-rw-r--r--include/llvm/MCA/HardwareUnits/LSUnit.h18
-rw-r--r--include/llvm/MCA/HardwareUnits/RegisterFile.h2
-rw-r--r--include/llvm/MCA/HardwareUnits/ResourceManager.h51
-rw-r--r--include/llvm/MCA/HardwareUnits/RetireControlUnit.h33
-rw-r--r--include/llvm/MCA/HardwareUnits/Scheduler.h13
-rw-r--r--include/llvm/MCA/Instruction.h51
-rw-r--r--include/llvm/MCA/SourceMgr.h5
-rw-r--r--include/llvm/MCA/Stages/RetireStage.h6
-rw-r--r--include/llvm/Object/Archive.h7
-rw-r--r--include/llvm/Object/Binary.h16
-rw-r--r--include/llvm/Object/COFF.h36
-rw-r--r--include/llvm/Object/ELF.h112
-rw-r--r--include/llvm/Object/ELFObjectFile.h31
-rw-r--r--include/llvm/Object/ELFTypes.h6
-rw-r--r--include/llvm/Object/MachO.h1
-rw-r--r--include/llvm/Object/MachOUniversal.h14
-rw-r--r--include/llvm/Object/Minidump.h77
-rw-r--r--include/llvm/Object/ObjectFile.h21
-rw-r--r--include/llvm/Object/StackMapParser.h4
-rw-r--r--include/llvm/Object/TapiFile.h60
-rw-r--r--include/llvm/Object/TapiUniversal.h109
-rw-r--r--include/llvm/Object/WindowsResource.h55
-rw-r--r--include/llvm/Object/XCOFFObjectFile.h132
-rw-r--r--include/llvm/ObjectYAML/DWARFYAML.h2
-rw-r--r--include/llvm/ObjectYAML/ELFYAML.h116
-rw-r--r--include/llvm/ObjectYAML/MachOYAML.h3
-rw-r--r--include/llvm/ObjectYAML/MinidumpYAML.h64
-rw-r--r--include/llvm/ObjectYAML/WasmYAML.h2
-rw-r--r--include/llvm/ObjectYAML/yaml2obj.h67
-rw-r--r--include/llvm/Pass.h5
-rw-r--r--include/llvm/Passes/PassBuilder.h7
-rw-r--r--include/llvm/ProfileData/Coverage/CoverageMapping.h16
-rw-r--r--include/llvm/ProfileData/Coverage/CoverageMappingWriter.h3
-rw-r--r--include/llvm/ProfileData/InstrProf.h18
-rw-r--r--include/llvm/ProfileData/InstrProfReader.h12
-rw-r--r--include/llvm/ProfileData/SampleProf.h178
-rw-r--r--include/llvm/ProfileData/SampleProfReader.h272
-rw-r--r--include/llvm/ProfileData/SampleProfWriter.h118
-rw-r--r--include/llvm/Remarks/BitstreamRemarkContainer.h106
-rw-r--r--include/llvm/Remarks/BitstreamRemarkParser.h116
-rw-r--r--include/llvm/Remarks/BitstreamRemarkSerializer.h196
-rw-r--r--include/llvm/Remarks/Remark.h36
-rw-r--r--include/llvm/Remarks/RemarkFormat.h4
-rw-r--r--include/llvm/Remarks/RemarkParser.h38
-rw-r--r--include/llvm/Remarks/RemarkSerializer.h70
-rw-r--r--include/llvm/Remarks/RemarkStringTable.h24
-rw-r--r--include/llvm/Remarks/YAMLRemarkSerializer.h108
-rw-r--r--include/llvm/Support/AArch64TargetParser.def72
-rw-r--r--include/llvm/Support/AArch64TargetParser.h3
-rw-r--r--include/llvm/Support/ARMTargetParser.def2
-rw-r--r--include/llvm/Support/ARMTargetParser.h20
-rw-r--r--include/llvm/Support/AlignOf.h134
-rw-r--r--include/llvm/Support/Alignment.h403
-rw-r--r--include/llvm/Support/Allocator.h22
-rw-r--r--include/llvm/Support/Automaton.h253
-rw-r--r--include/llvm/Support/BinaryStreamArray.h2
-rw-r--r--include/llvm/Support/BinaryStreamReader.h2
-rw-r--r--include/llvm/Support/CRC.h45
-rw-r--r--include/llvm/Support/CommandLine.h3
-rw-r--r--include/llvm/Support/Compiler.h81
-rw-r--r--include/llvm/Support/DataExtractor.h196
-rw-r--r--include/llvm/Support/Endian.h10
-rw-r--r--include/llvm/Support/Error.h42
-rw-r--r--include/llvm/Support/FileCheck.h604
-rw-r--r--include/llvm/Support/FileCollector.h79
-rw-r--r--include/llvm/Support/FileSystem.h30
-rw-r--r--include/llvm/Support/FileUtilities.h38
-rw-r--r--include/llvm/Support/Format.h5
-rw-r--r--include/llvm/Support/GenericDomTree.h6
-rw-r--r--include/llvm/Support/GenericDomTreeConstruction.h8
-rw-r--r--include/llvm/Support/GlobPattern.h2
-rw-r--r--include/llvm/Support/Host.h28
-rw-r--r--include/llvm/Support/JamCRC.h48
-rw-r--r--include/llvm/Support/MachineValueType.h419
-rw-r--r--include/llvm/Support/MathExtras.h187
-rw-r--r--include/llvm/Support/Mutex.h105
-rw-r--r--include/llvm/Support/MutexGuard.h40
-rw-r--r--include/llvm/Support/OnDiskHashTable.h3
-rw-r--r--include/llvm/Support/Parallel.h27
-rw-r--r--include/llvm/Support/RWMutex.h321
-rw-r--r--include/llvm/Support/Regex.h18
-rw-r--r--include/llvm/Support/Registry.h2
-rw-r--r--include/llvm/Support/SHA1.h2
-rw-r--r--include/llvm/Support/ScalableSize.h43
-rw-r--r--include/llvm/Support/Signals.h11
-rw-r--r--include/llvm/Support/SwapByteOrder.h38
-rw-r--r--include/llvm/Support/TargetOpcodes.def26
-rw-r--r--include/llvm/Support/TargetRegistry.h4
-rw-r--r--include/llvm/Support/TimeProfiler.h2
-rw-r--r--include/llvm/Support/TrailingObjects.h18
-rw-r--r--include/llvm/Support/TypeSize.h201
-rw-r--r--include/llvm/Support/UnicodeCharRanges.h3
-rw-r--r--include/llvm/Support/UniqueLock.h68
-rw-r--r--include/llvm/Support/VirtualFileSystem.h16
-rw-r--r--include/llvm/Support/Win64EH.h4
-rw-r--r--include/llvm/Support/X86TargetParser.def4
-rw-r--r--include/llvm/Support/YAMLTraits.h11
-rw-r--r--include/llvm/Support/circular_raw_ostream.h4
-rw-r--r--include/llvm/Support/raw_ostream.h27
-rw-r--r--include/llvm/Support/type_traits.h18
-rw-r--r--include/llvm/TableGen/Automaton.td95
-rw-r--r--include/llvm/TableGen/Error.h1
-rw-r--r--include/llvm/TableGen/Record.h14
-rw-r--r--include/llvm/Target/GenericOpcodes.td87
-rw-r--r--include/llvm/Target/GlobalISel/Combine.td103
-rw-r--r--include/llvm/Target/GlobalISel/SelectionDAGCompat.td25
-rw-r--r--include/llvm/Target/Target.td33
-rw-r--r--include/llvm/Target/TargetCallingConv.td6
-rw-r--r--include/llvm/Target/TargetItinerary.td11
-rw-r--r--include/llvm/Target/TargetLoweringObjectFile.h3
-rw-r--r--include/llvm/Target/TargetMachine.h28
-rw-r--r--include/llvm/Target/TargetSchedule.td8
-rw-r--r--include/llvm/Target/TargetSelectionDAG.td146
-rw-r--r--include/llvm/TextAPI/MachO/Architecture.h4
-rw-r--r--include/llvm/TextAPI/MachO/ArchitectureSet.h4
-rw-r--r--include/llvm/TextAPI/MachO/InterfaceFile.h240
-rw-r--r--include/llvm/TextAPI/MachO/Platform.h45
-rw-r--r--include/llvm/TextAPI/MachO/Symbol.h35
-rw-r--r--include/llvm/TextAPI/MachO/Target.h68
-rw-r--r--include/llvm/TextAPI/MachO/TextAPIReader.h5
-rw-r--r--include/llvm/Transforms/IPO/Attributor.h1729
-rw-r--r--include/llvm/Transforms/IPO/GlobalDCE.h14
-rw-r--r--include/llvm/Transforms/IPO/HotColdSplitting.h39
-rw-r--r--include/llvm/Transforms/IPO/LowerTypeTests.h2
-rw-r--r--include/llvm/Transforms/IPO/WholeProgramDevirt.h26
-rw-r--r--include/llvm/Transforms/Instrumentation.h4
-rw-r--r--include/llvm/Transforms/Instrumentation/InstrProfiling.h5
-rw-r--r--include/llvm/Transforms/Instrumentation/MemorySanitizer.h12
-rw-r--r--include/llvm/Transforms/Instrumentation/SanitizerCoverage.h47
-rw-r--r--include/llvm/Transforms/Instrumentation/ThreadSanitizer.h2
-rw-r--r--include/llvm/Transforms/Scalar.h9
-rw-r--r--include/llvm/Transforms/Scalar/CallSiteSplitting.h5
-rw-r--r--include/llvm/Transforms/Scalar/ConstantHoisting.h10
-rw-r--r--include/llvm/Transforms/Scalar/Float2Int.h6
-rw-r--r--include/llvm/Transforms/Scalar/GVN.h7
-rw-r--r--include/llvm/Transforms/Scalar/GVNExpression.h9
-rw-r--r--include/llvm/Transforms/Scalar/LoopPassManager.h24
-rw-r--r--include/llvm/Transforms/Scalar/LoopUnrollPass.h14
-rw-r--r--include/llvm/Transforms/Scalar/LowerConstantIntrinsics.h41
-rw-r--r--include/llvm/Transforms/Scalar/MergedLoadStoreMotion.h18
-rw-r--r--include/llvm/Transforms/Scalar/Reassociate.h4
-rw-r--r--include/llvm/Transforms/Scalar/SCCP.h3
-rw-r--r--include/llvm/Transforms/Utils/BasicBlockUtils.h11
-rw-r--r--include/llvm/Transforms/Utils/BuildLibCalls.h27
-rw-r--r--include/llvm/Transforms/Utils/BypassSlowDivision.h13
-rw-r--r--include/llvm/Transforms/Utils/CodeExtractor.h57
-rw-r--r--include/llvm/Transforms/Utils/Local.h16
-rw-r--r--include/llvm/Transforms/Utils/LoopUtils.h5
-rw-r--r--include/llvm/Transforms/Utils/MisExpect.h43
-rw-r--r--include/llvm/Transforms/Utils/PredicateInfo.h10
-rw-r--r--include/llvm/Transforms/Utils/SimplifyLibCalls.h10
-rw-r--r--include/llvm/Transforms/Utils/UnrollLoop.h8
-rw-r--r--include/llvm/Transforms/Utils/ValueMapper.h9
-rw-r--r--include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h48
-rw-r--r--include/llvm/Transforms/Vectorize/LoopVectorize.h8
-rw-r--r--include/llvm/Transforms/Vectorize/SLPVectorizer.h9
-rw-r--r--include/llvm/XRay/FDRRecordProducer.h4
-rw-r--r--include/llvm/XRay/FDRRecords.h6
-rw-r--r--include/llvm/XRay/FileHeaderReader.h2
-rw-r--r--include/llvm/module.modulemap2
-rw-r--r--lib/Analysis/AliasAnalysis.cpp4
-rw-r--r--lib/Analysis/AliasSetTracker.cpp12
-rw-r--r--lib/Analysis/Analysis.cpp1
-rw-r--r--lib/Analysis/AssumptionCache.cpp12
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp42
-rw-r--r--lib/Analysis/BranchProbabilityInfo.cpp19
-rw-r--r--lib/Analysis/CFG.cpp11
-rw-r--r--lib/Analysis/CFGPrinter.cpp2
-rw-r--r--lib/Analysis/CFLAndersAliasAnalysis.cpp19
-rw-r--r--lib/Analysis/CFLSteensAliasAnalysis.cpp20
-rw-r--r--lib/Analysis/CallGraph.cpp4
-rw-r--r--lib/Analysis/CaptureTracking.cpp46
-rw-r--r--lib/Analysis/ConstantFolding.cpp405
-rw-r--r--lib/Analysis/DDG.cpp203
-rw-r--r--lib/Analysis/DependenceAnalysis.cpp8
-rw-r--r--lib/Analysis/DependenceGraphBuilder.cpp228
-rw-r--r--lib/Analysis/DivergenceAnalysis.cpp10
-rw-r--r--lib/Analysis/GlobalsModRef.cpp37
-rw-r--r--lib/Analysis/IVDescriptors.cpp3
-rw-r--r--lib/Analysis/IndirectCallPromotionAnalysis.cpp2
-rw-r--r--lib/Analysis/InlineCost.cpp23
-rw-r--r--lib/Analysis/InstructionSimplify.cpp320
-rw-r--r--lib/Analysis/LazyBranchProbabilityInfo.cpp5
-rw-r--r--lib/Analysis/LazyCallGraph.cpp13
-rw-r--r--lib/Analysis/LazyValueInfo.cpp37
-rw-r--r--lib/Analysis/LegacyDivergenceAnalysis.cpp36
-rw-r--r--lib/Analysis/Lint.cpp2
-rw-r--r--lib/Analysis/Loads.cpp238
-rw-r--r--lib/Analysis/LoopAccessAnalysis.cpp45
-rw-r--r--lib/Analysis/LoopAnalysisManager.cpp2
-rw-r--r--lib/Analysis/LoopCacheAnalysis.cpp625
-rw-r--r--lib/Analysis/LoopInfo.cpp39
-rw-r--r--lib/Analysis/LoopUnrollAnalyzer.cpp2
-rw-r--r--lib/Analysis/MemDerefPrinter.cpp4
-rw-r--r--lib/Analysis/MemoryBuiltins.cpp51
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp21
-rw-r--r--lib/Analysis/MemorySSA.cpp95
-rw-r--r--lib/Analysis/MemorySSAUpdater.cpp323
-rw-r--r--lib/Analysis/ModuleSummaryAnalysis.cpp16
-rw-r--r--lib/Analysis/MustExecute.cpp118
-rw-r--r--lib/Analysis/OptimizationRemarkEmitter.cpp4
-rw-r--r--lib/Analysis/OrderedInstructions.cpp2
-rw-r--r--lib/Analysis/ProfileSummaryInfo.cpp67
-rw-r--r--lib/Analysis/ScalarEvolution.cpp89
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp19
-rw-r--r--lib/Analysis/StackSafetyAnalysis.cpp4
-rw-r--r--lib/Analysis/SyncDependenceAnalysis.cpp61
-rw-r--r--lib/Analysis/TargetLibraryInfo.cpp44
-rw-r--r--lib/Analysis/TargetTransformInfo.cpp64
-rw-r--r--lib/Analysis/TypeMetadataUtils.cpp32
-rw-r--r--lib/Analysis/VFABIDemangling.cpp418
-rw-r--r--lib/Analysis/ValueTracking.cpp658
-rw-r--r--lib/Analysis/VectorUtils.cpp20
-rw-r--r--lib/AsmParser/LLLexer.cpp1
-rw-r--r--lib/AsmParser/LLParser.cpp81
-rw-r--r--lib/AsmParser/LLParser.h4
-rw-r--r--lib/AsmParser/LLToken.h1
-rw-r--r--lib/AsmParser/Parser.cpp8
-rw-r--r--lib/BinaryFormat/Dwarf.cpp22
-rw-r--r--lib/BinaryFormat/Magic.cpp5
-rw-r--r--lib/Bitcode/Reader/BitcodeAnalyzer.cpp10
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp84
-rw-r--r--lib/Bitcode/Reader/MetadataLoader.cpp6
-rw-r--r--lib/Bitcode/Writer/BitWriter.cpp2
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp9
-rw-r--r--lib/CodeGen/AggressiveAntiDepBreaker.cpp16
-rw-r--r--lib/CodeGen/Analysis.cpp12
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp255
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp3
-rw-r--r--lib/CodeGen/AsmPrinter/ByteStreamer.h12
-rw-r--r--lib/CodeGen/AsmPrinter/CodeViewDebug.cpp116
-rw-r--r--lib/CodeGen/AsmPrinter/CodeViewDebug.h3
-rw-r--r--lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp12
-rw-r--r--lib/CodeGen/AsmPrinter/DebugLocStream.h19
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp176
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.h31
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp644
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h22
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfExpression.cpp95
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfExpression.h95
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfFile.h19
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfUnit.cpp47
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfUnit.h14
-rw-r--r--lib/CodeGen/AsmPrinter/EHStreamer.cpp6
-rw-r--r--lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp2
-rw-r--r--lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp4
-rw-r--r--lib/CodeGen/AsmPrinter/WinException.cpp3
-rw-r--r--lib/CodeGen/AtomicExpandPass.cpp12
-rw-r--r--lib/CodeGen/BranchFolding.cpp34
-rw-r--r--lib/CodeGen/BranchRelaxation.cpp22
-rw-r--r--lib/CodeGen/BreakFalseDeps.cpp23
-rw-r--r--lib/CodeGen/CalcSpillWeights.cpp22
-rw-r--r--lib/CodeGen/CallingConvLower.cpp42
-rw-r--r--lib/CodeGen/CodeGen.cpp5
-rw-r--r--lib/CodeGen/CodeGenPrepare.cpp122
-rw-r--r--lib/CodeGen/CriticalAntiDepBreaker.cpp9
-rw-r--r--lib/CodeGen/DFAPacketizer.cpp81
-rw-r--r--lib/CodeGen/DeadMachineInstructionElim.cpp12
-rw-r--r--lib/CodeGen/DetectDeadLanes.cpp56
-rw-r--r--lib/CodeGen/EarlyIfConversion.cpp345
-rw-r--r--lib/CodeGen/ExecutionDomainFix.cpp1
-rw-r--r--lib/CodeGen/ExpandMemCmp.cpp2
-rw-r--r--lib/CodeGen/ExpandPostRAPseudos.cpp10
-rw-r--r--lib/CodeGen/GCMetadata.cpp2
-rw-r--r--lib/CodeGen/GCRootLowering.cpp4
-rw-r--r--lib/CodeGen/GlobalISel/CSEInfo.cpp7
-rw-r--r--lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp11
-rw-r--r--lib/CodeGen/GlobalISel/CallLowering.cpp288
-rw-r--r--lib/CodeGen/GlobalISel/Combiner.cpp14
-rw-r--r--lib/CodeGen/GlobalISel/CombinerHelper.cpp919
-rw-r--r--lib/CodeGen/GlobalISel/GISelKnownBits.cpp383
-rw-r--r--lib/CodeGen/GlobalISel/IRTranslator.cpp392
-rw-r--r--lib/CodeGen/GlobalISel/InstructionSelect.cpp38
-rw-r--r--lib/CodeGen/GlobalISel/InstructionSelector.cpp2
-rw-r--r--lib/CodeGen/GlobalISel/Legalizer.cpp35
-rw-r--r--lib/CodeGen/GlobalISel/LegalizerHelper.cpp978
-rw-r--r--lib/CodeGen/GlobalISel/LegalizerInfo.cpp42
-rw-r--r--lib/CodeGen/GlobalISel/Localizer.cpp11
-rw-r--r--lib/CodeGen/GlobalISel/MachineIRBuilder.cpp93
-rw-r--r--lib/CodeGen/GlobalISel/RegBankSelect.cpp13
-rw-r--r--lib/CodeGen/GlobalISel/RegisterBank.cpp1
-rw-r--r--lib/CodeGen/GlobalISel/RegisterBankInfo.cpp17
-rw-r--r--lib/CodeGen/GlobalISel/Utils.cpp98
-rw-r--r--lib/CodeGen/GlobalMerge.cpp8
-rw-r--r--lib/CodeGen/HardwareLoops.cpp2
-rw-r--r--lib/CodeGen/IfConversion.cpp200
-rw-r--r--lib/CodeGen/ImplicitNullChecks.cpp8
-rw-r--r--lib/CodeGen/InlineSpiller.cpp22
-rw-r--r--lib/CodeGen/InterleavedLoadCombinePass.cpp4
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp34
-rw-r--r--lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp6
-rw-r--r--lib/CodeGen/LexicalScopes.cpp1
-rw-r--r--lib/CodeGen/LiveDebugValues.cpp510
-rw-r--r--lib/CodeGen/LiveDebugVariables.cpp257
-rw-r--r--lib/CodeGen/LiveInterval.cpp7
-rw-r--r--lib/CodeGen/LiveIntervals.cpp59
-rw-r--r--lib/CodeGen/LivePhysRegs.cpp20
-rw-r--r--lib/CodeGen/LiveRangeCalc.cpp5
-rw-r--r--lib/CodeGen/LiveRangeEdit.cpp14
-rw-r--r--lib/CodeGen/LiveRangeShrink.cpp4
-rw-r--r--lib/CodeGen/LiveRegMatrix.cpp2
-rw-r--r--lib/CodeGen/LiveRegUnits.cpp12
-rw-r--r--lib/CodeGen/LiveStacks.cpp7
-rw-r--r--lib/CodeGen/LiveVariables.cpp29
-rw-r--r--lib/CodeGen/LocalStackSlotAllocation.cpp10
-rw-r--r--lib/CodeGen/LowerEmuTLS.cpp7
-rw-r--r--lib/CodeGen/MIRCanonicalizerPass.cpp359
-rw-r--r--lib/CodeGen/MIRNamerPass.cpp77
-rw-r--r--lib/CodeGen/MIRParser/MILexer.cpp1
-rw-r--r--lib/CodeGen/MIRParser/MILexer.h2
-rw-r--r--lib/CodeGen/MIRParser/MIParser.cpp60
-rw-r--r--lib/CodeGen/MIRParser/MIRParser.cpp18
-rw-r--r--lib/CodeGen/MIRPrinter.cpp16
-rw-r--r--lib/CodeGen/MIRVRegNamerUtils.cpp348
-rw-r--r--lib/CodeGen/MIRVRegNamerUtils.h91
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp64
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp28
-rw-r--r--lib/CodeGen/MachineCSE.cpp75
-rw-r--r--lib/CodeGen/MachineCombiner.cpp6
-rw-r--r--lib/CodeGen/MachineCopyPropagation.cpp78
-rw-r--r--lib/CodeGen/MachineDominators.cpp23
-rw-r--r--lib/CodeGen/MachineFrameInfo.cpp38
-rw-r--r--lib/CodeGen/MachineFunction.cpp58
-rw-r--r--lib/CodeGen/MachineFunctionPass.cpp6
-rw-r--r--lib/CodeGen/MachineInstr.cpp116
-rw-r--r--lib/CodeGen/MachineInstrBundle.cpp14
-rw-r--r--lib/CodeGen/MachineLICM.cpp61
-rw-r--r--lib/CodeGen/MachineLoopUtils.cpp132
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp85
-rw-r--r--lib/CodeGen/MachineOperand.cpp70
-rw-r--r--lib/CodeGen/MachineOptimizationRemarkEmitter.cpp2
-rw-r--r--lib/CodeGen/MachineOutliner.cpp16
-rw-r--r--lib/CodeGen/MachinePipeliner.cpp1235
-rw-r--r--lib/CodeGen/MachinePostDominators.cpp55
-rw-r--r--lib/CodeGen/MachineRegisterInfo.cpp12
-rw-r--r--lib/CodeGen/MachineSSAUpdater.cpp6
-rw-r--r--lib/CodeGen/MachineScheduler.cpp59
-rw-r--r--lib/CodeGen/MachineSink.cpp73
-rw-r--r--lib/CodeGen/MachineTraceMetrics.cpp24
-rw-r--r--lib/CodeGen/MachineVerifier.cpp163
-rw-r--r--lib/CodeGen/MacroFusion.cpp4
-rw-r--r--lib/CodeGen/ModuloSchedule.cpp2022
-rw-r--r--lib/CodeGen/OptimizePHIs.cpp15
-rw-r--r--lib/CodeGen/PHIElimination.cpp43
-rw-r--r--lib/CodeGen/PatchableFunction.cpp2
-rw-r--r--lib/CodeGen/PeepholeOptimizer.cpp83
-rw-r--r--lib/CodeGen/PreISelIntrinsicLowering.cpp2
-rw-r--r--lib/CodeGen/ProcessImplicitDefs.cpp8
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp2
-rw-r--r--lib/CodeGen/PseudoSourceValue.cpp6
-rw-r--r--lib/CodeGen/ReachingDefAnalysis.cpp1
-rw-r--r--lib/CodeGen/RegAllocBase.cpp4
-rw-r--r--lib/CodeGen/RegAllocFast.cpp117
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp16
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp12
-rw-r--r--lib/CodeGen/RegUsageInfoCollector.cpp10
-rw-r--r--lib/CodeGen/RegUsageInfoPropagate.cpp6
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp71
-rw-r--r--lib/CodeGen/RegisterPressure.cpp36
-rw-r--r--lib/CodeGen/RegisterScavenging.cpp62
-rw-r--r--lib/CodeGen/RenameIndependentSubregs.cpp4
-rw-r--r--lib/CodeGen/SafeStack.cpp2
-rw-r--r--lib/CodeGen/ScalarizeMaskedMemIntrin.cpp167
-rw-r--r--lib/CodeGen/ScheduleDAGInstrs.cpp57
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp1758
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp67
-rw-r--r--lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp7
-rw-r--r--lib/CodeGen/SelectionDAG/InstrEmitter.cpp77
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp222
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp430
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp510
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.cpp56
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypes.h61
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp46
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp50
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp139
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp2
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp18
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp18
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h3
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp9
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp283
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp1
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp495
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h2
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp9
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp35
-rw-r--r--lib/CodeGen/SelectionDAG/StatepointLowering.cpp34
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp1406
-rw-r--r--lib/CodeGen/ShrinkWrap.cpp5
-rw-r--r--lib/CodeGen/SjLjEHPrepare.cpp5
-rw-r--r--lib/CodeGen/SplitKit.cpp6
-rw-r--r--lib/CodeGen/SplitKit.h2
-rw-r--r--lib/CodeGen/StackMaps.cpp8
-rw-r--r--lib/CodeGen/StackProtector.cpp67
-rw-r--r--lib/CodeGen/StackSlotColoring.cpp8
-rw-r--r--lib/CodeGen/SwiftErrorValueTracking.cpp3
-rw-r--r--lib/CodeGen/TailDuplicator.cpp22
-rw-r--r--lib/CodeGen/TargetFrameLoweringImpl.cpp19
-rw-r--r--lib/CodeGen/TargetInstrInfo.cpp82
-rw-r--r--lib/CodeGen/TargetLoweringBase.cpp95
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp107
-rw-r--r--lib/CodeGen/TargetPassConfig.cpp24
-rw-r--r--lib/CodeGen/TargetRegisterInfo.cpp60
-rw-r--r--lib/CodeGen/TargetSchedule.cpp2
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp90
-rw-r--r--lib/CodeGen/UnreachableBlockElim.cpp15
-rw-r--r--lib/CodeGen/ValueTypes.cpp150
-rw-r--r--lib/CodeGen/VirtRegMap.cpp71
-rw-r--r--lib/CodeGen/XRayInstrumentation.cpp2
-rw-r--r--lib/DebugInfo/CodeView/CVTypeVisitor.cpp15
-rw-r--r--lib/DebugInfo/CodeView/CodeViewRecordIO.cpp8
-rw-r--r--lib/DebugInfo/CodeView/EnumTables.cpp166
-rw-r--r--lib/DebugInfo/CodeView/SymbolDumper.cpp2
-rw-r--r--lib/DebugInfo/CodeView/SymbolRecordMapping.cpp2
-rw-r--r--lib/DebugInfo/CodeView/TypeRecordMapping.cpp238
-rw-r--r--lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp8
-rw-r--r--lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp105
-rw-r--r--lib/DebugInfo/DWARF/DWARFCompileUnit.cpp10
-rw-r--r--lib/DebugInfo/DWARF/DWARFContext.cpp335
-rw-r--r--lib/DebugInfo/DWARF/DWARFDataExtractor.cpp13
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugAbbrev.cpp10
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugAddr.cpp28
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp4
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugAranges.cpp12
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugFrame.cpp74
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp8
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugLine.cpp159
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugLoc.cpp257
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugMacro.cpp2
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp6
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp18
-rw-r--r--lib/DebugInfo/DWARF/DWARFDebugRnglists.cpp30
-rw-r--r--lib/DebugInfo/DWARF/DWARFDie.cpp54
-rw-r--r--lib/DebugInfo/DWARF/DWARFExpression.cpp13
-rw-r--r--lib/DebugInfo/DWARF/DWARFFormValue.cpp9
-rw-r--r--lib/DebugInfo/DWARF/DWARFGdbIndex.cpp2
-rw-r--r--lib/DebugInfo/DWARF/DWARFListTable.cpp70
-rw-r--r--lib/DebugInfo/DWARF/DWARFTypeUnit.cpp14
-rw-r--r--lib/DebugInfo/DWARF/DWARFUnit.cpp231
-rw-r--r--lib/DebugInfo/DWARF/DWARFUnitIndex.cpp12
-rw-r--r--lib/DebugInfo/DWARF/DWARFVerifier.cpp120
-rw-r--r--lib/DebugInfo/GSYM/FileWriter.cpp78
-rw-r--r--lib/DebugInfo/GSYM/FunctionInfo.cpp143
-rw-r--r--lib/DebugInfo/GSYM/GsymCreator.cpp275
-rw-r--r--lib/DebugInfo/GSYM/GsymReader.cpp265
-rw-r--r--lib/DebugInfo/GSYM/Header.cpp109
-rw-r--r--lib/DebugInfo/GSYM/InlineInfo.cpp100
-rw-r--r--lib/DebugInfo/GSYM/LineTable.cpp287
-rw-r--r--lib/DebugInfo/GSYM/Range.cpp47
-rw-r--r--lib/DebugInfo/MSF/MappedBlockStream.cpp6
-rw-r--r--lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp28
-rw-r--r--lib/DebugInfo/PDB/DIA/DIASectionContrib.cpp2
-rw-r--r--lib/DebugInfo/PDB/DIA/DIASession.cpp46
-rw-r--r--lib/DebugInfo/PDB/GenericError.cpp4
-rw-r--r--lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp4
-rw-r--r--lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp2
-rw-r--r--lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp4
-rw-r--r--lib/DebugInfo/PDB/Native/Hash.cpp5
-rw-r--r--lib/DebugInfo/PDB/Native/NativeEnumInjectedSources.cpp29
-rw-r--r--lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp24
-rw-r--r--lib/DebugInfo/PDB/Native/NativeSession.cpp10
-rw-r--r--lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp4
-rw-r--r--lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp6
-rw-r--r--lib/DebugInfo/PDB/Native/PDBFile.cpp18
-rw-r--r--lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp17
-rw-r--r--lib/DebugInfo/PDB/Native/TpiHashing.cpp6
-rw-r--r--lib/DebugInfo/PDB/Native/TpiStream.cpp2
-rw-r--r--lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp2
-rw-r--r--lib/DebugInfo/PDB/PDBSymbolFunc.cpp2
-rw-r--r--lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp2
-rw-r--r--lib/DebugInfo/PDB/UDTLayout.cpp14
-rw-r--r--lib/DebugInfo/Symbolize/DIPrinter.cpp17
-rw-r--r--lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp32
-rw-r--r--lib/DebugInfo/Symbolize/SymbolizableObjectFile.h7
-rw-r--r--lib/DebugInfo/Symbolize/Symbolize.cpp52
-rw-r--r--lib/Demangle/ItaniumDemangle.cpp10
-rw-r--r--lib/Demangle/MicrosoftDemangle.cpp32
-rw-r--r--lib/Demangle/MicrosoftDemangleNodes.cpp51
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp34
-rw-r--r--lib/ExecutionEngine/GDBRegistrationListener.cpp8
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp4
-rw-r--r--lib/ExecutionEngine/JITLink/BasicGOTAndStubsBuilder.h35
-rw-r--r--lib/ExecutionEngine/JITLink/EHFrameSupport.cpp216
-rw-r--r--lib/ExecutionEngine/JITLink/EHFrameSupportImpl.h50
-rw-r--r--lib/ExecutionEngine/JITLink/JITLink.cpp158
-rw-r--r--lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp385
-rw-r--r--lib/ExecutionEngine/JITLink/JITLinkGeneric.h185
-rw-r--r--lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp63
-rw-r--r--lib/ExecutionEngine/JITLink/MachO.cpp3
-rw-r--r--lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp411
-rw-r--r--lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.h138
-rw-r--r--lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp535
-rw-r--r--lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h269
-rw-r--r--lib/ExecutionEngine/JITLink/MachO_arm64.cpp736
-rw-r--r--lib/ExecutionEngine/JITLink/MachO_x86_64.cpp279
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp38
-rw-r--r--lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp2
-rw-r--r--lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp4
-rw-r--r--lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp127
-rw-r--r--lib/ExecutionEngine/Orc/CompileUtils.cpp2
-rw-r--r--lib/ExecutionEngine/Orc/Core.cpp506
-rw-r--r--lib/ExecutionEngine/Orc/ExecutionUtils.cpp92
-rw-r--r--lib/ExecutionEngine/Orc/IRCompileLayer.cpp4
-rw-r--r--lib/ExecutionEngine/Orc/IRTransformLayer.cpp2
-rw-r--r--lib/ExecutionEngine/Orc/IndirectionUtils.cpp27
-rw-r--r--lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp17
-rw-r--r--lib/ExecutionEngine/Orc/LLJIT.cpp38
-rw-r--r--lib/ExecutionEngine/Orc/Layer.cpp26
-rw-r--r--lib/ExecutionEngine/Orc/LazyReexports.cpp18
-rw-r--r--lib/ExecutionEngine/Orc/Legacy.cpp5
-rw-r--r--lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp258
-rw-r--r--lib/ExecutionEngine/Orc/OrcCBindingsStack.h11
-rw-r--r--lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp24
-rw-r--r--lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp307
-rw-r--r--lib/ExecutionEngine/Orc/Speculation.cpp146
-rw-r--r--lib/ExecutionEngine/Orc/ThreadSafeModule.cpp58
-rw-r--r--lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp8
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp64
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp8
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp2
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp54
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h2
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp17
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h8
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h5
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h5
-rw-r--r--lib/FuzzMutate/FuzzerCLI.cpp2
-rw-r--r--lib/IR/AsmWriter.cpp11
-rw-r--r--lib/IR/AttributeImpl.h6
-rw-r--r--lib/IR/Attributes.cpp84
-rw-r--r--lib/IR/AutoUpgrade.cpp157
-rw-r--r--lib/IR/BasicBlock.cpp7
-rw-r--r--lib/IR/ConstantFold.cpp25
-rw-r--r--lib/IR/ConstantRange.cpp76
-rw-r--r--lib/IR/Constants.cpp56
-rw-r--r--lib/IR/ConstantsContext.h12
-rw-r--r--lib/IR/Core.cpp114
-rw-r--r--lib/IR/DIBuilder.cpp2
-rw-r--r--lib/IR/DataLayout.cpp163
-rw-r--r--lib/IR/DebugInfo.cpp22
-rw-r--r--lib/IR/DebugInfoMetadata.cpp34
-rw-r--r--lib/IR/DiagnosticInfo.cpp11
-rw-r--r--lib/IR/Function.cpp103
-rw-r--r--lib/IR/Globals.cpp51
-rw-r--r--lib/IR/IRBuilder.cpp8
-rw-r--r--lib/IR/IRPrintingPasses.cpp18
-rw-r--r--lib/IR/InlineAsm.cpp10
-rw-r--r--lib/IR/Instruction.cpp2
-rw-r--r--lib/IR/Instructions.cpp167
-rw-r--r--lib/IR/IntrinsicInst.cpp15
-rw-r--r--lib/IR/LLVMContext.cpp31
-rw-r--r--lib/IR/LLVMContextImpl.cpp2
-rw-r--r--lib/IR/LegacyPassManager.cpp20
-rw-r--r--lib/IR/MDBuilder.cpp12
-rw-r--r--lib/IR/Metadata.cpp18
-rw-r--r--lib/IR/Module.cpp2
-rw-r--r--lib/IR/RemarkStreamer.cpp72
-rw-r--r--lib/IR/SafepointIRVerifier.cpp4
-rw-r--r--lib/IR/Type.cpp27
-rw-r--r--lib/IR/Value.cpp111
-rw-r--r--lib/IR/Verifier.cpp167
-rw-r--r--lib/LTO/Caching.cpp4
-rw-r--r--lib/LTO/LTO.cpp63
-rw-r--r--lib/LTO/LTOBackend.cpp18
-rw-r--r--lib/LTO/LTOCodeGenerator.cpp13
-rw-r--r--lib/LTO/LTOModule.cpp3
-rw-r--r--lib/LTO/SummaryBasedOptimizations.cpp2
-rw-r--r--lib/LTO/ThinLTOCodeGenerator.cpp139
-rw-r--r--lib/Linker/IRMover.cpp112
-rw-r--r--lib/Linker/LinkModules.cpp3
-rw-r--r--lib/MC/ELFObjectWriter.cpp86
-rw-r--r--lib/MC/MCAsmBackend.cpp5
-rw-r--r--lib/MC/MCAsmInfoXCOFF.cpp17
-rw-r--r--lib/MC/MCAsmMacro.cpp2
-rw-r--r--lib/MC/MCAsmStreamer.cpp140
-rw-r--r--lib/MC/MCAssembler.cpp38
-rw-r--r--lib/MC/MCContext.cpp29
-rw-r--r--lib/MC/MCDwarf.cpp44
-rw-r--r--lib/MC/MCELFStreamer.cpp7
-rw-r--r--lib/MC/MCExpr.cpp46
-rw-r--r--lib/MC/MCInstPrinter.cpp31
-rw-r--r--lib/MC/MCInstrAnalysis.cpp6
-rw-r--r--lib/MC/MCMachOStreamer.cpp1
-rw-r--r--lib/MC/MCObjectFileInfo.cpp14
-rw-r--r--lib/MC/MCObjectStreamer.cpp4
-rw-r--r--lib/MC/MCParser/AsmParser.cpp142
-rw-r--r--lib/MC/MCParser/COFFAsmParser.cpp155
-rw-r--r--lib/MC/MCParser/DarwinAsmParser.cpp4
-rw-r--r--lib/MC/MCParser/WasmAsmParser.cpp1
-rw-r--r--lib/MC/MCRegisterInfo.cpp48
-rw-r--r--lib/MC/MCSectionXCOFF.cpp50
-rw-r--r--lib/MC/MCStreamer.cpp84
-rw-r--r--lib/MC/MCSubtargetInfo.cpp25
-rw-r--r--lib/MC/MCWasmObjectTargetWriter.cpp5
-rw-r--r--lib/MC/MCWasmStreamer.cpp2
-rw-r--r--lib/MC/MCWinCOFFStreamer.cpp18
-rw-r--r--lib/MC/MCXCOFFStreamer.cpp54
-rw-r--r--lib/MC/MachObjectWriter.cpp14
-rw-r--r--lib/MC/StringTableBuilder.cpp10
-rw-r--r--lib/MC/WasmObjectWriter.cpp77
-rw-r--r--lib/MC/WinCOFFObjectWriter.cpp10
-rw-r--r--lib/MC/XCOFFObjectWriter.cpp533
-rw-r--r--lib/MCA/CodeEmitter.cpp37
-rw-r--r--lib/MCA/Context.cpp23
-rw-r--r--lib/MCA/HardwareUnits/LSUnit.cpp28
-rw-r--r--lib/MCA/HardwareUnits/RegisterFile.cpp16
-rw-r--r--lib/MCA/HardwareUnits/ResourceManager.cpp59
-rw-r--r--lib/MCA/HardwareUnits/RetireControlUnit.cpp65
-rw-r--r--lib/MCA/HardwareUnits/Scheduler.cpp12
-rw-r--r--lib/MCA/InstrBuilder.cpp44
-rw-r--r--lib/MCA/Instruction.cpp4
-rw-r--r--lib/MCA/Stages/DispatchStage.cpp19
-rw-r--r--lib/MCA/Stages/EntryStage.cpp2
-rw-r--r--lib/MCA/Stages/ExecuteStage.cpp22
-rw-r--r--lib/MCA/Stages/RetireStage.cpp8
-rw-r--r--lib/Object/Archive.cpp6
-rw-r--r--lib/Object/ArchiveWriter.cpp35
-rw-r--r--lib/Object/Binary.cpp3
-rw-r--r--lib/Object/COFFObjectFile.cpp198
-rw-r--r--lib/Object/Decompressor.cpp15
-rw-r--r--lib/Object/ELF.cpp2
-rw-r--r--lib/Object/ELFObjectFile.cpp38
-rw-r--r--lib/Object/MachOObjectFile.cpp48
-rw-r--r--lib/Object/MachOUniversal.cpp38
-rw-r--r--lib/Object/Minidump.cpp46
-rw-r--r--lib/Object/Object.cpp10
-rw-r--r--lib/Object/ObjectFile.cpp11
-rw-r--r--lib/Object/RelocationResolver.cpp67
-rw-r--r--lib/Object/SymbolicFile.cpp1
-rw-r--r--lib/Object/TapiFile.cpp104
-rw-r--r--lib/Object/TapiUniversal.cpp54
-rw-r--r--lib/Object/WasmObjectFile.cpp13
-rw-r--r--lib/Object/WindowsResource.cpp346
-rw-r--r--lib/Object/XCOFFObjectFile.cpp240
-rw-r--r--lib/ObjectYAML/COFFEmitter.cpp622
-rw-r--r--lib/ObjectYAML/CodeViewYAMLSymbols.cpp2
-rw-r--r--lib/ObjectYAML/ELFEmitter.cpp1152
-rw-r--r--lib/ObjectYAML/ELFYAML.cpp325
-rw-r--r--lib/ObjectYAML/MachOEmitter.cpp580
-rw-r--r--lib/ObjectYAML/MachOYAML.cpp9
-rw-r--r--lib/ObjectYAML/MinidumpEmitter.cpp247
-rw-r--r--lib/ObjectYAML/MinidumpYAML.cpp331
-rw-r--r--lib/ObjectYAML/WasmEmitter.cpp633
-rw-r--r--lib/ObjectYAML/WasmYAML.cpp4
-rw-r--r--lib/ObjectYAML/yaml2obj.cpp77
-rw-r--r--lib/Option/ArgList.cpp8
-rw-r--r--lib/Passes/PassBuilder.cpp164
-rw-r--r--lib/Passes/PassRegistry.def14
-rw-r--r--lib/ProfileData/Coverage/CoverageMapping.cpp60
-rw-r--r--lib/ProfileData/Coverage/CoverageMappingReader.cpp20
-rw-r--r--lib/ProfileData/Coverage/CoverageMappingWriter.cpp10
-rw-r--r--lib/ProfileData/GCOV.cpp12
-rw-r--r--lib/ProfileData/InstrProf.cpp18
-rw-r--r--lib/ProfileData/InstrProfReader.cpp44
-rw-r--r--lib/ProfileData/InstrProfWriter.cpp2
-rw-r--r--lib/ProfileData/ProfileSummaryBuilder.cpp4
-rw-r--r--lib/ProfileData/SampleProf.cpp56
-rw-r--r--lib/ProfileData/SampleProfReader.cpp447
-rw-r--r--lib/ProfileData/SampleProfWriter.cpp279
-rw-r--r--lib/Remarks/BitstreamRemarkParser.cpp597
-rw-r--r--lib/Remarks/BitstreamRemarkParser.h83
-rw-r--r--lib/Remarks/BitstreamRemarkSerializer.cpp386
-rw-r--r--lib/Remarks/RemarkFormat.cpp4
-rw-r--r--lib/Remarks/RemarkParser.cpp72
-rw-r--r--lib/Remarks/RemarkSerializer.cpp54
-rw-r--r--lib/Remarks/RemarkStringTable.cpp28
-rw-r--r--lib/Remarks/YAMLRemarkParser.cpp165
-rw-r--r--lib/Remarks/YAMLRemarkParser.h38
-rw-r--r--lib/Remarks/YAMLRemarkSerializer.cpp134
-rw-r--r--lib/Support/AArch64TargetParser.cpp4
-rw-r--r--lib/Support/ABIBreak.cpp24
-rw-r--r--lib/Support/APInt.cpp52
-rw-r--r--lib/Support/ARMTargetParser.cpp8
-rw-r--r--lib/Support/CRC.cpp113
-rw-r--r--lib/Support/CachePruning.cpp2
-rw-r--r--lib/Support/CodeGenCoverage.cpp4
-rw-r--r--lib/Support/CommandLine.cpp2
-rw-r--r--lib/Support/CrashRecoveryContext.cpp8
-rw-r--r--lib/Support/DataExtractor.cpp160
-rw-r--r--lib/Support/Error.cpp17
-rw-r--r--lib/Support/FileCheck.cpp356
-rw-r--r--lib/Support/FileCheckImpl.h624
-rw-r--r--lib/Support/FileCollector.cpp268
-rw-r--r--lib/Support/FileOutputBuffer.cpp6
-rw-r--r--lib/Support/FileUtilities.cpp66
-rw-r--r--lib/Support/GlobPattern.cpp23
-rw-r--r--lib/Support/Host.cpp34
-rw-r--r--lib/Support/JSON.cpp2
-rw-r--r--lib/Support/JamCRC.cpp96
-rw-r--r--lib/Support/ManagedStatic.cpp13
-rw-r--r--lib/Support/MemoryBuffer.cpp31
-rw-r--r--lib/Support/Mutex.cpp123
-rw-r--r--lib/Support/Parallel.cpp31
-rw-r--r--lib/Support/Path.cpp6
-rw-r--r--lib/Support/PrettyStackTrace.cpp64
-rw-r--r--lib/Support/RWMutex.cpp58
-rw-r--r--lib/Support/Regex.cpp39
-rw-r--r--lib/Support/Signposts.cpp2
-rw-r--r--lib/Support/SpecialCaseList.cpp4
-rw-r--r--lib/Support/Statistic.cpp27
-rw-r--r--lib/Support/StringExtras.cpp4
-rw-r--r--lib/Support/TimeProfiler.cpp63
-rw-r--r--lib/Support/Timer.cpp10
-rw-r--r--lib/Support/Unix/Memory.inc6
-rw-r--r--lib/Support/Unix/Mutex.inc42
-rw-r--r--lib/Support/Unix/Path.inc73
-rw-r--r--lib/Support/Unix/Process.inc7
-rw-r--r--lib/Support/Unix/Program.inc4
-rw-r--r--lib/Support/Unix/RWMutex.inc50
-rw-r--r--lib/Support/Unix/Signals.inc15
-rw-r--r--lib/Support/VirtualFileSystem.cpp102
-rw-r--r--lib/Support/Windows/Mutex.inc56
-rw-r--r--lib/Support/Windows/Path.inc93
-rw-r--r--lib/Support/Windows/Program.inc2
-rw-r--r--lib/Support/Windows/RWMutex.inc128
-rw-r--r--lib/Support/Windows/Signals.inc3
-rw-r--r--lib/Support/Windows/WindowsSupport.h1
-rw-r--r--lib/Support/Windows/explicit_symbols.inc6
-rw-r--r--lib/Support/YAMLTraits.cpp16
-rw-r--r--lib/Support/Z3Solver.cpp2
-rw-r--r--lib/Support/raw_ostream.cpp35
-rw-r--r--lib/Support/regcomp.c7
-rw-r--r--lib/TableGen/Error.cpp2
-rw-r--r--lib/TableGen/Main.cpp21
-rw-r--r--lib/TableGen/Record.cpp11
-rw-r--r--lib/TableGen/SetTheory.cpp22
-rw-r--r--lib/TableGen/TGLexer.cpp4
-rw-r--r--lib/TableGen/TGParser.cpp28
-rw-r--r--lib/Target/AArch64/AArch64.h6
-rw-r--r--lib/Target/AArch64/AArch64.td80
-rw-r--r--lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp12
-rw-r--r--lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp16
-rw-r--r--lib/Target/AArch64/AArch64AsmPrinter.cpp280
-rw-r--r--lib/Target/AArch64/AArch64CallLowering.cpp632
-rw-r--r--lib/Target/AArch64/AArch64CallLowering.h29
-rw-r--r--lib/Target/AArch64/AArch64CallingConvention.cpp38
-rw-r--r--lib/Target/AArch64/AArch64CallingConvention.h3
-rw-r--r--lib/Target/AArch64/AArch64CallingConvention.td88
-rw-r--r--lib/Target/AArch64/AArch64CollectLOH.cpp22
-rw-r--r--lib/Target/AArch64/AArch64Combine.td18
-rw-r--r--lib/Target/AArch64/AArch64CondBrTuning.cpp4
-rw-r--r--lib/Target/AArch64/AArch64ConditionalCompares.cpp6
-rw-r--r--lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp4
-rw-r--r--lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp76
-rw-r--r--lib/Target/AArch64/AArch64FalkorHWPFFix.cpp2
-rw-r--r--lib/Target/AArch64/AArch64FastISel.cpp75
-rw-r--r--lib/Target/AArch64/AArch64FrameLowering.cpp301
-rw-r--r--lib/Target/AArch64/AArch64FrameLowering.h28
-rw-r--r--lib/Target/AArch64/AArch64ISelDAGToDAG.cpp45
-rw-r--r--lib/Target/AArch64/AArch64ISelLowering.cpp535
-rw-r--r--lib/Target/AArch64/AArch64ISelLowering.h37
-rw-r--r--lib/Target/AArch64/AArch64InstrAtomics.td65
-rw-r--r--lib/Target/AArch64/AArch64InstrFormats.td220
-rw-r--r--lib/Target/AArch64/AArch64InstrInfo.cpp1054
-rw-r--r--lib/Target/AArch64/AArch64InstrInfo.h12
-rw-r--r--lib/Target/AArch64/AArch64InstrInfo.td253
-rw-r--r--lib/Target/AArch64/AArch64InstructionSelector.cpp1096
-rw-r--r--lib/Target/AArch64/AArch64LegalizerInfo.cpp111
-rw-r--r--lib/Target/AArch64/AArch64LegalizerInfo.h3
-rw-r--r--lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp160
-rw-r--r--lib/Target/AArch64/AArch64MCInstLower.cpp2
-rw-r--r--lib/Target/AArch64/AArch64MachineFunctionInfo.h17
-rw-r--r--lib/Target/AArch64/AArch64PBQPRegAlloc.cpp16
-rw-r--r--lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp98
-rw-r--r--lib/Target/AArch64/AArch64RegisterBankInfo.cpp39
-rw-r--r--lib/Target/AArch64/AArch64RegisterInfo.cpp69
-rw-r--r--lib/Target/AArch64/AArch64SIMDInstrOpt.cpp8
-rw-r--r--lib/Target/AArch64/AArch64SVEInstrInfo.td264
-rw-r--r--lib/Target/AArch64/AArch64SelectionDAGInfo.cpp2
-rw-r--r--lib/Target/AArch64/AArch64SpeculationHardening.cpp13
-rw-r--r--lib/Target/AArch64/AArch64StackOffset.h138
-rw-r--r--lib/Target/AArch64/AArch64StackTagging.cpp394
-rw-r--r--lib/Target/AArch64/AArch64StackTaggingPreRA.cpp209
-rw-r--r--lib/Target/AArch64/AArch64StorePairSuppress.cpp2
-rw-r--r--lib/Target/AArch64/AArch64Subtarget.cpp50
-rw-r--r--lib/Target/AArch64/AArch64Subtarget.h48
-rw-r--r--lib/Target/AArch64/AArch64SystemOperands.td40
-rw-r--r--lib/Target/AArch64/AArch64TargetMachine.cpp35
-rw-r--r--lib/Target/AArch64/AArch64TargetObjectFile.cpp4
-rw-r--r--lib/Target/AArch64/AArch64TargetObjectFile.h3
-rw-r--r--lib/Target/AArch64/AArch64TargetTransformInfo.cpp29
-rw-r--r--lib/Target/AArch64/AArch64TargetTransformInfo.h14
-rw-r--r--lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp123
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp13
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp22
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp3
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp5
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h2
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp7
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h20
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp2
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp4
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp2
-rw-r--r--lib/Target/AArch64/SVEInstrFormats.td366
-rw-r--r--lib/Target/AArch64/Utils/AArch64BaseInfo.cpp2
-rw-r--r--lib/Target/AArch64/Utils/AArch64BaseInfo.h25
-rw-r--r--lib/Target/AMDGPU/AMDGPU.h4
-rw-r--r--lib/Target/AMDGPU/AMDGPU.td16
-rw-r--r--lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp21
-rw-r--r--lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h4
-rw-r--r--lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp78
-rw-r--r--lib/Target/AMDGPU/AMDGPUAsmPrinter.h10
-rw-r--r--lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp345
-rw-r--r--lib/Target/AMDGPU/AMDGPUCallLowering.cpp701
-rw-r--r--lib/Target/AMDGPU/AMDGPUCallLowering.h29
-rw-r--r--lib/Target/AMDGPU/AMDGPUCallingConv.td27
-rw-r--r--lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp12
-rw-r--r--lib/Target/AMDGPU/AMDGPUFrameLowering.cpp6
-rw-r--r--lib/Target/AMDGPU/AMDGPUFrameLowering.h4
-rw-r--r--lib/Target/AMDGPU/AMDGPUGISel.td78
-rw-r--r--lib/Target/AMDGPU/AMDGPUGenRegisterBankInfo.def80
-rw-r--r--lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp9
-rw-r--r--lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h2
-rw-r--r--lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp272
-rw-r--r--lib/Target/AMDGPU/AMDGPUISelLowering.cpp250
-rw-r--r--lib/Target/AMDGPU/AMDGPUISelLowering.h18
-rw-r--r--lib/Target/AMDGPU/AMDGPUInline.cpp2
-rw-r--r--lib/Target/AMDGPU/AMDGPUInstrInfo.td126
-rw-r--r--lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp1144
-rw-r--r--lib/Target/AMDGPU/AMDGPUInstructionSelector.h48
-rw-r--r--lib/Target/AMDGPU/AMDGPUInstructions.td216
-rw-r--r--lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp1132
-rw-r--r--lib/Target/AMDGPU/AMDGPULegalizerInfo.h52
-rw-r--r--lib/Target/AMDGPU/AMDGPULibCalls.cpp37
-rw-r--r--lib/Target/AMDGPU/AMDGPULibFunc.cpp14
-rw-r--r--lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp20
-rw-r--r--lib/Target/AMDGPU/AMDGPUMCInstLower.cpp4
-rw-r--r--lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp38
-rw-r--r--lib/Target/AMDGPU/AMDGPUMachineFunction.cpp1
-rw-r--r--lib/Target/AMDGPU/AMDGPUMachineFunction.h6
-rw-r--r--lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp592
-rw-r--r--lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp2
-rw-r--r--lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp1234
-rw-r--r--lib/Target/AMDGPU/AMDGPURegisterBankInfo.h56
-rw-r--r--lib/Target/AMDGPU/AMDGPURegisterBanks.td6
-rw-r--r--lib/Target/AMDGPU/AMDGPURegisterInfo.cpp66
-rw-r--r--lib/Target/AMDGPU/AMDGPURegisterInfo.h2
-rw-r--r--lib/Target/AMDGPU/AMDGPUSearchableTables.td4
-rw-r--r--lib/Target/AMDGPU/AMDGPUSubtarget.cpp64
-rw-r--r--lib/Target/AMDGPU/AMDGPUSubtarget.h67
-rw-r--r--lib/Target/AMDGPU/AMDGPUTargetMachine.cpp29
-rw-r--r--lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp90
-rw-r--r--lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h20
-rw-r--r--lib/Target/AMDGPU/AMDILCFGStructurizer.cpp8
-rw-r--r--lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp595
-rw-r--r--lib/Target/AMDGPU/BUFInstructions.td694
-rw-r--r--lib/Target/AMDGPU/DSInstructions.td92
-rw-r--r--lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp4
-rw-r--r--lib/Target/AMDGPU/EvergreenInstructions.td60
-rw-r--r--lib/Target/AMDGPU/FLATInstructions.td196
-rw-r--r--lib/Target/AMDGPU/GCNDPPCombine.cpp88
-rw-r--r--lib/Target/AMDGPU/GCNHazardRecognizer.cpp21
-rw-r--r--lib/Target/AMDGPU/GCNILPSched.cpp1
-rw-r--r--lib/Target/AMDGPU/GCNIterativeScheduler.cpp2
-rw-r--r--lib/Target/AMDGPU/GCNNSAReassign.cpp8
-rw-r--r--lib/Target/AMDGPU/GCNRegBankReassign.cpp14
-rw-r--r--lib/Target/AMDGPU/GCNRegPressure.cpp26
-rw-r--r--lib/Target/AMDGPU/GCNRegPressure.h2
-rw-r--r--lib/Target/AMDGPU/GCNSchedStrategy.cpp31
-rw-r--r--lib/Target/AMDGPU/GCNSchedStrategy.h3
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp2
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp2
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp37
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.h6
-rw-r--r--lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp4
-rw-r--r--lib/Target/AMDGPU/MIMGInstructions.td4
-rw-r--r--lib/Target/AMDGPU/R600AsmPrinter.cpp2
-rw-r--r--lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp4
-rw-r--r--lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp22
-rw-r--r--lib/Target/AMDGPU/R600FrameLowering.h6
-rw-r--r--lib/Target/AMDGPU/R600ISelLowering.cpp7
-rw-r--r--lib/Target/AMDGPU/R600InstrInfo.cpp22
-rw-r--r--lib/Target/AMDGPU/R600MachineScheduler.cpp8
-rw-r--r--lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp12
-rw-r--r--lib/Target/AMDGPU/R600Packetizer.cpp4
-rw-r--r--lib/Target/AMDGPU/R600RegisterInfo.cpp2
-rw-r--r--lib/Target/AMDGPU/SIAddIMGInit.cpp4
-rw-r--r--lib/Target/AMDGPU/SIDefines.h6
-rw-r--r--lib/Target/AMDGPU/SIFixSGPRCopies.cpp394
-rw-r--r--lib/Target/AMDGPU/SIFixupVectorISel.cpp3
-rw-r--r--lib/Target/AMDGPU/SIFoldOperands.cpp114
-rw-r--r--lib/Target/AMDGPU/SIFormMemoryClauses.cpp22
-rw-r--r--lib/Target/AMDGPU/SIFrameLowering.cpp34
-rw-r--r--lib/Target/AMDGPU/SIFrameLowering.h6
-rw-r--r--lib/Target/AMDGPU/SIISelLowering.cpp1052
-rw-r--r--lib/Target/AMDGPU/SIISelLowering.h54
-rw-r--r--lib/Target/AMDGPU/SIInsertWaitcnts.cpp6
-rw-r--r--lib/Target/AMDGPU/SIInstrFormats.td5
-rw-r--r--lib/Target/AMDGPU/SIInstrInfo.cpp558
-rw-r--r--lib/Target/AMDGPU/SIInstrInfo.h44
-rw-r--r--lib/Target/AMDGPU/SIInstrInfo.td320
-rw-r--r--lib/Target/AMDGPU/SIInstructions.td297
-rw-r--r--lib/Target/AMDGPU/SILoadStoreOptimizer.cpp1117
-rw-r--r--lib/Target/AMDGPU/SILowerControlFlow.cpp60
-rw-r--r--lib/Target/AMDGPU/SILowerI1Copies.cpp49
-rw-r--r--lib/Target/AMDGPU/SILowerSGPRSpills.cpp4
-rw-r--r--lib/Target/AMDGPU/SIMachineFunctionInfo.cpp9
-rw-r--r--lib/Target/AMDGPU/SIMachineFunctionInfo.h11
-rw-r--r--lib/Target/AMDGPU/SIMachineScheduler.cpp16
-rw-r--r--lib/Target/AMDGPU/SIMemoryLegalizer.cpp6
-rw-r--r--lib/Target/AMDGPU/SIModeRegister.cpp2
-rw-r--r--lib/Target/AMDGPU/SIOptimizeExecMasking.cpp2
-rw-r--r--lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp32
-rw-r--r--lib/Target/AMDGPU/SIPeepholeSDWA.cpp32
-rw-r--r--lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp12
-rw-r--r--lib/Target/AMDGPU/SIProgramInfo.h5
-rw-r--r--lib/Target/AMDGPU/SIRegisterInfo.cpp445
-rw-r--r--lib/Target/AMDGPU/SIRegisterInfo.h15
-rw-r--r--lib/Target/AMDGPU/SIRegisterInfo.td464
-rw-r--r--lib/Target/AMDGPU/SIShrinkInstructions.cpp42
-rw-r--r--lib/Target/AMDGPU/SIWholeQuadMode.cpp35
-rw-r--r--lib/Target/AMDGPU/SMInstructions.td15
-rw-r--r--lib/Target/AMDGPU/SOPInstructions.td42
-rw-r--r--lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp71
-rw-r--r--lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h24
-rw-r--r--lib/Target/AMDGPU/Utils/AMDGPUPALMetadata.cpp2
-rw-r--r--lib/Target/AMDGPU/VOP1Instructions.td65
-rw-r--r--lib/Target/AMDGPU/VOP2Instructions.td346
-rw-r--r--lib/Target/AMDGPU/VOP3Instructions.td69
-rw-r--r--lib/Target/AMDGPU/VOP3PInstructions.td2
-rw-r--r--lib/Target/AMDGPU/VOPCInstructions.td30
-rw-r--r--lib/Target/AMDGPU/VOPInstructions.td12
-rw-r--r--lib/Target/ARC/ARCFrameLowering.h4
-rw-r--r--lib/Target/ARC/ARCISelLowering.cpp2
-rw-r--r--lib/Target/ARC/ARCMachineFunctionInfo.h4
-rw-r--r--lib/Target/ARC/ARCOptAddrMode.cpp16
-rw-r--r--lib/Target/ARC/ARCRegisterInfo.cpp2
-rw-r--r--lib/Target/ARC/ARCTargetMachine.cpp2
-rw-r--r--lib/Target/ARM/A15SDOptimizer.cpp54
-rw-r--r--lib/Target/ARM/ARM.h2
-rw-r--r--lib/Target/ARM/ARM.td42
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp66
-rw-r--r--lib/Target/ARM/ARMBaseInstrInfo.cpp216
-rw-r--r--lib/Target/ARM/ARMBaseInstrInfo.h21
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp49
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.h5
-rw-r--r--lib/Target/ARM/ARMBasicBlockInfo.cpp16
-rw-r--r--lib/Target/ARM/ARMBasicBlockInfo.h31
-rw-r--r--lib/Target/ARM/ARMCallLowering.cpp54
-rw-r--r--lib/Target/ARM/ARMCallLowering.h5
-rw-r--r--lib/Target/ARM/ARMCallingConv.cpp2
-rw-r--r--lib/Target/ARM/ARMCodeGenPrepare.cpp88
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp289
-rw-r--r--lib/Target/ARM/ARMConstantPoolValue.cpp1
-rw-r--r--lib/Target/ARM/ARMExpandPseudoInsts.cpp96
-rw-r--r--lib/Target/ARM/ARMFastISel.cpp88
-rw-r--r--lib/Target/ARM/ARMFrameLowering.cpp65
-rw-r--r--lib/Target/ARM/ARMFrameLowering.h5
-rw-r--r--lib/Target/ARM/ARMISelDAGToDAG.cpp224
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp2073
-rw-r--r--lib/Target/ARM/ARMISelLowering.h45
-rw-r--r--lib/Target/ARM/ARMInstrFormats.td23
-rw-r--r--lib/Target/ARM/ARMInstrInfo.cpp2
-rw-r--r--lib/Target/ARM/ARMInstrInfo.td127
-rw-r--r--lib/Target/ARM/ARMInstrMVE.td1430
-rw-r--r--lib/Target/ARM/ARMInstrNEON.td191
-rw-r--r--lib/Target/ARM/ARMInstrThumb.td16
-rw-r--r--lib/Target/ARM/ARMInstrThumb2.td98
-rw-r--r--lib/Target/ARM/ARMInstrVFP.td96
-rw-r--r--lib/Target/ARM/ARMInstructionSelector.cpp41
-rw-r--r--lib/Target/ARM/ARMLegalizerInfo.cpp2
-rw-r--r--lib/Target/ARM/ARMLoadStoreOptimizer.cpp32
-rw-r--r--lib/Target/ARM/ARMLowOverheadLoops.cpp364
-rw-r--r--lib/Target/ARM/ARMMCInstLower.cpp4
-rw-r--r--lib/Target/ARM/ARMMachineFunctionInfo.h8
-rw-r--r--lib/Target/ARM/ARMParallelDSP.cpp675
-rw-r--r--lib/Target/ARM/ARMPredicates.td2
-rw-r--r--lib/Target/ARM/ARMRegisterInfo.td18
-rw-r--r--lib/Target/ARM/ARMScheduleA9.td4
-rw-r--r--lib/Target/ARM/ARMScheduleM4.td24
-rw-r--r--lib/Target/ARM/ARMSubtarget.cpp14
-rw-r--r--lib/Target/ARM/ARMSubtarget.h30
-rw-r--r--lib/Target/ARM/ARMTargetMachine.cpp13
-rw-r--r--lib/Target/ARM/ARMTargetTransformInfo.cpp370
-rw-r--r--lib/Target/ARM/ARMTargetTransformInfo.h24
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp251
-rw-r--r--lib/Target/ARM/Disassembler/ARMDisassembler.cpp31
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h20
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp14
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h3
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp6
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp12
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMInstPrinter.h5
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp21
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp6
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp4
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp2
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp10
-rw-r--r--lib/Target/ARM/MLxExpansionPass.cpp42
-rw-r--r--lib/Target/ARM/MVETailPredication.cpp519
-rw-r--r--lib/Target/ARM/MVEVPTBlockPass.cpp278
-rw-r--r--lib/Target/ARM/Thumb1FrameLowering.cpp8
-rw-r--r--lib/Target/ARM/Thumb1InstrInfo.cpp17
-rw-r--r--lib/Target/ARM/Thumb2ITBlockPass.cpp134
-rw-r--r--lib/Target/ARM/Thumb2InstrInfo.cpp38
-rw-r--r--lib/Target/ARM/Thumb2SizeReduction.cpp28
-rw-r--r--lib/Target/ARM/ThumbRegisterInfo.cpp11
-rw-r--r--lib/Target/AVR/AVRAsmPrinter.cpp2
-rw-r--r--lib/Target/AVR/AVRExpandPseudoInsts.cpp12
-rw-r--r--lib/Target/AVR/AVRFrameLowering.cpp5
-rw-r--r--lib/Target/AVR/AVRISelDAGToDAG.cpp2
-rw-r--r--lib/Target/AVR/AVRISelLowering.cpp27
-rw-r--r--lib/Target/AVR/AVRISelLowering.h4
-rw-r--r--lib/Target/AVR/AVRRegisterInfo.cpp2
-rw-r--r--lib/Target/AVR/AVRTargetMachine.cpp2
-rw-r--r--lib/Target/AVR/AsmParser/AVRAsmParser.cpp8
-rw-r--r--lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp2
-rw-r--r--lib/Target/BPF/AsmParser/BPFAsmParser.cpp6
-rw-r--r--lib/Target/BPF/BPF.h4
-rw-r--r--lib/Target/BPF/BPFAbstractMemberAccess.cpp708
-rw-r--r--lib/Target/BPF/BPFAsmPrinter.cpp2
-rw-r--r--lib/Target/BPF/BPFCORE.h14
-rw-r--r--lib/Target/BPF/BPFFrameLowering.h2
-rw-r--r--lib/Target/BPF/BPFISelDAGToDAG.cpp170
-rw-r--r--lib/Target/BPF/BPFISelLowering.cpp21
-rw-r--r--lib/Target/BPF/BPFInstrInfo.cpp6
-rw-r--r--lib/Target/BPF/BPFInstrInfo.td2
-rw-r--r--lib/Target/BPF/BPFMIChecking.cpp1
-rw-r--r--lib/Target/BPF/BPFMIPeephole.cpp206
-rw-r--r--lib/Target/BPF/BPFMISimplifyPatchable.cpp27
-rw-r--r--lib/Target/BPF/BPFRegisterInfo.cpp6
-rw-r--r--lib/Target/BPF/BPFTargetMachine.cpp16
-rw-r--r--lib/Target/BPF/BTF.h54
-rw-r--r--lib/Target/BPF/BTFDebug.cpp281
-rw-r--r--lib/Target/BPF/BTFDebug.h29
-rw-r--r--lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp4
-rw-r--r--lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp2
-rw-r--r--lib/Target/Hexagon/BitTracker.cpp21
-rw-r--r--lib/Target/Hexagon/HexagonAsmPrinter.cpp2
-rw-r--r--lib/Target/Hexagon/HexagonBitSimplify.cpp71
-rw-r--r--lib/Target/Hexagon/HexagonBitTracker.cpp8
-rw-r--r--lib/Target/Hexagon/HexagonBlockRanges.cpp14
-rw-r--r--lib/Target/Hexagon/HexagonBranchRelaxation.cpp5
-rw-r--r--lib/Target/Hexagon/HexagonConstExtenders.cpp17
-rw-r--r--lib/Target/Hexagon/HexagonConstPropagation.cpp32
-rw-r--r--lib/Target/Hexagon/HexagonCopyToCombine.cpp32
-rw-r--r--lib/Target/Hexagon/HexagonDepMapAsm2Intrin.td696
-rw-r--r--lib/Target/Hexagon/HexagonDepOperands.td83
-rw-r--r--lib/Target/Hexagon/HexagonEarlyIfConv.cpp24
-rw-r--r--lib/Target/Hexagon/HexagonExpandCondsets.cpp30
-rw-r--r--lib/Target/Hexagon/HexagonFixupHwLoops.cpp5
-rw-r--r--lib/Target/Hexagon/HexagonFrameLowering.cpp58
-rw-r--r--lib/Target/Hexagon/HexagonFrameLowering.h2
-rw-r--r--lib/Target/Hexagon/HexagonGenExtract.cpp2
-rw-r--r--lib/Target/Hexagon/HexagonGenInsert.cpp27
-rw-r--r--lib/Target/Hexagon/HexagonGenMux.cpp6
-rw-r--r--lib/Target/Hexagon/HexagonGenPredicate.cpp14
-rw-r--r--lib/Target/Hexagon/HexagonHardwareLoops.cpp56
-rw-r--r--lib/Target/Hexagon/HexagonISelDAGToDAG.cpp2
-rw-r--r--lib/Target/Hexagon/HexagonISelLowering.cpp156
-rw-r--r--lib/Target/Hexagon/HexagonISelLowering.h15
-rw-r--r--lib/Target/Hexagon/HexagonISelLoweringHVX.cpp24
-rw-r--r--lib/Target/Hexagon/HexagonInstrInfo.cpp273
-rw-r--r--lib/Target/Hexagon/HexagonInstrInfo.h22
-rw-r--r--lib/Target/Hexagon/HexagonIntrinsics.td46
-rw-r--r--lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp15
-rw-r--r--lib/Target/Hexagon/HexagonNewValueJump.cpp10
-rw-r--r--lib/Target/Hexagon/HexagonOptAddrMode.cpp12
-rw-r--r--lib/Target/Hexagon/HexagonPatterns.td194
-rw-r--r--lib/Target/Hexagon/HexagonPatternsHVX.td40
-rw-r--r--lib/Target/Hexagon/HexagonPeephole.cpp38
-rw-r--r--lib/Target/Hexagon/HexagonRegisterInfo.cpp6
-rw-r--r--lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp8
-rw-r--r--lib/Target/Hexagon/HexagonSplitDouble.cpp60
-rw-r--r--lib/Target/Hexagon/HexagonStoreWidening.cpp2
-rw-r--r--lib/Target/Hexagon/HexagonSubtarget.cpp19
-rw-r--r--lib/Target/Hexagon/HexagonSubtarget.h2
-rw-r--r--lib/Target/Hexagon/HexagonTargetMachine.cpp12
-rw-r--r--lib/Target/Hexagon/HexagonTargetTransformInfo.cpp2
-rw-r--r--lib/Target/Hexagon/HexagonTargetTransformInfo.h4
-rw-r--r--lib/Target/Hexagon/HexagonVExtract.cpp12
-rw-r--r--lib/Target/Hexagon/HexagonVLIWPacketizer.cpp37
-rw-r--r--lib/Target/Hexagon/HexagonVLIWPacketizer.h3
-rw-r--r--lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp6
-rw-r--r--lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp4
-rw-r--r--lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.cpp7
-rw-r--r--lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp4
-rw-r--r--lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp10
-rw-r--r--lib/Target/Hexagon/RDFCopy.cpp4
-rw-r--r--lib/Target/Hexagon/RDFDeadCode.cpp1
-rw-r--r--lib/Target/Hexagon/RDFGraph.cpp16
-rw-r--r--lib/Target/Hexagon/RDFLiveness.cpp8
-rw-r--r--lib/Target/Hexagon/RDFRegisters.cpp8
-rw-r--r--lib/Target/Hexagon/RDFRegisters.h8
-rw-r--r--lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp23
-rw-r--r--lib/Target/Lanai/LanaiAsmPrinter.cpp2
-rw-r--r--lib/Target/Lanai/LanaiDelaySlotFiller.cpp2
-rw-r--r--lib/Target/Lanai/LanaiFrameLowering.cpp4
-rw-r--r--lib/Target/Lanai/LanaiFrameLowering.h2
-rw-r--r--lib/Target/Lanai/LanaiISelLowering.cpp15
-rw-r--r--lib/Target/Lanai/LanaiISelLowering.h4
-rw-r--r--lib/Target/Lanai/LanaiInstrInfo.cpp9
-rw-r--r--lib/Target/Lanai/LanaiInstrInfo.h3
-rw-r--r--lib/Target/Lanai/LanaiRegisterInfo.cpp2
-rw-r--r--lib/Target/Lanai/MCTargetDesc/LanaiELFObjectWriter.cpp2
-rw-r--r--lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp12
-rw-r--r--lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp4
-rw-r--r--lib/Target/MSP430/MSP430AsmPrinter.cpp8
-rw-r--r--lib/Target/MSP430/MSP430BranchSelector.cpp1
-rw-r--r--lib/Target/MSP430/MSP430FrameLowering.h3
-rw-r--r--lib/Target/MSP430/MSP430ISelLowering.cpp27
-rw-r--r--lib/Target/MSP430/MSP430ISelLowering.h2
-rw-r--r--lib/Target/MSP430/MSP430RegisterInfo.cpp2
-rw-r--r--lib/Target/MSP430/MSP430TargetMachine.cpp2
-rw-r--r--lib/Target/Mips/AsmParser/MipsAsmParser.cpp696
-rw-r--r--lib/Target/Mips/Disassembler/MipsDisassembler.cpp16
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp1
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h6
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp4
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp7
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h5
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp11
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp2
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp4
-rw-r--r--lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp96
-rw-r--r--lib/Target/Mips/MicroMipsDSPInstrInfo.td4
-rw-r--r--lib/Target/Mips/MicroMipsInstrInfo.td9
-rw-r--r--lib/Target/Mips/MicroMipsSizeReduction.cpp18
-rw-r--r--lib/Target/Mips/Mips.td12
-rw-r--r--lib/Target/Mips/Mips16ISelDAGToDAG.cpp2
-rw-r--r--lib/Target/Mips/Mips16ISelLowering.cpp16
-rw-r--r--lib/Target/Mips/Mips16InstrInfo.cpp2
-rw-r--r--lib/Target/Mips/Mips64InstrInfo.td36
-rw-r--r--lib/Target/Mips/MipsAsmPrinter.cpp12
-rw-r--r--lib/Target/Mips/MipsCallLowering.cpp150
-rw-r--r--lib/Target/Mips/MipsCallLowering.h8
-rw-r--r--lib/Target/Mips/MipsConstantIslandPass.cpp63
-rw-r--r--lib/Target/Mips/MipsDSPInstrInfo.td19
-rw-r--r--lib/Target/Mips/MipsExpandPseudo.cpp54
-rw-r--r--lib/Target/Mips/MipsFastISel.cpp12
-rw-r--r--lib/Target/Mips/MipsFrameLowering.h5
-rw-r--r--lib/Target/Mips/MipsISelDAGToDAG.cpp53
-rw-r--r--lib/Target/Mips/MipsISelDAGToDAG.h5
-rw-r--r--lib/Target/Mips/MipsISelLowering.cpp164
-rw-r--r--lib/Target/Mips/MipsISelLowering.h13
-rw-r--r--lib/Target/Mips/MipsInstrInfo.cpp3
-rw-r--r--lib/Target/Mips/MipsInstrInfo.h2
-rw-r--r--lib/Target/Mips/MipsInstrInfo.td30
-rw-r--r--lib/Target/Mips/MipsInstructionSelector.cpp206
-rw-r--r--lib/Target/Mips/MipsLegalizerInfo.cpp244
-rw-r--r--lib/Target/Mips/MipsLegalizerInfo.h3
-rw-r--r--lib/Target/Mips/MipsMSAInstrInfo.td55
-rw-r--r--lib/Target/Mips/MipsOptimizePICCall.cpp5
-rw-r--r--lib/Target/Mips/MipsPfmCounters.td18
-rw-r--r--lib/Target/Mips/MipsPreLegalizerCombiner.cpp3
-rw-r--r--lib/Target/Mips/MipsRegisterBankInfo.cpp322
-rw-r--r--lib/Target/Mips/MipsRegisterBankInfo.h9
-rw-r--r--lib/Target/Mips/MipsRegisterBanks.td2
-rw-r--r--lib/Target/Mips/MipsSEFrameLowering.cpp55
-rw-r--r--lib/Target/Mips/MipsSEISelDAGToDAG.cpp54
-rw-r--r--lib/Target/Mips/MipsSEISelDAGToDAG.h6
-rw-r--r--lib/Target/Mips/MipsSEISelLowering.cpp124
-rw-r--r--lib/Target/Mips/MipsSEInstrInfo.cpp20
-rw-r--r--lib/Target/Mips/MipsSERegisterInfo.cpp8
-rw-r--r--lib/Target/Mips/MipsSubtarget.cpp17
-rw-r--r--lib/Target/Mips/MipsSubtarget.h15
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp18
-rw-r--r--lib/Target/Mips/MipsTargetStreamer.h14
-rw-r--r--lib/Target/NVPTX/NVPTX.h2
-rw-r--r--lib/Target/NVPTX/NVPTXAsmPrinter.cpp34
-rw-r--r--lib/Target/NVPTX/NVPTXAsmPrinter.h2
-rw-r--r--lib/Target/NVPTX/NVPTXFrameLowering.cpp2
-rw-r--r--lib/Target/NVPTX/NVPTXISelLowering.cpp58
-rw-r--r--lib/Target/NVPTX/NVPTXInstrInfo.td13
-rw-r--r--lib/Target/NVPTX/NVPTXIntrinsics.td169
-rw-r--r--lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp2
-rw-r--r--lib/Target/NVPTX/NVPTXLowerAlloca.cpp97
-rw-r--r--lib/Target/NVPTX/NVPTXLowerArgs.cpp2
-rw-r--r--lib/Target/NVPTX/NVPTXPeephole.cpp2
-rw-r--r--lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp2
-rw-r--r--lib/Target/NVPTX/NVPTXTargetMachine.cpp2
-rw-r--r--lib/Target/NVPTX/NVPTXUtilities.cpp13
-rw-r--r--lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp10
-rw-r--r--lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp6
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp6
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp25
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp1
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp4
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h14
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp4
-rw-r--r--lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp2
-rw-r--r--lib/Target/PowerPC/P9InstrResources.td8
-rw-r--r--lib/Target/PowerPC/PPC.h8
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp482
-rw-r--r--lib/Target/PowerPC/PPCBranchCoalescing.cpp13
-rw-r--r--lib/Target/PowerPC/PPCBranchSelector.cpp29
-rw-r--r--lib/Target/PowerPC/PPCFastISel.cpp41
-rw-r--r--lib/Target/PowerPC/PPCFrameLowering.cpp71
-rw-r--r--lib/Target/PowerPC/PPCFrameLowering.h11
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp105
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp546
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.h49
-rw-r--r--lib/Target/PowerPC/PPCInstr64Bit.td4
-rw-r--r--lib/Target/PowerPC/PPCInstrAltivec.td12
-rw-r--r--lib/Target/PowerPC/PPCInstrFormats.td9
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.cpp336
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.h42
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td206
-rw-r--r--lib/Target/PowerPC/PPCInstrVSX.td180
-rw-r--r--lib/Target/PowerPC/PPCLoopPreIncPrep.cpp670
-rw-r--r--lib/Target/PowerPC/PPCMCInstLower.cpp23
-rw-r--r--lib/Target/PowerPC/PPCMIPeephole.cpp82
-rw-r--r--lib/Target/PowerPC/PPCPreEmitPeephole.cpp106
-rw-r--r--lib/Target/PowerPC/PPCQPXLoadSplat.cpp6
-rw-r--r--lib/Target/PowerPC/PPCReduceCRLogicals.cpp15
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.cpp39
-rw-r--r--lib/Target/PowerPC/PPCRegisterInfo.td22
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.cpp18
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h24
-rw-r--r--lib/Target/PowerPC/PPCTLSDynamicCall.cpp4
-rw-r--r--lib/Target/PowerPC/PPCTOCRegDeps.cpp9
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp38
-rw-r--r--lib/Target/PowerPC/PPCTargetTransformInfo.cpp68
-rw-r--r--lib/Target/PowerPC/PPCTargetTransformInfo.h12
-rw-r--r--lib/Target/PowerPC/PPCVSXCopy.cpp6
-rw-r--r--lib/Target/PowerPC/PPCVSXFMAMutate.cpp18
-rw-r--r--lib/Target/PowerPC/PPCVSXSwapRemoval.cpp32
-rw-r--r--lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp282
-rw-r--r--lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp139
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp17
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp13
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp41
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.h8
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp20
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.h3
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp4
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h1
-rw-r--r--lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp4
-rw-r--r--lib/Target/RISCV/RISCV.h7
-rw-r--r--lib/Target/RISCV/RISCV.td11
-rw-r--r--lib/Target/RISCV/RISCVCallLowering.cpp50
-rw-r--r--lib/Target/RISCV/RISCVCallLowering.h42
-rw-r--r--lib/Target/RISCV/RISCVCallingConv.td28
-rw-r--r--lib/Target/RISCV/RISCVExpandPseudoInsts.cpp54
-rw-r--r--lib/Target/RISCV/RISCVFrameLowering.cpp164
-rw-r--r--lib/Target/RISCV/RISCVFrameLowering.h9
-rw-r--r--lib/Target/RISCV/RISCVISelDAGToDAG.cpp5
-rw-r--r--lib/Target/RISCV/RISCVISelLowering.cpp323
-rw-r--r--lib/Target/RISCV/RISCVISelLowering.h6
-rw-r--r--lib/Target/RISCV/RISCVInstrInfo.cpp118
-rw-r--r--lib/Target/RISCV/RISCVInstrInfo.h18
-rw-r--r--lib/Target/RISCV/RISCVInstrInfo.td22
-rw-r--r--lib/Target/RISCV/RISCVInstrInfoA.td34
-rw-r--r--lib/Target/RISCV/RISCVInstrInfoC.td124
-rw-r--r--lib/Target/RISCV/RISCVInstrInfoF.td6
-rw-r--r--lib/Target/RISCV/RISCVInstructionSelector.cpp103
-rw-r--r--lib/Target/RISCV/RISCVLegalizerInfo.cpp23
-rw-r--r--lib/Target/RISCV/RISCVLegalizerInfo.h28
-rw-r--r--lib/Target/RISCV/RISCVMergeBaseOffset.cpp16
-rw-r--r--lib/Target/RISCV/RISCVRegisterBankInfo.cpp26
-rw-r--r--lib/Target/RISCV/RISCVRegisterBankInfo.h37
-rw-r--r--lib/Target/RISCV/RISCVRegisterBanks.td13
-rw-r--r--lib/Target/RISCV/RISCVRegisterInfo.cpp13
-rw-r--r--lib/Target/RISCV/RISCVRegisterInfo.h6
-rw-r--r--lib/Target/RISCV/RISCVRegisterInfo.td100
-rw-r--r--lib/Target/RISCV/RISCVSubtarget.cpp30
-rw-r--r--lib/Target/RISCV/RISCVSubtarget.h20
-rw-r--r--lib/Target/RISCV/RISCVTargetMachine.cpp31
-rw-r--r--lib/Target/RISCV/Utils/RISCVBaseInfo.h16
-rw-r--r--lib/Target/Sparc/AsmParser/SparcAsmParser.cpp8
-rw-r--r--lib/Target/Sparc/DelaySlotFiller.cpp10
-rw-r--r--lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp6
-rw-r--r--lib/Target/Sparc/SparcFrameLowering.cpp3
-rw-r--r--lib/Target/Sparc/SparcISelDAGToDAG.cpp4
-rw-r--r--lib/Target/Sparc/SparcISelLowering.cpp28
-rw-r--r--lib/Target/Sparc/SparcISelLowering.h4
-rw-r--r--lib/Target/Sparc/SparcInstr64Bit.td2
-rw-r--r--lib/Target/Sparc/SparcInstrInfo.cpp4
-rw-r--r--lib/Target/Sparc/SparcInstrInfo.td8
-rw-r--r--lib/Target/Sparc/SparcRegisterInfo.cpp12
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp4
-rw-r--r--lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp12
-rw-r--r--lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp2
-rw-r--r--lib/Target/SystemZ/SystemZ.h1
-rw-r--r--lib/Target/SystemZ/SystemZAsmPrinter.cpp20
-rw-r--r--lib/Target/SystemZ/SystemZAsmPrinter.h1
-rw-r--r--lib/Target/SystemZ/SystemZElimCompare.cpp9
-rw-r--r--lib/Target/SystemZ/SystemZExpandPseudo.cpp152
-rw-r--r--lib/Target/SystemZ/SystemZFrameLowering.cpp6
-rw-r--r--lib/Target/SystemZ/SystemZISelDAGToDAG.cpp11
-rw-r--r--lib/Target/SystemZ/SystemZISelLowering.cpp244
-rw-r--r--lib/Target/SystemZ/SystemZInstrFP.td32
-rw-r--r--lib/Target/SystemZ/SystemZInstrFormats.td166
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.cpp168
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.h29
-rw-r--r--lib/Target/SystemZ/SystemZInstrInfo.td22
-rw-r--r--lib/Target/SystemZ/SystemZInstrVector.td26
-rw-r--r--lib/Target/SystemZ/SystemZLongBranch.cpp26
-rw-r--r--lib/Target/SystemZ/SystemZMachineScheduler.cpp5
-rw-r--r--lib/Target/SystemZ/SystemZOperands.td121
-rw-r--r--lib/Target/SystemZ/SystemZOperators.td6
-rw-r--r--lib/Target/SystemZ/SystemZPatterns.td4
-rw-r--r--lib/Target/SystemZ/SystemZPostRewrite.cpp164
-rw-r--r--lib/Target/SystemZ/SystemZProcessors.td3
-rw-r--r--lib/Target/SystemZ/SystemZRegisterInfo.cpp19
-rw-r--r--lib/Target/SystemZ/SystemZRegisterInfo.h9
-rw-r--r--lib/Target/SystemZ/SystemZSchedule.td2
-rw-r--r--lib/Target/SystemZ/SystemZScheduleZ15.td (renamed from lib/Target/SystemZ/SystemZScheduleArch13.td)64
-rw-r--r--lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp8
-rw-r--r--lib/Target/SystemZ/SystemZShortenInst.cpp4
-rw-r--r--lib/Target/SystemZ/SystemZTargetMachine.cpp11
-rw-r--r--lib/Target/SystemZ/SystemZTargetTransformInfo.cpp5
-rw-r--r--lib/Target/SystemZ/SystemZTargetTransformInfo.h8
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp1
-rw-r--r--lib/Target/TargetMachine.cpp20
-rw-r--r--lib/Target/TargetMachineC.cpp2
-rw-r--r--lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp100
-rw-r--r--lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp24
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp10
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp57
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.h3
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp1
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h74
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp33
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h3
-rw-r--r--lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp11
-rw-r--r--lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp38
-rw-r--r--lib/Target/WebAssembly/WebAssemblyCFGSort.cpp5
-rw-r--r--lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp127
-rw-r--r--lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp22
-rw-r--r--lib/Target/WebAssembly/WebAssemblyFastISel.cpp36
-rw-r--r--lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp3
-rw-r--r--lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp8
-rw-r--r--lib/Target/WebAssembly/WebAssemblyFrameLowering.h4
-rw-r--r--lib/Target/WebAssembly/WebAssemblyISD.def2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp131
-rw-r--r--lib/Target/WebAssembly/WebAssemblyISelLowering.cpp306
-rw-r--r--lib/Target/WebAssembly/WebAssemblyISelLowering.h2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrAtomics.td100
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrBulkMemory.td4
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrControl.td48
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrConv.td17
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp4
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrInfo.h2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrInfo.td3
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrMemory.td51
-rw-r--r--lib/Target/WebAssembly/WebAssemblyInstrSIMD.td221
-rw-r--r--lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp12
-rw-r--r--lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp4
-rw-r--r--lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp119
-rw-r--r--lib/Target/WebAssembly/WebAssemblyLowerGlobalDtors.cpp2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp55
-rw-r--r--lib/Target/WebAssembly/WebAssemblyMCInstLower.h3
-rw-r--r--lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp12
-rw-r--r--lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h13
-rw-r--r--lib/Target/WebAssembly/WebAssemblyMemIntrinsicResults.cpp7
-rw-r--r--lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp7
-rw-r--r--lib/Target/WebAssembly/WebAssemblyPeephole.cpp107
-rw-r--r--lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyRegColoring.cpp7
-rw-r--r--lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyRegStackify.cpp24
-rw-r--r--lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp6
-rw-r--r--lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp5
-rw-r--r--lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h2
-rw-r--r--lib/Target/WebAssembly/WebAssemblyUtilities.cpp21
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp170
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParserCommon.h4
-rw-r--r--lib/Target/X86/AsmParser/X86Operand.h25
-rw-r--r--lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp5
-rw-r--r--lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp6
-rw-r--r--lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp19
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp2
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp3
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp61
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h11
-rw-r--r--lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp7
-rw-r--r--lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp2
-rw-r--r--lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp5
-rw-r--r--lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp2
-rw-r--r--lib/Target/X86/X86.h10
-rw-r--r--lib/Target/X86/X86.td56
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp8
-rw-r--r--lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp3
-rw-r--r--lib/Target/X86/X86AvoidTrailingCall.cpp108
-rw-r--r--lib/Target/X86/X86CallFrameOptimization.cpp26
-rw-r--r--lib/Target/X86/X86CallLowering.cpp49
-rw-r--r--lib/Target/X86/X86CallLowering.h5
-rw-r--r--lib/Target/X86/X86CallingConv.td2
-rw-r--r--lib/Target/X86/X86CmovConversion.cpp18
-rw-r--r--lib/Target/X86/X86CondBrFolding.cpp2
-rw-r--r--lib/Target/X86/X86DomainReassignment.cpp20
-rwxr-xr-xlib/Target/X86/X86EvexToVex.cpp2
-rw-r--r--lib/Target/X86/X86ExpandPseudo.cpp11
-rw-r--r--lib/Target/X86/X86FastISel.cpp15
-rw-r--r--lib/Target/X86/X86FixupBWInsts.cpp68
-rw-r--r--lib/Target/X86/X86FixupLEAs.cpp201
-rw-r--r--lib/Target/X86/X86FixupSetCC.cpp4
-rw-r--r--lib/Target/X86/X86FlagsCopyLowering.cpp13
-rw-r--r--lib/Target/X86/X86FloatingPoint.cpp6
-rw-r--r--lib/Target/X86/X86FrameLowering.cpp106
-rw-r--r--lib/Target/X86/X86FrameLowering.h4
-rw-r--r--lib/Target/X86/X86ISelDAGToDAG.cpp304
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp5926
-rw-r--r--lib/Target/X86/X86ISelLowering.h77
-rw-r--r--lib/Target/X86/X86IndirectBranchTracking.cpp2
-rw-r--r--lib/Target/X86/X86InsertPrefetch.cpp8
-rw-r--r--lib/Target/X86/X86InstrAVX512.td1457
-rw-r--r--lib/Target/X86/X86InstrArithmetic.td10
-rw-r--r--lib/Target/X86/X86InstrBuilder.h6
-rw-r--r--lib/Target/X86/X86InstrCMovSetCC.td33
-rw-r--r--lib/Target/X86/X86InstrCompiler.td139
-rw-r--r--lib/Target/X86/X86InstrControl.td85
-rw-r--r--lib/Target/X86/X86InstrExtension.td11
-rw-r--r--lib/Target/X86/X86InstrFoldTables.cpp287
-rw-r--r--lib/Target/X86/X86InstrFoldTables.h39
-rw-r--r--lib/Target/X86/X86InstrFragmentsSIMD.td26
-rw-r--r--lib/Target/X86/X86InstrInfo.cpp582
-rw-r--r--lib/Target/X86/X86InstrInfo.h28
-rw-r--r--lib/Target/X86/X86InstrInfo.td57
-rw-r--r--lib/Target/X86/X86InstrMMX.td33
-rw-r--r--lib/Target/X86/X86InstrMPX.td32
-rw-r--r--lib/Target/X86/X86InstrSSE.td551
-rw-r--r--lib/Target/X86/X86InstrSystem.td2
-rw-r--r--lib/Target/X86/X86InstrTSX.td2
-rw-r--r--lib/Target/X86/X86InstrXOP.td26
-rw-r--r--lib/Target/X86/X86InstructionSelector.cpp135
-rw-r--r--lib/Target/X86/X86IntrinsicsInfo.h6
-rw-r--r--lib/Target/X86/X86LegalizerInfo.cpp20
-rw-r--r--lib/Target/X86/X86LegalizerInfo.h3
-rw-r--r--lib/Target/X86/X86MCInstLower.cpp313
-rw-r--r--lib/Target/X86/X86MachineFunctionInfo.h8
-rw-r--r--lib/Target/X86/X86OptimizeLEAs.cpp60
-rw-r--r--lib/Target/X86/X86RegisterBankInfo.cpp4
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp31
-rw-r--r--lib/Target/X86/X86RetpolineThunks.cpp8
-rwxr-xr-xlib/Target/X86/X86SchedBroadwell.td8
-rw-r--r--lib/Target/X86/X86SchedHaswell.td8
-rw-r--r--lib/Target/X86/X86SchedPredicates.td57
-rw-r--r--lib/Target/X86/X86SchedSandyBridge.td8
-rw-r--r--lib/Target/X86/X86SchedSkylakeClient.td8
-rwxr-xr-xlib/Target/X86/X86SchedSkylakeServer.td8
-rw-r--r--lib/Target/X86/X86Schedule.td24
-rw-r--r--lib/Target/X86/X86ScheduleAtom.td6
-rw-r--r--lib/Target/X86/X86ScheduleBdVer2.td6
-rw-r--r--lib/Target/X86/X86ScheduleBtVer2.td257
-rw-r--r--lib/Target/X86/X86ScheduleSLM.td8
-rw-r--r--lib/Target/X86/X86ScheduleZnver1.td8
-rw-r--r--lib/Target/X86/X86SelectionDAGInfo.cpp2
-rw-r--r--lib/Target/X86/X86SpeculativeLoadHardening.cpp59
-rw-r--r--lib/Target/X86/X86Subtarget.cpp18
-rw-r--r--lib/Target/X86/X86Subtarget.h23
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp49
-rw-r--r--lib/Target/X86/X86TargetMachine.h2
-rw-r--r--lib/Target/X86/X86TargetObjectFile.cpp4
-rw-r--r--lib/Target/X86/X86TargetObjectFile.h3
-rw-r--r--lib/Target/X86/X86TargetTransformInfo.cpp225
-rw-r--r--lib/Target/X86/X86TargetTransformInfo.h11
-rw-r--r--lib/Target/X86/X86VZeroUpper.cpp6
-rw-r--r--lib/Target/X86/X86WinAllocaExpander.cpp4
-rw-r--r--lib/Target/X86/X86WinEHState.cpp5
-rw-r--r--lib/Target/XCore/XCoreAsmPrinter.cpp4
-rw-r--r--lib/Target/XCore/XCoreFrameLowering.cpp6
-rw-r--r--lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp2
-rw-r--r--lib/Target/XCore/XCoreISelLowering.cpp21
-rw-r--r--lib/Target/XCore/XCoreRegisterInfo.cpp2
-rw-r--r--lib/Target/XCore/XCoreTargetMachine.cpp2
-rw-r--r--lib/Target/XCore/XCoreTargetTransformInfo.h3
-rw-r--r--lib/TextAPI/MachO/Architecture.cpp4
-rw-r--r--lib/TextAPI/MachO/InterfaceFile.cpp80
-rw-r--r--lib/TextAPI/MachO/Platform.cpp91
-rw-r--r--lib/TextAPI/MachO/Symbol.cpp9
-rw-r--r--lib/TextAPI/MachO/Target.cpp75
-rw-r--r--lib/TextAPI/MachO/TextStub.cpp606
-rw-r--r--lib/TextAPI/MachO/TextStubCommon.cpp93
-rw-r--r--lib/TextAPI/MachO/TextStubCommon.h8
-rw-r--r--lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp26
-rw-r--r--lib/ToolDrivers/llvm-lib/LibDriver.cpp236
-rw-r--r--lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp78
-rw-r--r--lib/Transforms/Coroutines/CoroCleanup.cpp7
-rw-r--r--lib/Transforms/Coroutines/CoroEarly.cpp26
-rw-r--r--lib/Transforms/Coroutines/CoroElide.cpp2
-rw-r--r--lib/Transforms/Coroutines/CoroFrame.cpp652
-rw-r--r--lib/Transforms/Coroutines/CoroInstr.h205
-rw-r--r--lib/Transforms/Coroutines/CoroInternal.h162
-rw-r--r--lib/Transforms/Coroutines/CoroSplit.cpp1166
-rw-r--r--lib/Transforms/Coroutines/Coroutines.cpp342
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp2
-rw-r--r--lib/Transforms/IPO/Attributor.cpp4959
-rw-r--r--lib/Transforms/IPO/BlockExtractor.cpp5
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp4
-rw-r--r--lib/Transforms/IPO/CrossDSOCFI.cpp10
-rw-r--r--lib/Transforms/IPO/FunctionAttrs.cpp38
-rw-r--r--lib/Transforms/IPO/FunctionImport.cpp43
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp156
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp176
-rw-r--r--lib/Transforms/IPO/HotColdSplitting.cpp61
-rw-r--r--lib/Transforms/IPO/IPO.cpp13
-rw-r--r--lib/Transforms/IPO/InferFunctionAttrs.cpp20
-rw-r--r--lib/Transforms/IPO/Inliner.cpp21
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp6
-rw-r--r--lib/Transforms/IPO/LowerTypeTests.cpp305
-rw-r--r--lib/Transforms/IPO/MergeFunctions.cpp4
-rw-r--r--lib/Transforms/IPO/PartialInlining.cpp20
-rw-r--r--lib/Transforms/IPO/PassManagerBuilder.cpp1
-rw-r--r--lib/Transforms/IPO/SCCP.cpp18
-rw-r--r--lib/Transforms/IPO/SampleProfile.cpp238
-rw-r--r--lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp21
-rw-r--r--lib/Transforms/IPO/WholeProgramDevirt.cpp389
-rw-r--r--lib/Transforms/InstCombine/InstCombineAddSub.cpp268
-rw-r--r--lib/Transforms/InstCombine/InstCombineAndOrXor.cpp278
-rw-r--r--lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp4
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp121
-rw-r--r--lib/Transforms/InstCombine/InstCombineCasts.cpp102
-rw-r--r--lib/Transforms/InstCombine/InstCombineCompares.cpp870
-rw-r--r--lib/Transforms/InstCombine/InstCombineInternal.h116
-rw-r--r--lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp93
-rw-r--r--lib/Transforms/InstCombine/InstCombineMulDivRem.cpp77
-rw-r--r--lib/Transforms/InstCombine/InstCombinePHI.cpp6
-rw-r--r--lib/Transforms/InstCombine/InstCombineSelect.cpp455
-rw-r--r--lib/Transforms/InstCombine/InstCombineShifts.cpp370
-rw-r--r--lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp48
-rw-r--r--lib/Transforms/InstCombine/InstCombineVectorOps.cpp171
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp67
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp98
-rw-r--r--lib/Transforms/Instrumentation/BoundsChecking.cpp2
-rw-r--r--lib/Transforms/Instrumentation/CFGMST.h4
-rw-r--r--lib/Transforms/Instrumentation/ControlHeightReduction.cpp26
-rw-r--r--lib/Transforms/Instrumentation/DataFlowSanitizer.cpp2
-rw-r--r--lib/Transforms/Instrumentation/GCOVProfiling.cpp49
-rw-r--r--lib/Transforms/Instrumentation/HWAddressSanitizer.cpp376
-rw-r--r--lib/Transforms/Instrumentation/IndirectCallPromotion.cpp2
-rw-r--r--lib/Transforms/Instrumentation/InstrOrderFile.cpp3
-rw-r--r--lib/Transforms/Instrumentation/InstrProfiling.cpp65
-rw-r--r--lib/Transforms/Instrumentation/Instrumentation.cpp5
-rw-r--r--lib/Transforms/Instrumentation/MemorySanitizer.cpp89
-rw-r--r--lib/Transforms/Instrumentation/PGOInstrumentation.cpp220
-rw-r--r--lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp6
-rw-r--r--lib/Transforms/Instrumentation/SanitizerCoverage.cpp164
-rw-r--r--lib/Transforms/Instrumentation/ThreadSanitizer.cpp54
-rw-r--r--lib/Transforms/Instrumentation/ValueProfileCollector.cpp78
-rw-r--r--lib/Transforms/Instrumentation/ValueProfileCollector.h79
-rw-r--r--lib/Transforms/Instrumentation/ValueProfilePlugins.inc75
-rw-r--r--lib/Transforms/ObjCARC/PtrState.cpp4
-rw-r--r--lib/Transforms/Scalar/AlignmentFromAssumptions.cpp8
-rw-r--r--lib/Transforms/Scalar/CallSiteSplitting.cpp2
-rw-r--r--lib/Transforms/Scalar/ConstantHoisting.cpp24
-rw-r--r--lib/Transforms/Scalar/ConstantProp.cpp2
-rw-r--r--lib/Transforms/Scalar/CorrelatedValuePropagation.cpp180
-rw-r--r--lib/Transforms/Scalar/DCE.cpp31
-rw-r--r--lib/Transforms/Scalar/DeadStoreElimination.cpp7
-rw-r--r--lib/Transforms/Scalar/DivRemPairs.cpp219
-rw-r--r--lib/Transforms/Scalar/EarlyCSE.cpp22
-rw-r--r--lib/Transforms/Scalar/FlattenCFGPass.cpp24
-rw-r--r--lib/Transforms/Scalar/Float2Int.cpp47
-rw-r--r--lib/Transforms/Scalar/GVN.cpp201
-rw-r--r--lib/Transforms/Scalar/GVNHoist.cpp17
-rw-r--r--lib/Transforms/Scalar/GuardWidening.cpp2
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp389
-rw-r--r--lib/Transforms/Scalar/InferAddressSpaces.cpp38
-rw-r--r--lib/Transforms/Scalar/InstSimplifyPass.cpp48
-rw-r--r--lib/Transforms/Scalar/JumpThreading.cpp18
-rw-r--r--lib/Transforms/Scalar/LICM.cpp55
-rw-r--r--lib/Transforms/Scalar/LoopDataPrefetch.cpp4
-rw-r--r--lib/Transforms/Scalar/LoopDeletion.cpp2
-rw-r--r--lib/Transforms/Scalar/LoopFuse.cpp640
-rw-r--r--lib/Transforms/Scalar/LoopIdiomRecognize.cpp890
-rw-r--r--lib/Transforms/Scalar/LoopInstSimplify.cpp5
-rw-r--r--lib/Transforms/Scalar/LoopInterchange.cpp62
-rw-r--r--lib/Transforms/Scalar/LoopLoadElimination.cpp3
-rw-r--r--lib/Transforms/Scalar/LoopPredication.cpp2
-rw-r--r--lib/Transforms/Scalar/LoopRerollPass.cpp3
-rw-r--r--lib/Transforms/Scalar/LoopRotation.cpp10
-rw-r--r--lib/Transforms/Scalar/LoopSimplifyCFG.cpp4
-rw-r--r--lib/Transforms/Scalar/LoopSink.cpp9
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp20
-rw-r--r--lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp8
-rw-r--r--lib/Transforms/Scalar/LoopUnrollPass.cpp128
-rw-r--r--lib/Transforms/Scalar/LoopUnswitch.cpp87
-rw-r--r--lib/Transforms/Scalar/LoopVersioningLICM.cpp31
-rw-r--r--lib/Transforms/Scalar/LowerConstantIntrinsics.cpp170
-rw-r--r--lib/Transforms/Scalar/LowerExpectIntrinsic.cpp33
-rw-r--r--lib/Transforms/Scalar/MemCpyOptimizer.cpp110
-rw-r--r--lib/Transforms/Scalar/MergeICmps.cpp2
-rw-r--r--lib/Transforms/Scalar/MergedLoadStoreMotion.cpp167
-rw-r--r--lib/Transforms/Scalar/NaryReassociate.cpp2
-rw-r--r--lib/Transforms/Scalar/NewGVN.cpp25
-rw-r--r--lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp2
-rw-r--r--lib/Transforms/Scalar/PlaceSafepoints.cpp6
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp190
-rw-r--r--lib/Transforms/Scalar/RewriteStatepointsForGC.cpp6
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp75
-rw-r--r--lib/Transforms/Scalar/SROA.cpp40
-rw-r--r--lib/Transforms/Scalar/Scalar.cpp9
-rw-r--r--lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp2
-rw-r--r--lib/Transforms/Scalar/SimpleLoopUnswitch.cpp25
-rw-r--r--lib/Transforms/Scalar/SpeculateAroundPHIs.cpp6
-rw-r--r--lib/Transforms/Scalar/StructurizeCFG.cpp2
-rw-r--r--lib/Transforms/Scalar/TailRecursionElimination.cpp2
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp64
-rw-r--r--lib/Transforms/Utils/BuildLibCalls.cpp94
-rw-r--r--lib/Transforms/Utils/BypassSlowDivision.cpp8
-rw-r--r--lib/Transforms/Utils/CanonicalizeAliases.cpp1
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp15
-rw-r--r--lib/Transforms/Utils/CloneModule.cpp18
-rw-r--r--lib/Transforms/Utils/CodeExtractor.cpp309
-rw-r--r--lib/Transforms/Utils/EntryExitInstrumenter.cpp2
-rw-r--r--lib/Transforms/Utils/Evaluator.cpp2
-rw-r--r--lib/Transforms/Utils/FlattenCFG.cpp20
-rw-r--r--lib/Transforms/Utils/FunctionImportUtils.cpp2
-rw-r--r--lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp6
-rw-r--r--lib/Transforms/Utils/LibCallsShrinkWrap.cpp2
-rw-r--r--lib/Transforms/Utils/Local.cpp209
-rw-r--r--lib/Transforms/Utils/LoopRotationUtils.cpp27
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp15
-rw-r--r--lib/Transforms/Utils/LoopUnroll.cpp12
-rw-r--r--lib/Transforms/Utils/LoopUnrollAndJam.cpp6
-rw-r--r--lib/Transforms/Utils/LoopUnrollPeel.cpp161
-rw-r--r--lib/Transforms/Utils/LoopUtils.cpp56
-rw-r--r--lib/Transforms/Utils/LoopVersioning.cpp4
-rw-r--r--lib/Transforms/Utils/MetaRenamer.cpp5
-rw-r--r--lib/Transforms/Utils/MisExpect.cpp177
-rw-r--r--lib/Transforms/Utils/ModuleUtils.cpp2
-rw-r--r--lib/Transforms/Utils/PredicateInfo.cpp80
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp250
-rw-r--r--lib/Transforms/Utils/SimplifyLibCalls.cpp688
-rw-r--r--lib/Transforms/Utils/SymbolRewriter.cpp12
-rw-r--r--lib/Transforms/Utils/VNCoercion.cpp2
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp60
-rw-r--r--lib/Transforms/Vectorize/LoadStoreVectorizer.cpp26
-rw-r--r--lib/Transforms/Vectorize/LoopVectorizationLegality.cpp186
-rw-r--r--lib/Transforms/Vectorize/LoopVectorizationPlanner.h4
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp738
-rw-r--r--lib/Transforms/Vectorize/SLPVectorizer.cpp820
-rw-r--r--lib/Transforms/Vectorize/VPlan.cpp19
-rw-r--r--lib/Transforms/Vectorize/VPlan.h4
-rw-r--r--lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp2
-rw-r--r--lib/Transforms/Vectorize/VPlanSLP.cpp13
-rw-r--r--lib/WindowsManifest/WindowsManifestMerger.cpp4
-rw-r--r--lib/XRay/FDRRecordProducer.cpp37
-rw-r--r--lib/XRay/FileHeaderReader.cpp14
-rw-r--r--lib/XRay/InstrumentationMap.cpp17
-rw-r--r--lib/XRay/Profile.cpp10
-rw-r--r--lib/XRay/RecordInitializer.cpp202
-rw-r--r--lib/XRay/Trace.cpp43
-rw-r--r--tools/bugpoint/BugDriver.h7
-rw-r--r--tools/bugpoint/ExtractFunction.cpp3
-rw-r--r--tools/bugpoint/OptimizerDriver.cpp12
-rw-r--r--tools/bugpoint/ToolRunner.cpp16
-rw-r--r--tools/bugpoint/bugpoint.cpp46
-rw-r--r--tools/llc/llc.cpp27
-rw-r--r--tools/lli/lli.cpp71
-rw-r--r--tools/llvm-ar/llvm-ar.cpp192
-rw-r--r--tools/llvm-as/llvm-as.cpp2
-rw-r--r--tools/llvm-cov/CodeCoverage.cpp24
-rw-r--r--tools/llvm-cov/SourceCoverageView.cpp8
-rw-r--r--tools/llvm-cov/TestingSupport.cpp10
-rw-r--r--tools/llvm-cxxdump/llvm-cxxdump.cpp6
-rw-r--r--tools/llvm-cxxmap/llvm-cxxmap.cpp2
-rw-r--r--tools/llvm-dis/llvm-dis.cpp4
-rw-r--r--tools/llvm-dwarfdump/Statistics.cpp263
-rw-r--r--tools/llvm-dwarfdump/llvm-dwarfdump.cpp2
-rw-r--r--tools/llvm-extract/llvm-extract.cpp16
-rw-r--r--tools/llvm-ifs/CMakeLists.txt10
-rw-r--r--tools/llvm-ifs/LLVMBuild.txt21
-rw-r--r--tools/llvm-ifs/llvm-ifs.cpp532
-rw-r--r--tools/llvm-link/llvm-link.cpp6
-rw-r--r--tools/llvm-lto/llvm-lto.cpp20
-rw-r--r--tools/llvm-lto2/llvm-lto2.cpp12
-rw-r--r--tools/llvm-mc/Disassembler.cpp15
-rw-r--r--tools/llvm-mc/Disassembler.h10
-rw-r--r--tools/llvm-mc/llvm-mc.cpp27
-rw-r--r--tools/llvm-mca/CodeRegion.cpp6
-rw-r--r--tools/llvm-mca/CodeRegionGenerator.cpp2
-rw-r--r--tools/llvm-mca/Views/BottleneckAnalysis.cpp40
-rw-r--r--tools/llvm-mca/Views/BottleneckAnalysis.h8
-rw-r--r--tools/llvm-mca/Views/InstructionInfoView.cpp31
-rw-r--r--tools/llvm-mca/Views/InstructionInfoView.h13
-rw-r--r--tools/llvm-mca/Views/TimelineView.cpp50
-rw-r--r--tools/llvm-mca/Views/TimelineView.h1
-rw-r--r--tools/llvm-mca/llvm-mca.cpp113
-rw-r--r--tools/llvm-modextract/llvm-modextract.cpp2
-rw-r--r--tools/llvm-nm/llvm-nm.cpp51
-rw-r--r--tools/llvm-objcopy/COFF/COFFObjcopy.cpp88
-rw-r--r--tools/llvm-objcopy/COFF/Reader.cpp18
-rw-r--r--tools/llvm-objcopy/COFF/Writer.cpp4
-rw-r--r--tools/llvm-objcopy/CommonOpts.td123
-rw-r--r--tools/llvm-objcopy/CopyConfig.cpp370
-rw-r--r--tools/llvm-objcopy/CopyConfig.h110
-rw-r--r--tools/llvm-objcopy/ELF/ELFConfig.cpp133
-rw-r--r--tools/llvm-objcopy/ELF/ELFConfig.h44
-rw-r--r--tools/llvm-objcopy/ELF/ELFObjcopy.cpp169
-rw-r--r--tools/llvm-objcopy/ELF/Object.cpp252
-rw-r--r--tools/llvm-objcopy/ELF/Object.h56
-rw-r--r--tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp350
-rw-r--r--tools/llvm-objcopy/MachO/MachOLayoutBuilder.h50
-rw-r--r--tools/llvm-objcopy/MachO/MachOObjcopy.cpp30
-rw-r--r--tools/llvm-objcopy/MachO/MachOReader.cpp45
-rw-r--r--tools/llvm-objcopy/MachO/MachOReader.h3
-rw-r--r--tools/llvm-objcopy/MachO/MachOWriter.cpp305
-rw-r--r--tools/llvm-objcopy/MachO/MachOWriter.h19
-rw-r--r--tools/llvm-objcopy/MachO/Object.h27
-rw-r--r--tools/llvm-objcopy/ObjcopyOpts.td141
-rw-r--r--tools/llvm-objcopy/StripOpts.td103
-rw-r--r--tools/llvm-objcopy/llvm-objcopy.cpp53
-rw-r--r--tools/llvm-objdump/COFFDump.cpp77
-rw-r--r--tools/llvm-objdump/ELFDump.cpp2
-rw-r--r--tools/llvm-objdump/MachODump.cpp375
-rw-r--r--tools/llvm-objdump/llvm-objdump.cpp543
-rw-r--r--tools/llvm-objdump/llvm-objdump.h36
-rw-r--r--tools/llvm-pdbutil/BytesOutputStyle.cpp2
-rw-r--r--tools/llvm-pdbutil/DumpOutputStyle.cpp9
-rw-r--r--tools/llvm-pdbutil/ExplainOutputStyle.cpp2
-rw-r--r--tools/llvm-pdbutil/InputFile.cpp17
-rw-r--r--tools/llvm-pdbutil/MinimalSymbolDumper.cpp5
-rw-r--r--tools/llvm-pdbutil/PrettyTypeDumper.cpp4
-rw-r--r--tools/llvm-pdbutil/llvm-pdbutil.cpp10
-rw-r--r--tools/llvm-profdata/llvm-profdata.cpp287
-rw-r--r--tools/llvm-readobj/ARMEHABIPrinter.h19
-rw-r--r--tools/llvm-readobj/ARMWinEHPrinter.cpp9
-rw-r--r--tools/llvm-readobj/COFFDumper.cpp362
-rw-r--r--tools/llvm-readobj/DwarfCFIEHPrinter.h54
-rw-r--r--tools/llvm-readobj/ELFDumper.cpp1648
-rw-r--r--tools/llvm-readobj/MachODumper.cpp61
-rw-r--r--tools/llvm-readobj/ObjDumper.cpp32
-rw-r--r--tools/llvm-readobj/ObjDumper.h11
-rw-r--r--tools/llvm-readobj/WasmDumper.cpp7
-rw-r--r--tools/llvm-readobj/Win64EHDumper.cpp13
-rw-r--r--tools/llvm-readobj/WindowsResourceDumper.cpp8
-rw-r--r--tools/llvm-readobj/XCOFFDumper.cpp402
-rw-r--r--tools/llvm-readobj/llvm-readobj.cpp148
-rw-r--r--tools/llvm-readobj/llvm-readobj.h25
-rw-r--r--tools/llvm-reduce/CMakeLists.txt26
-rw-r--r--tools/llvm-reduce/DeltaManager.h36
-rw-r--r--tools/llvm-reduce/LLVMBuild.txt24
-rw-r--r--tools/llvm-reduce/TestRunner.cpp42
-rw-r--r--tools/llvm-reduce/TestRunner.h46
-rw-r--r--tools/llvm-reduce/deltas/Delta.cpp162
-rw-r--r--tools/llvm-reduce/deltas/Delta.h76
-rw-r--r--tools/llvm-reduce/deltas/ReduceArguments.cpp125
-rw-r--r--tools/llvm-reduce/deltas/ReduceArguments.h21
-rw-r--r--tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp146
-rw-r--r--tools/llvm-reduce/deltas/ReduceBasicBlocks.h20
-rw-r--r--tools/llvm-reduce/deltas/ReduceFunctions.cpp77
-rw-r--r--tools/llvm-reduce/deltas/ReduceFunctions.h20
-rw-r--r--tools/llvm-reduce/deltas/ReduceGlobalVars.cpp74
-rw-r--r--tools/llvm-reduce/deltas/ReduceGlobalVars.h20
-rw-r--r--tools/llvm-reduce/deltas/ReduceInstructions.cpp65
-rw-r--r--tools/llvm-reduce/deltas/ReduceInstructions.h20
-rw-r--r--tools/llvm-reduce/deltas/ReduceMetadata.cpp138
-rw-r--r--tools/llvm-reduce/deltas/ReduceMetadata.h18
-rw-r--r--tools/llvm-reduce/llvm-reduce.cpp114
-rw-r--r--tools/llvm-rtdyld/llvm-rtdyld.cpp104
-rw-r--r--tools/llvm-stress/llvm-stress.cpp4
-rw-r--r--tools/llvm-symbolizer/llvm-symbolizer.cpp6
-rw-r--r--tools/llvm-xray/func-id-helper.cpp2
-rw-r--r--tools/llvm-xray/xray-account.cpp2
-rw-r--r--tools/llvm-xray/xray-converter.cpp4
-rw-r--r--tools/llvm-xray/xray-extract.cpp2
-rw-r--r--tools/llvm-xray/xray-fdr-dump.cpp2
-rw-r--r--tools/llvm-xray/xray-graph-diff.cpp2
-rw-r--r--tools/llvm-xray/xray-graph.cpp2
-rw-r--r--tools/opt/opt.cpp13
-rw-r--r--tools/vfabi-demangle-fuzzer/CMakeLists.txt7
-rw-r--r--tools/vfabi-demangle-fuzzer/vfabi-demangler-fuzzer.cpp26
-rw-r--r--utils/TableGen/AsmMatcherEmitter.cpp19
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp3
-rw-r--r--utils/TableGen/CallingConvEmitter.cpp4
-rw-r--r--utils/TableGen/CodeEmitterGen.cpp305
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.cpp42
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.h4
-rw-r--r--utils/TableGen/CodeGenInstruction.cpp1
-rw-r--r--utils/TableGen/CodeGenInstruction.h1
-rw-r--r--utils/TableGen/CodeGenIntrinsics.h8
-rw-r--r--utils/TableGen/CodeGenMapTable.cpp12
-rw-r--r--utils/TableGen/CodeGenRegisters.cpp52
-rw-r--r--utils/TableGen/CodeGenRegisters.h26
-rw-r--r--utils/TableGen/CodeGenSchedule.cpp24
-rw-r--r--utils/TableGen/CodeGenTarget.cpp70
-rw-r--r--utils/TableGen/CodeGenTarget.h6
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp2
-rw-r--r--utils/TableGen/DAGISelMatcher.h8
-rw-r--r--utils/TableGen/DAGISelMatcherEmitter.cpp22
-rw-r--r--utils/TableGen/DAGISelMatcherGen.cpp10
-rw-r--r--utils/TableGen/DAGISelMatcherOpt.cpp9
-rw-r--r--utils/TableGen/DFAEmitter.cpp394
-rw-r--r--utils/TableGen/DFAEmitter.h107
-rw-r--r--utils/TableGen/DFAPacketizerEmitter.cpp657
-rw-r--r--utils/TableGen/DisassemblerEmitter.cpp2
-rw-r--r--utils/TableGen/FixedLenDecoderEmitter.cpp93
-rw-r--r--utils/TableGen/GICombinerEmitter.cpp452
-rw-r--r--utils/TableGen/GlobalISel/CMakeLists.txt7
-rw-r--r--utils/TableGen/GlobalISel/CodeExpander.cpp93
-rw-r--r--utils/TableGen/GlobalISel/CodeExpander.h55
-rw-r--r--utils/TableGen/GlobalISel/CodeExpansions.h43
-rw-r--r--utils/TableGen/GlobalISelEmitter.cpp775
-rw-r--r--utils/TableGen/InfoByHwMode.cpp11
-rw-r--r--utils/TableGen/InfoByHwMode.h5
-rw-r--r--utils/TableGen/InstrDocsEmitter.cpp2
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp52
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp20
-rw-r--r--utils/TableGen/RISCVCompressInstEmitter.cpp13
-rw-r--r--utils/TableGen/RegisterInfoEmitter.cpp4
-rw-r--r--utils/TableGen/SearchableTableEmitter.cpp16
-rw-r--r--utils/TableGen/SubtargetEmitter.cpp8
-rw-r--r--utils/TableGen/SubtargetFeatureInfo.cpp12
-rw-r--r--utils/TableGen/TableGen.cpp157
-rw-r--r--utils/TableGen/TableGenBackends.h2
-rw-r--r--utils/TableGen/WebAssemblyDisassemblerEmitter.cpp2
-rw-r--r--utils/TableGen/X86DisassemblerTables.cpp2
-rw-r--r--utils/TableGen/X86EVEX2VEXTablesEmitter.cpp1
-rw-r--r--utils/TableGen/X86RecognizableInstr.cpp14
-rwxr-xr-xutils/add_argument_names.py82
-rw-r--r--utils/llvm-locstats/CMakeLists.txt12
-rwxr-xr-xutils/llvm-locstats/llvm-locstats.py209
2118 files changed, 120703 insertions, 48751 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index cac2f297056d..b84970956666 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -370,9 +370,13 @@ typedef enum {
LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the
original using an unsigned comparison and return
the old one */
- LLVMAtomicRMWBinOpUMin /**< Sets the value if it's greater than the
- original using an unsigned comparison and return
- the old one */
+ LLVMAtomicRMWBinOpUMin, /**< Sets the value if it's greater than the
+ original using an unsigned comparison and return
+ the old one */
+ LLVMAtomicRMWBinOpFAdd, /**< Add a floating point value and return the
+ old one */
+ LLVMAtomicRMWBinOpFSub /**< Subtract a floating point value and return the
+ old one */
} LLVMAtomicRMWBinOp;
typedef enum {
@@ -1539,6 +1543,7 @@ LLVMTypeRef LLVMX86MMXType(void);
macro(GlobalVariable) \
macro(UndefValue) \
macro(Instruction) \
+ macro(UnaryOperator) \
macro(BinaryOperator) \
macro(CallInst) \
macro(IntrinsicInst) \
@@ -1571,6 +1576,8 @@ LLVMTypeRef LLVMX86MMXType(void);
macro(ResumeInst) \
macro(CleanupReturnInst) \
macro(CatchReturnInst) \
+ macro(CatchSwitchInst) \
+ macro(CallBrInst) \
macro(FuncletPadInst) \
macro(CatchPadInst) \
macro(CleanupPadInst) \
@@ -1592,7 +1599,10 @@ LLVMTypeRef LLVMX86MMXType(void);
macro(ZExtInst) \
macro(ExtractValueInst) \
macro(LoadInst) \
- macro(VAArgInst)
+ macro(VAArgInst) \
+ macro(AtomicCmpXchgInst) \
+ macro(AtomicRMWInst) \
+ macro(FenceInst)
/**
* @defgroup LLVMCCoreValueGeneral General APIs
@@ -3807,8 +3817,12 @@ LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
const char *Name);
LLVMBool LLVMGetVolatile(LLVMValueRef MemoryAccessInst);
void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile);
+LLVMBool LLVMGetWeak(LLVMValueRef CmpXchgInst);
+void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak);
LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst);
void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering);
+LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst);
+void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst, LLVMAtomicRMWBinOp BinOp);
/* Casts */
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val,
diff --git a/include/llvm-c/DebugInfo.h b/include/llvm-c/DebugInfo.h
index 33c8110a863c..41e9f96bbb92 100644
--- a/include/llvm-c/DebugInfo.h
+++ b/include/llvm-c/DebugInfo.h
@@ -32,7 +32,7 @@ typedef enum {
LLVMDIFlagPublic = 3,
LLVMDIFlagFwdDecl = 1 << 2,
LLVMDIFlagAppleBlock = 1 << 3,
- LLVMDIFlagBlockByrefStruct = 1 << 4,
+ LLVMDIFlagReservedBit4 = 1 << 4,
LLVMDIFlagVirtual = 1 << 5,
LLVMDIFlagArtificial = 1 << 6,
LLVMDIFlagExplicit = 1 << 7,
@@ -170,6 +170,19 @@ typedef unsigned LLVMMetadataKind;
typedef unsigned LLVMDWARFTypeEncoding;
/**
+ * Describes the kind of macro declaration used for LLVMDIBuilderCreateMacro.
+ * @see llvm::dwarf::MacinfoRecordType
+ * @note Values are from DW_MACINFO_* constants in the DWARF specification.
+ */
+typedef enum {
+ LLVMDWARFMacinfoRecordTypeDefine = 0x01,
+ LLVMDWARFMacinfoRecordTypeMacro = 0x02,
+ LLVMDWARFMacinfoRecordTypeStartFile = 0x03,
+ LLVMDWARFMacinfoRecordTypeEndFile = 0x04,
+ LLVMDWARFMacinfoRecordTypeVendorExt = 0xff
+} LLVMDWARFMacinfoRecordType;
+
+/**
* The current debug metadata version number.
*/
unsigned LLVMDebugMetadataVersion(void);
@@ -522,6 +535,38 @@ LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef Builder,
LLVMDIFlags Flags);
/**
+ * Create debugging information entry for a macro.
+ * @param Builder The DIBuilder.
+ * @param ParentMacroFile Macro parent (could be NULL).
+ * @param Line Source line number where the macro is defined.
+ * @param RecordType DW_MACINFO_define or DW_MACINFO_undef.
+ * @param Name Macro name.
+ * @param NameLen Macro name length.
+ * @param Value Macro value.
+ * @param ValueLen Macro value length.
+ */
+LLVMMetadataRef LLVMDIBuilderCreateMacro(LLVMDIBuilderRef Builder,
+ LLVMMetadataRef ParentMacroFile,
+ unsigned Line,
+ LLVMDWARFMacinfoRecordType RecordType,
+ const char *Name, size_t NameLen,
+ const char *Value, size_t ValueLen);
+
+/**
+ * Create debugging information temporary entry for a macro file.
+ * List of macro node direct children will be calculated by DIBuilder,
+ * using the \p ParentMacroFile relationship.
+ * @param Builder The DIBuilder.
+ * @param ParentMacroFile Macro parent (could be NULL).
+ * @param Line Source line number where the macro file is included.
+ * @param File File descriptor containing the name of the macro file.
+ */
+LLVMMetadataRef
+LLVMDIBuilderCreateTempMacroFile(LLVMDIBuilderRef Builder,
+ LLVMMetadataRef ParentMacroFile, unsigned Line,
+ LLVMMetadataRef File);
+
+/**
* Create debugging information entry for an enumerator.
* @param Builder The DIBuilder.
* @param Name Enumerator name.
diff --git a/include/llvm-c/Remarks.h b/include/llvm-c/Remarks.h
index 88eb5120c57c..5444aebddd60 100644
--- a/include/llvm-c/Remarks.h
+++ b/include/llvm-c/Remarks.h
@@ -30,7 +30,8 @@ extern "C" {
* @{
*/
-#define REMARKS_API_VERSION 0
+// 0 -> 1: Bitstream remarks support.
+#define REMARKS_API_VERSION 1
/**
* The type of the emitted remark.
@@ -241,6 +242,20 @@ extern LLVMRemarkParserRef LLVMRemarkParserCreateYAML(const void *Buf,
uint64_t Size);
/**
+ * Creates a remark parser that can be used to parse the buffer located in \p
+ * Buf of size \p Size bytes.
+ *
+ * \p Buf cannot be `NULL`.
+ *
+ * This function should be paired with LLVMRemarkParserDispose() to avoid
+ * leaking resources.
+ *
+ * \since REMARKS_API_VERSION=1
+ */
+extern LLVMRemarkParserRef LLVMRemarkParserCreateBitstream(const void *Buf,
+ uint64_t Size);
+
+/**
* Returns the next remark in the file.
*
* The value pointed to by the return value needs to be disposed using a call to
diff --git a/include/llvm-c/Transforms/IPO.h b/include/llvm-c/Transforms/IPO.h
index 7a82ed464141..51d007581283 100644
--- a/include/llvm-c/Transforms/IPO.h
+++ b/include/llvm-c/Transforms/IPO.h
@@ -34,6 +34,9 @@ void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM);
/** See llvm::createConstantMergePass function. */
void LLVMAddConstantMergePass(LLVMPassManagerRef PM);
+/** See llvm::createMergeFunctionsPass function. */
+void LLVMAddMergeFunctionsPass(LLVMPassManagerRef PM);
+
/** See llvm::createCalledValuePropagationPass function. */
void LLVMAddCalledValuePropagationPass(LLVMPassManagerRef PM);
@@ -67,6 +70,21 @@ void LLVMAddIPSCCPPass(LLVMPassManagerRef PM);
/** See llvm::createInternalizePass function. */
void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain);
+/**
+ * Create and add the internalize pass to the given pass manager with the
+ * provided preservation callback.
+ *
+ * The context parameter is forwarded to the callback on each invocation.
+ * As such, it is the responsibility of the caller to extend its lifetime
+ * until execution of this pass has finished.
+ *
+ * @see llvm::createInternalizePass function.
+ */
+void LLVMAddInternalizePassWithMustPreservePredicate(
+ LLVMPassManagerRef PM,
+ void *Context,
+ LLVMBool (*MustPreserve)(LLVMValueRef, void *));
+
/** See llvm::createStripDeadPrototypesPass function. */
void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM);
diff --git a/include/llvm-c/Transforms/Scalar.h b/include/llvm-c/Transforms/Scalar.h
index 031cf98b2df2..6f3a3d8b3750 100644
--- a/include/llvm-c/Transforms/Scalar.h
+++ b/include/llvm-c/Transforms/Scalar.h
@@ -35,6 +35,9 @@ extern "C" {
/** See llvm::createAggressiveDCEPass function. */
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
+/** See llvm::createDeadCodeEliminationPass function. */
+void LLVMAddDCEPass(LLVMPassManagerRef PM);
+
/** See llvm::createBitTrackingDCEPass function. */
void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
@@ -144,6 +147,9 @@ void LLVMAddEarlyCSEMemSSAPass(LLVMPassManagerRef PM);
/** See llvm::createLowerExpectIntrinsicPass function */
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
+/** See llvm::createLowerConstantIntrinsicsPass function */
+void LLVMAddLowerConstantIntrinsicsPass(LLVMPassManagerRef PM);
+
/** See llvm::createTypeBasedAliasAnalysisPass function */
void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
diff --git a/include/llvm-c/lto.h b/include/llvm-c/lto.h
index 2467722b1954..41e6067cf44f 100644
--- a/include/llvm-c/lto.h
+++ b/include/llvm-c/lto.h
@@ -44,7 +44,7 @@ typedef bool lto_bool_t;
* @{
*/
-#define LTO_API_VERSION 24
+#define LTO_API_VERSION 25
/**
* \since prior to LTO_API_VERSION=3
@@ -550,6 +550,56 @@ extern void
lto_codegen_set_should_embed_uselists(lto_code_gen_t cg,
lto_bool_t ShouldEmbedUselists);
+/** Opaque reference to an LTO input file */
+typedef struct LLVMOpaqueLTOInput *lto_input_t;
+
+/**
+ * Creates an LTO input file from a buffer. The path
+ * argument is used for diagnotics as this function
+ * otherwise does not know which file the given buffer
+ * is associated with.
+ *
+ * \since LTO_API_VERSION=24
+ */
+extern lto_input_t lto_input_create(const void *buffer,
+ size_t buffer_size,
+ const char *path);
+
+/**
+ * Frees all memory internally allocated by the LTO input file.
+ * Upon return the lto_module_t is no longer valid.
+ *
+ * \since LTO_API_VERSION=24
+ */
+extern void lto_input_dispose(lto_input_t input);
+
+/**
+ * Returns the number of dependent library specifiers
+ * for the given LTO input file.
+ *
+ * \since LTO_API_VERSION=24
+ */
+extern unsigned lto_input_get_num_dependent_libraries(lto_input_t input);
+
+/**
+ * Returns the ith dependent library specifier
+ * for the given LTO input file. The returned
+ * string is not null-terminated.
+ *
+ * \since LTO_API_VERSION=24
+ */
+extern const char * lto_input_get_dependent_library(lto_input_t input,
+ size_t index,
+ size_t *size);
+
+/**
+ * Returns the list of libcall symbols that can be generated by LTO
+ * that might not be visible from the symbol table of bitcode files.
+ *
+ * \since prior to LTO_API_VERSION=25
+ */
+extern const char *const *lto_runtime_lib_symbols_list(size_t *size);
+
/**
* @} // endgoup LLVMCLTO
* @defgroup LLVMCTLTO ThinLTO
@@ -846,48 +896,6 @@ thinlto_codegen_set_cache_size_megabytes(thinlto_code_gen_t cg,
extern void thinlto_codegen_set_cache_size_files(thinlto_code_gen_t cg,
unsigned max_size_files);
-/** Opaque reference to an LTO input file */
-typedef struct LLVMOpaqueLTOInput *lto_input_t;
-
-/**
- * Creates an LTO input file from a buffer. The path
- * argument is used for diagnotics as this function
- * otherwise does not know which file the given buffer
- * is associated with.
- *
- * \since LTO_API_VERSION=24
- */
-extern lto_input_t lto_input_create(const void *buffer,
- size_t buffer_size,
- const char *path);
-
-/**
- * Frees all memory internally allocated by the LTO input file.
- * Upon return the lto_module_t is no longer valid.
- *
- * \since LTO_API_VERSION=24
- */
-extern void lto_input_dispose(lto_input_t input);
-
-/**
- * Returns the number of dependent library specifiers
- * for the given LTO input file.
- *
- * \since LTO_API_VERSION=24
- */
-extern unsigned lto_input_get_num_dependent_libraries(lto_input_t input);
-
-/**
- * Returns the ith dependent library specifier
- * for the given LTO input file. The returned
- * string is not null-terminated.
- *
- * \since LTO_API_VERSION=24
- */
-extern const char * lto_input_get_dependent_library(lto_input_t input,
- size_t index,
- size_t *size);
-
/**
* @} // endgroup LLVMCTLTO_CACHING
*/
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index a9648d35cf5d..1c4969733791 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -192,6 +192,11 @@ struct APFloatBase {
/// IEEE-754R 7: Default exception handling.
///
/// opUnderflow or opOverflow are always returned or-ed with opInexact.
+ ///
+ /// APFloat models this behavior specified by IEEE-754:
+ /// "For operations producing results in floating-point format, the default
+ /// result of an operation that signals the invalid operation exception
+ /// shall be a quiet NaN."
enum opStatus {
opOK = 0x00,
opInvalidOp = 0x01,
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index 2381b75e08b1..8dce5a621bb3 100644
--- a/include/llvm/ADT/APInt.h
+++ b/include/llvm/ADT/APInt.h
@@ -1467,6 +1467,13 @@ public:
U.pVal[whichWord(BitPosition)] &= Mask;
}
+ /// Set bottom loBits bits to 0.
+ void clearLowBits(unsigned loBits) {
+ assert(loBits <= BitWidth && "More bits than bitwidth");
+ APInt Keep = getHighBitsSet(BitWidth, BitWidth - loBits);
+ *this &= Keep;
+ }
+
/// Set the sign bit to 0.
void clearSignBit() {
clearBit(BitWidth - 1);
@@ -1496,9 +1503,11 @@ public:
/// Insert the bits from a smaller APInt starting at bitPosition.
void insertBits(const APInt &SubBits, unsigned bitPosition);
+ void insertBits(uint64_t SubBits, unsigned bitPosition, unsigned numBits);
/// Return an APInt with the extracted bits [bitPosition,bitPosition+numBits).
APInt extractBits(unsigned numBits, unsigned bitPosition) const;
+ uint64_t extractBitsAsZExtValue(unsigned numBits, unsigned bitPosition) const;
/// @}
/// \name Value Characterization Functions
diff --git a/include/llvm/ADT/Any.h b/include/llvm/ADT/Any.h
index 5dcd6e73c54f..49657e02a991 100644
--- a/include/llvm/ADT/Any.h
+++ b/include/llvm/ADT/Any.h
@@ -38,7 +38,7 @@ class Any {
explicit StorageImpl(T &&Value) : Value(std::move(Value)) {}
std::unique_ptr<StorageBase> clone() const override {
- return llvm::make_unique<StorageImpl<T>>(Value);
+ return std::make_unique<StorageImpl<T>>(Value);
}
const void *id() const override { return &TypeId<T>::Id; }
@@ -78,7 +78,7 @@ public:
int>::type = 0>
Any(T &&Value) {
using U = typename std::decay<T>::type;
- Storage = llvm::make_unique<StorageImpl<U>>(std::forward<T>(Value));
+ Storage = std::make_unique<StorageImpl<U>>(std::forward<T>(Value));
}
Any(Any &&Other) : Storage(std::move(Other.Storage)) {}
diff --git a/include/llvm/ADT/ArrayRef.h b/include/llvm/ADT/ArrayRef.h
index 773c88f7c9f9..f6455d3fa412 100644
--- a/include/llvm/ADT/ArrayRef.h
+++ b/include/llvm/ADT/ArrayRef.h
@@ -481,6 +481,12 @@ namespace llvm {
return Vec;
}
+ /// Construct an ArrayRef from a std::array.
+ template <typename T, std::size_t N>
+ ArrayRef<T> makeArrayRef(const std::array<T, N> &Arr) {
+ return Arr;
+ }
+
/// Construct an ArrayRef from an ArrayRef (no-op) (const)
template <typename T> ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) {
return Vec;
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h
index a05cf8130d3c..948a6e6bfb38 100644
--- a/include/llvm/ADT/DenseMap.h
+++ b/include/llvm/ADT/DenseMap.h
@@ -38,33 +38,7 @@ namespace detail {
// implementation without requiring two members.
template <typename KeyT, typename ValueT>
struct DenseMapPair : public std::pair<KeyT, ValueT> {
-
- // FIXME: Switch to inheriting constructors when we drop support for older
- // clang versions.
- // NOTE: This default constructor is declared with '{}' rather than
- // '= default' to work around a separate bug in clang-3.8. This can
- // also go when we switch to inheriting constructors.
- DenseMapPair() {}
-
- DenseMapPair(const KeyT &Key, const ValueT &Value)
- : std::pair<KeyT, ValueT>(Key, Value) {}
-
- DenseMapPair(KeyT &&Key, ValueT &&Value)
- : std::pair<KeyT, ValueT>(std::move(Key), std::move(Value)) {}
-
- template <typename AltKeyT, typename AltValueT>
- DenseMapPair(AltKeyT &&AltKey, AltValueT &&AltValue,
- typename std::enable_if<
- std::is_convertible<AltKeyT, KeyT>::value &&
- std::is_convertible<AltValueT, ValueT>::value>::type * = 0)
- : std::pair<KeyT, ValueT>(std::forward<AltKeyT>(AltKey),
- std::forward<AltValueT>(AltValue)) {}
-
- template <typename AltPairT>
- DenseMapPair(AltPairT &&AltPair,
- typename std::enable_if<std::is_convertible<
- AltPairT, std::pair<KeyT, ValueT>>::value>::type * = nullptr)
- : std::pair<KeyT, ValueT>(std::forward<AltPairT>(AltPair)) {}
+ using std::pair<KeyT, ValueT>::pair;
KeyT &getFirst() { return std::pair<KeyT, ValueT>::first; }
const KeyT &getFirst() const { return std::pair<KeyT, ValueT>::first; }
@@ -748,7 +722,7 @@ public:
~DenseMap() {
this->destroyAll();
- operator delete(Buckets);
+ deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT));
}
void swap(DenseMap& RHS) {
@@ -768,7 +742,7 @@ public:
DenseMap& operator=(DenseMap &&other) {
this->destroyAll();
- operator delete(Buckets);
+ deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT));
init(0);
swap(other);
return *this;
@@ -776,7 +750,7 @@ public:
void copyFrom(const DenseMap& other) {
this->destroyAll();
- operator delete(Buckets);
+ deallocate_buffer(Buckets, sizeof(BucketT) * NumBuckets, alignof(BucketT));
if (allocateBuckets(other.NumBuckets)) {
this->BaseT::copyFrom(other);
} else {
@@ -809,10 +783,12 @@ public:
this->moveFromOldBuckets(OldBuckets, OldBuckets+OldNumBuckets);
// Free the old table.
- operator delete(OldBuckets);
+ deallocate_buffer(OldBuckets, sizeof(BucketT) * OldNumBuckets,
+ alignof(BucketT));
}
void shrink_and_clear() {
+ unsigned OldNumBuckets = NumBuckets;
unsigned OldNumEntries = NumEntries;
this->destroyAll();
@@ -825,7 +801,8 @@ public:
return;
}
- operator delete(Buckets);
+ deallocate_buffer(Buckets, sizeof(BucketT) * OldNumBuckets,
+ alignof(BucketT));
init(NewNumBuckets);
}
@@ -861,7 +838,8 @@ private:
return false;
}
- Buckets = static_cast<BucketT*>(operator new(sizeof(BucketT) * NumBuckets));
+ Buckets = static_cast<BucketT *>(
+ allocate_buffer(sizeof(BucketT) * NumBuckets, alignof(BucketT)));
return true;
}
};
@@ -1076,7 +1054,8 @@ public:
this->moveFromOldBuckets(OldRep.Buckets, OldRep.Buckets+OldRep.NumBuckets);
// Free the old table.
- operator delete(OldRep.Buckets);
+ deallocate_buffer(OldRep.Buckets, sizeof(BucketT) * OldRep.NumBuckets,
+ alignof(BucketT));
}
void shrink_and_clear() {
@@ -1160,15 +1139,17 @@ private:
if (Small)
return;
- operator delete(getLargeRep()->Buckets);
+ deallocate_buffer(getLargeRep()->Buckets,
+ sizeof(BucketT) * getLargeRep()->NumBuckets,
+ alignof(BucketT));
getLargeRep()->~LargeRep();
}
LargeRep allocateBuckets(unsigned Num) {
assert(Num > InlineBuckets && "Must allocate more buckets than are inline");
- LargeRep Rep = {
- static_cast<BucketT*>(operator new(sizeof(BucketT) * Num)), Num
- };
+ LargeRep Rep = {static_cast<BucketT *>(allocate_buffer(
+ sizeof(BucketT) * Num, alignof(BucketT))),
+ Num};
return Rep;
}
};
diff --git a/include/llvm/ADT/DenseMapInfo.h b/include/llvm/ADT/DenseMapInfo.h
index 5ef6f3ad1b04..bd4c60c8f13e 100644
--- a/include/llvm/ADT/DenseMapInfo.h
+++ b/include/llvm/ADT/DenseMapInfo.h
@@ -17,7 +17,7 @@
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
-#include "llvm/Support/ScalableSize.h"
+#include "llvm/Support/TypeSize.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
@@ -67,6 +67,17 @@ template<> struct DenseMapInfo<char> {
}
};
+// Provide DenseMapInfo for unsigned chars.
+template <> struct DenseMapInfo<unsigned char> {
+ static inline unsigned char getEmptyKey() { return ~0; }
+ static inline unsigned char getTombstoneKey() { return ~0 - 1; }
+ static unsigned getHashValue(const unsigned char &Val) { return Val * 37U; }
+
+ static bool isEqual(const unsigned char &LHS, const unsigned char &RHS) {
+ return LHS == RHS;
+ }
+};
+
// Provide DenseMapInfo for unsigned shorts.
template <> struct DenseMapInfo<unsigned short> {
static inline unsigned short getEmptyKey() { return 0xFFFF; }
diff --git a/include/llvm/ADT/DirectedGraph.h b/include/llvm/ADT/DirectedGraph.h
new file mode 100644
index 000000000000..f6a358d99cd2
--- /dev/null
+++ b/include/llvm/ADT/DirectedGraph.h
@@ -0,0 +1,270 @@
+//===- llvm/ADT/DirectedGraph.h - Directed Graph ----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the interface and a base class implementation for a
+// directed graph.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ADT_DIRECTEDGRAPH_H
+#define LLVM_ADT_DIRECTEDGRAPH_H
+
+#include "llvm/ADT/GraphTraits.h"
+#include "llvm/ADT/SetVector.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
+
+namespace llvm {
+
+/// Represent an edge in the directed graph.
+/// The edge contains the target node it connects to.
+template <class NodeType, class EdgeType> class DGEdge {
+public:
+ DGEdge() = delete;
+ /// Create an edge pointing to the given node \p N.
+ explicit DGEdge(NodeType &N) : TargetNode(N) {}
+ explicit DGEdge(const DGEdge<NodeType, EdgeType> &E)
+ : TargetNode(E.TargetNode) {}
+ DGEdge<NodeType, EdgeType> &operator=(const DGEdge<NodeType, EdgeType> &E) {
+ TargetNode = E.TargetNode;
+ return *this;
+ }
+
+ /// Static polymorphism: delegate implementation (via isEqualTo) to the
+ /// derived class.
+ bool operator==(const EdgeType &E) const { return getDerived().isEqualTo(E); }
+ bool operator!=(const EdgeType &E) const { return !operator==(E); }
+
+ /// Retrieve the target node this edge connects to.
+ const NodeType &getTargetNode() const { return TargetNode; }
+ NodeType &getTargetNode() {
+ return const_cast<NodeType &>(
+ static_cast<const DGEdge<NodeType, EdgeType> &>(*this).getTargetNode());
+ }
+
+protected:
+ // As the default implementation use address comparison for equality.
+ bool isEqualTo(const EdgeType &E) const { return this == &E; }
+
+ // Cast the 'this' pointer to the derived type and return a reference.
+ EdgeType &getDerived() { return *static_cast<EdgeType *>(this); }
+ const EdgeType &getDerived() const {
+ return *static_cast<const EdgeType *>(this);
+ }
+
+ // The target node this edge connects to.
+ NodeType &TargetNode;
+};
+
+/// Represent a node in the directed graph.
+/// The node has a (possibly empty) list of outgoing edges.
+template <class NodeType, class EdgeType> class DGNode {
+public:
+ using EdgeListTy = SetVector<EdgeType *>;
+ using iterator = typename EdgeListTy::iterator;
+ using const_iterator = typename EdgeListTy::const_iterator;
+
+ /// Create a node with a single outgoing edge \p E.
+ explicit DGNode(EdgeType &E) : Edges() { Edges.insert(&E); }
+ DGNode() = default;
+
+ explicit DGNode(const DGNode<NodeType, EdgeType> &N) : Edges(N.Edges) {}
+ DGNode(DGNode<NodeType, EdgeType> &&N) : Edges(std::move(N.Edges)) {}
+
+ DGNode<NodeType, EdgeType> &operator=(const DGNode<NodeType, EdgeType> &N) {
+ Edges = N.Edges;
+ return *this;
+ }
+ DGNode<NodeType, EdgeType> &operator=(const DGNode<NodeType, EdgeType> &&N) {
+ Edges = std::move(N.Edges);
+ return *this;
+ }
+
+ /// Static polymorphism: delegate implementation (via isEqualTo) to the
+ /// derived class.
+ bool operator==(const NodeType &N) const { return getDerived().isEqualTo(N); }
+ bool operator!=(const NodeType &N) const { return !operator==(N); }
+
+ const_iterator begin() const { return Edges.begin(); }
+ const_iterator end() const { return Edges.end(); }
+ iterator begin() { return Edges.begin(); }
+ iterator end() { return Edges.end(); }
+ const EdgeType &front() const { return *Edges.front(); }
+ EdgeType &front() { return *Edges.front(); }
+ const EdgeType &back() const { return *Edges.back(); }
+ EdgeType &back() { return *Edges.back(); }
+
+ /// Collect in \p EL, all the edges from this node to \p N.
+ /// Return true if at least one edge was found, and false otherwise.
+ /// Note that this implementation allows more than one edge to connect
+ /// a given pair of nodes.
+ bool findEdgesTo(const NodeType &N, SmallVectorImpl<EdgeType *> &EL) const {
+ assert(EL.empty() && "Expected the list of edges to be empty.");
+ for (auto *E : Edges)
+ if (E->getTargetNode() == N)
+ EL.push_back(E);
+ return !EL.empty();
+ }
+
+ /// Add the given edge \p E to this node, if it doesn't exist already. Returns
+ /// true if the edge is added and false otherwise.
+ bool addEdge(EdgeType &E) { return Edges.insert(&E); }
+
+ /// Remove the given edge \p E from this node, if it exists.
+ void removeEdge(EdgeType &E) { Edges.remove(&E); }
+
+ /// Test whether there is an edge that goes from this node to \p N.
+ bool hasEdgeTo(const NodeType &N) const {
+ return (findEdgeTo(N) != Edges.end());
+ }
+
+ /// Retrieve the outgoing edges for the node.
+ const EdgeListTy &getEdges() const { return Edges; }
+ EdgeListTy &getEdges() {
+ return const_cast<EdgeListTy &>(
+ static_cast<const DGNode<NodeType, EdgeType> &>(*this).Edges);
+ }
+
+ /// Clear the outgoing edges.
+ void clear() { Edges.clear(); }
+
+protected:
+ // As the default implementation use address comparison for equality.
+ bool isEqualTo(const NodeType &N) const { return this == &N; }
+
+ // Cast the 'this' pointer to the derived type and return a reference.
+ NodeType &getDerived() { return *static_cast<NodeType *>(this); }
+ const NodeType &getDerived() const {
+ return *static_cast<const NodeType *>(this);
+ }
+
+ /// Find an edge to \p N. If more than one edge exists, this will return
+ /// the first one in the list of edges.
+ const_iterator findEdgeTo(const NodeType &N) const {
+ return llvm::find_if(
+ Edges, [&N](const EdgeType *E) { return E->getTargetNode() == N; });
+ }
+
+ // The list of outgoing edges.
+ EdgeListTy Edges;
+};
+
+/// Directed graph
+///
+/// The graph is represented by a table of nodes.
+/// Each node contains a (possibly empty) list of outgoing edges.
+/// Each edge contains the target node it connects to.
+template <class NodeType, class EdgeType> class DirectedGraph {
+protected:
+ using NodeListTy = SmallVector<NodeType *, 10>;
+ using EdgeListTy = SmallVector<EdgeType *, 10>;
+public:
+ using iterator = typename NodeListTy::iterator;
+ using const_iterator = typename NodeListTy::const_iterator;
+ using DGraphType = DirectedGraph<NodeType, EdgeType>;
+
+ DirectedGraph() = default;
+ explicit DirectedGraph(NodeType &N) : Nodes() { addNode(N); }
+ DirectedGraph(const DGraphType &G) : Nodes(G.Nodes) {}
+ DirectedGraph(DGraphType &&RHS) : Nodes(std::move(RHS.Nodes)) {}
+ DGraphType &operator=(const DGraphType &G) {
+ Nodes = G.Nodes;
+ return *this;
+ }
+ DGraphType &operator=(const DGraphType &&G) {
+ Nodes = std::move(G.Nodes);
+ return *this;
+ }
+
+ const_iterator begin() const { return Nodes.begin(); }
+ const_iterator end() const { return Nodes.end(); }
+ iterator begin() { return Nodes.begin(); }
+ iterator end() { return Nodes.end(); }
+ const NodeType &front() const { return *Nodes.front(); }
+ NodeType &front() { return *Nodes.front(); }
+ const NodeType &back() const { return *Nodes.back(); }
+ NodeType &back() { return *Nodes.back(); }
+
+ size_t size() const { return Nodes.size(); }
+
+ /// Find the given node \p N in the table.
+ const_iterator findNode(const NodeType &N) const {
+ return llvm::find_if(Nodes,
+ [&N](const NodeType *Node) { return *Node == N; });
+ }
+ iterator findNode(const NodeType &N) {
+ return const_cast<iterator>(
+ static_cast<const DGraphType &>(*this).findNode(N));
+ }
+
+ /// Add the given node \p N to the graph if it is not already present.
+ bool addNode(NodeType &N) {
+ if (findNode(N) != Nodes.end())
+ return false;
+ Nodes.push_back(&N);
+ return true;
+ }
+
+ /// Collect in \p EL all edges that are coming into node \p N. Return true
+ /// if at least one edge was found, and false otherwise.
+ bool findIncomingEdgesToNode(const NodeType &N, SmallVectorImpl<EdgeType*> &EL) const {
+ assert(EL.empty() && "Expected the list of edges to be empty.");
+ EdgeListTy TempList;
+ for (auto *Node : Nodes) {
+ if (*Node == N)
+ continue;
+ Node->findEdgesTo(N, TempList);
+ EL.insert(EL.end(), TempList.begin(), TempList.end());
+ TempList.clear();
+ }
+ return !EL.empty();
+ }
+
+ /// Remove the given node \p N from the graph. If the node has incoming or
+ /// outgoing edges, they are also removed. Return true if the node was found
+ /// and then removed, and false if the node was not found in the graph to
+ /// begin with.
+ bool removeNode(NodeType &N) {
+ iterator IT = findNode(N);
+ if (IT == Nodes.end())
+ return false;
+ // Remove incoming edges.
+ EdgeListTy EL;
+ for (auto *Node : Nodes) {
+ if (*Node == N)
+ continue;
+ Node->findEdgesTo(N, EL);
+ for (auto *E : EL)
+ Node->removeEdge(*E);
+ EL.clear();
+ }
+ N.clear();
+ Nodes.erase(IT);
+ return true;
+ }
+
+ /// Assuming nodes \p Src and \p Dst are already in the graph, connect node \p
+ /// Src to node \p Dst using the provided edge \p E. Return true if \p Src is
+ /// not already connected to \p Dst via \p E, and false otherwise.
+ bool connect(NodeType &Src, NodeType &Dst, EdgeType &E) {
+ assert(findNode(Src) != Nodes.end() && "Src node should be present.");
+ assert(findNode(Dst) != Nodes.end() && "Dst node should be present.");
+ assert((E.getTargetNode() == Dst) &&
+ "Target of the given edge does not match Dst.");
+ return Src.addEdge(E);
+ }
+
+protected:
+ // The list of nodes in the graph.
+ NodeListTy Nodes;
+};
+
+} // namespace llvm
+
+#endif // LLVM_ADT_DIRECTEDGRAPH_H
diff --git a/include/llvm/ADT/Hashing.h b/include/llvm/ADT/Hashing.h
index 008188bfa210..b22606bdb518 100644
--- a/include/llvm/ADT/Hashing.h
+++ b/include/llvm/ADT/Hashing.h
@@ -45,7 +45,6 @@
#define LLVM_ADT_HASHING_H
#include "llvm/Support/DataTypes.h"
-#include "llvm/Support/Host.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/type_traits.h"
#include <algorithm>
diff --git a/include/llvm/ADT/IntervalMap.h b/include/llvm/ADT/IntervalMap.h
index 12828c4cfdab..a02876ee77f3 100644
--- a/include/llvm/ADT/IntervalMap.h
+++ b/include/llvm/ADT/IntervalMap.h
@@ -963,8 +963,8 @@ public:
private:
// The root data is either a RootLeaf or a RootBranchData instance.
- LLVM_ALIGNAS(RootLeaf) LLVM_ALIGNAS(RootBranchData)
- AlignedCharArrayUnion<RootLeaf, RootBranchData> data;
+ alignas(RootLeaf) alignas(RootBranchData)
+ AlignedCharArrayUnion<RootLeaf, RootBranchData> data;
// Tree height.
// 0: Leaves in root.
diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h
index 24a2bb67a36e..fa6bf1504469 100644
--- a/include/llvm/ADT/PointerIntPair.h
+++ b/include/llvm/ADT/PointerIntPair.h
@@ -13,6 +13,7 @@
#ifndef LLVM_ADT_POINTERINTPAIR_H
#define LLVM_ADT_POINTERINTPAIR_H
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
#include "llvm/Support/type_traits.h"
#include <cassert>
@@ -59,19 +60,19 @@ public:
IntType getInt() const { return (IntType)Info::getInt(Value); }
- void setPointer(PointerTy PtrVal) {
+ void setPointer(PointerTy PtrVal) LLVM_LVALUE_FUNCTION {
Value = Info::updatePointer(Value, PtrVal);
}
- void setInt(IntType IntVal) {
+ void setInt(IntType IntVal) LLVM_LVALUE_FUNCTION {
Value = Info::updateInt(Value, static_cast<intptr_t>(IntVal));
}
- void initWithPointer(PointerTy PtrVal) {
+ void initWithPointer(PointerTy PtrVal) LLVM_LVALUE_FUNCTION {
Value = Info::updatePointer(0, PtrVal);
}
- void setPointerAndInt(PointerTy PtrVal, IntType IntVal) {
+ void setPointerAndInt(PointerTy PtrVal, IntType IntVal) LLVM_LVALUE_FUNCTION {
Value = Info::updateInt(Info::updatePointer(0, PtrVal),
static_cast<intptr_t>(IntVal));
}
@@ -89,7 +90,7 @@ public:
void *getOpaqueValue() const { return reinterpret_cast<void *>(Value); }
- void setFromOpaqueValue(void *Val) {
+ void setFromOpaqueValue(void *Val) LLVM_LVALUE_FUNCTION {
Value = reinterpret_cast<intptr_t>(Val);
}
diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h
index 2bcdf546c6e4..98c905775a77 100644
--- a/include/llvm/ADT/PointerUnion.h
+++ b/include/llvm/ADT/PointerUnion.h
@@ -54,21 +54,14 @@ struct PointerUnionTypeSelectorReturn<
};
namespace pointer_union_detail {
- constexpr int constexprMin(int a, int b) { return a < b ? a : b; }
/// Determine the number of bits required to store integers with values < n.
/// This is ceil(log2(n)).
constexpr int bitsRequired(unsigned n) {
return n > 1 ? 1 + bitsRequired((n + 1) / 2) : 0;
}
- // FIXME: In C++14, replace this with
- // std::min({PointerLikeTypeTraits<Ts>::NumLowBitsAvailable...})
- template <typename T> constexpr int lowBitsAvailable() {
- return PointerLikeTypeTraits<T>::NumLowBitsAvailable;
- }
- template <typename T1, typename T2, typename... Ts>
- constexpr int lowBitsAvailable() {
- return constexprMin(lowBitsAvailable<T1>(), lowBitsAvailable<T2, Ts...>());
+ template <typename... Ts> constexpr int lowBitsAvailable() {
+ return std::min<int>({PointerLikeTypeTraits<Ts>::NumLowBitsAvailable...});
}
/// Find the index of a type in a list of types. TypeIndex<T, Us...>::Index
@@ -167,10 +160,11 @@ class PointerUnion
void *, pointer_union_detail::bitsRequired(sizeof...(PTs)), int,
pointer_union_detail::PointerUnionUIntTraits<PTs...>>,
0, PTs...> {
- // The first type is special in some ways, but we don't want PointerUnion to
- // be a 'template <typename First, typename ...Rest>' because it's much more
- // convenient to have a name for the whole pack. So split off the first type
- // here.
+ // The first type is special because we want to directly cast a pointer to a
+ // default-initialized union to a pointer to the first type. But we don't
+ // want PointerUnion to be a 'template <typename First, typename ...Rest>'
+ // because it's much more convenient to have a name for the whole pack. So
+ // split off the first type here.
using First = typename pointer_union_detail::GetFirstType<PTs...>::type;
using Base = typename PointerUnion::PointerUnionMembers;
@@ -182,12 +176,7 @@ public:
/// Test if the pointer held in the union is null, regardless of
/// which type it is.
- bool isNull() const {
- // Convert from the void* to one of the pointer types, to make sure that
- // we recursively strip off low bits if we have a nested PointerUnion.
- return !PointerLikeTypeTraits<First>::getFromVoidPointer(
- this->Val.getPointer());
- }
+ bool isNull() const { return !this->Val.getPointer(); }
explicit operator bool() const { return !isNull(); }
@@ -226,7 +215,8 @@ public:
First *getAddrOfPtr1() {
assert(is<First>() && "Val is not the first pointer");
assert(
- get<First>() == this->Val.getPointer() &&
+ PointerLikeTypeTraits<First>::getAsVoidPointer(get<First>()) ==
+ this->Val.getPointer() &&
"Can't get the address because PointerLikeTypeTraits changes the ptr");
return const_cast<First *>(
reinterpret_cast<const First *>(this->Val.getAddrOfPointer()));
diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h
index 81dce0168c79..274933bc5204 100644
--- a/include/llvm/ADT/STLExtras.h
+++ b/include/llvm/ADT/STLExtras.h
@@ -95,18 +95,6 @@ template <class Ty> struct identity {
}
};
-template <class Ty> struct less_ptr {
- bool operator()(const Ty* left, const Ty* right) const {
- return *left < *right;
- }
-};
-
-template <class Ty> struct greater_ptr {
- bool operator()(const Ty* left, const Ty* right) const {
- return *right < *left;
- }
-};
-
/// An efficient, type-erasing, non-owning reference to a callable. This is
/// intended for use as the type of a function parameter that is not used
/// after the function in question returns.
@@ -530,10 +518,6 @@ bool all_of(R &&range, UnaryPredicate P);
template <typename R, typename UnaryPredicate>
bool any_of(R &&range, UnaryPredicate P);
-template <size_t... I> struct index_sequence;
-
-template <class... Ts> struct index_sequence_for;
-
namespace detail {
using std::declval;
@@ -568,38 +552,38 @@ struct zip_common : public zip_traits<ZipType, Iters...> {
std::tuple<Iters...> iterators;
protected:
- template <size_t... Ns> value_type deref(index_sequence<Ns...>) const {
+ template <size_t... Ns> value_type deref(std::index_sequence<Ns...>) const {
return value_type(*std::get<Ns>(iterators)...);
}
template <size_t... Ns>
- decltype(iterators) tup_inc(index_sequence<Ns...>) const {
+ decltype(iterators) tup_inc(std::index_sequence<Ns...>) const {
return std::tuple<Iters...>(std::next(std::get<Ns>(iterators))...);
}
template <size_t... Ns>
- decltype(iterators) tup_dec(index_sequence<Ns...>) const {
+ decltype(iterators) tup_dec(std::index_sequence<Ns...>) const {
return std::tuple<Iters...>(std::prev(std::get<Ns>(iterators))...);
}
public:
zip_common(Iters &&... ts) : iterators(std::forward<Iters>(ts)...) {}
- value_type operator*() { return deref(index_sequence_for<Iters...>{}); }
+ value_type operator*() { return deref(std::index_sequence_for<Iters...>{}); }
const value_type operator*() const {
- return deref(index_sequence_for<Iters...>{});
+ return deref(std::index_sequence_for<Iters...>{});
}
ZipType &operator++() {
- iterators = tup_inc(index_sequence_for<Iters...>{});
+ iterators = tup_inc(std::index_sequence_for<Iters...>{});
return *reinterpret_cast<ZipType *>(this);
}
ZipType &operator--() {
static_assert(Base::IsBidirectional,
"All inner iterators must be at least bidirectional.");
- iterators = tup_dec(index_sequence_for<Iters...>{});
+ iterators = tup_dec(std::index_sequence_for<Iters...>{});
return *reinterpret_cast<ZipType *>(this);
}
};
@@ -618,7 +602,8 @@ struct zip_first : public zip_common<zip_first<Iters...>, Iters...> {
template <typename... Iters>
class zip_shortest : public zip_common<zip_shortest<Iters...>, Iters...> {
template <size_t... Ns>
- bool test(const zip_shortest<Iters...> &other, index_sequence<Ns...>) const {
+ bool test(const zip_shortest<Iters...> &other,
+ std::index_sequence<Ns...>) const {
return all_of(std::initializer_list<bool>{std::get<Ns>(this->iterators) !=
std::get<Ns>(other.iterators)...},
identity<bool>{});
@@ -630,7 +615,7 @@ public:
zip_shortest(Iters &&... ts) : Base(std::forward<Iters>(ts)...) {}
bool operator==(const zip_shortest<Iters...> &other) const {
- return !test(other, index_sequence_for<Iters...>{});
+ return !test(other, std::index_sequence_for<Iters...>{});
}
};
@@ -646,18 +631,21 @@ public:
private:
std::tuple<Args...> ts;
- template <size_t... Ns> iterator begin_impl(index_sequence<Ns...>) const {
+ template <size_t... Ns>
+ iterator begin_impl(std::index_sequence<Ns...>) const {
return iterator(std::begin(std::get<Ns>(ts))...);
}
- template <size_t... Ns> iterator end_impl(index_sequence<Ns...>) const {
+ template <size_t... Ns> iterator end_impl(std::index_sequence<Ns...>) const {
return iterator(std::end(std::get<Ns>(ts))...);
}
public:
zippy(Args &&... ts_) : ts(std::forward<Args>(ts_)...) {}
- iterator begin() const { return begin_impl(index_sequence_for<Args...>{}); }
- iterator end() const { return end_impl(index_sequence_for<Args...>{}); }
+ iterator begin() const {
+ return begin_impl(std::index_sequence_for<Args...>{});
+ }
+ iterator end() const { return end_impl(std::index_sequence_for<Args...>{}); }
};
} // end namespace detail
@@ -727,20 +715,20 @@ private:
template <size_t... Ns>
bool test(const zip_longest_iterator<Iters...> &other,
- index_sequence<Ns...>) const {
+ std::index_sequence<Ns...>) const {
return llvm::any_of(
std::initializer_list<bool>{std::get<Ns>(this->iterators) !=
std::get<Ns>(other.iterators)...},
identity<bool>{});
}
- template <size_t... Ns> value_type deref(index_sequence<Ns...>) const {
+ template <size_t... Ns> value_type deref(std::index_sequence<Ns...>) const {
return value_type(
deref_or_none(std::get<Ns>(iterators), std::get<Ns>(end_iterators))...);
}
template <size_t... Ns>
- decltype(iterators) tup_inc(index_sequence<Ns...>) const {
+ decltype(iterators) tup_inc(std::index_sequence<Ns...>) const {
return std::tuple<Iters...>(
next_or_end(std::get<Ns>(iterators), std::get<Ns>(end_iterators))...);
}
@@ -750,17 +738,19 @@ public:
: iterators(std::forward<Iters>(ts.first)...),
end_iterators(std::forward<Iters>(ts.second)...) {}
- value_type operator*() { return deref(index_sequence_for<Iters...>{}); }
+ value_type operator*() { return deref(std::index_sequence_for<Iters...>{}); }
- value_type operator*() const { return deref(index_sequence_for<Iters...>{}); }
+ value_type operator*() const {
+ return deref(std::index_sequence_for<Iters...>{});
+ }
zip_longest_iterator<Iters...> &operator++() {
- iterators = tup_inc(index_sequence_for<Iters...>{});
+ iterators = tup_inc(std::index_sequence_for<Iters...>{});
return *this;
}
bool operator==(const zip_longest_iterator<Iters...> &other) const {
- return !test(other, index_sequence_for<Iters...>{});
+ return !test(other, std::index_sequence_for<Iters...>{});
}
};
@@ -777,12 +767,13 @@ public:
private:
std::tuple<Args...> ts;
- template <size_t... Ns> iterator begin_impl(index_sequence<Ns...>) const {
+ template <size_t... Ns>
+ iterator begin_impl(std::index_sequence<Ns...>) const {
return iterator(std::make_pair(adl_begin(std::get<Ns>(ts)),
adl_end(std::get<Ns>(ts)))...);
}
- template <size_t... Ns> iterator end_impl(index_sequence<Ns...>) const {
+ template <size_t... Ns> iterator end_impl(std::index_sequence<Ns...>) const {
return iterator(std::make_pair(adl_end(std::get<Ns>(ts)),
adl_end(std::get<Ns>(ts)))...);
}
@@ -790,8 +781,10 @@ private:
public:
zip_longest_range(Args &&... ts_) : ts(std::forward<Args>(ts_)...) {}
- iterator begin() const { return begin_impl(index_sequence_for<Args...>{}); }
- iterator end() const { return end_impl(index_sequence_for<Args...>{}); }
+ iterator begin() const {
+ return begin_impl(std::index_sequence_for<Args...>{});
+ }
+ iterator end() const { return end_impl(std::index_sequence_for<Args...>{}); }
};
} // namespace detail
@@ -847,7 +840,7 @@ class concat_iterator
/// Increments the first non-end iterator.
///
/// It is an error to call this with all iterators at the end.
- template <size_t... Ns> void increment(index_sequence<Ns...>) {
+ template <size_t... Ns> void increment(std::index_sequence<Ns...>) {
// Build a sequence of functions to increment each iterator if possible.
bool (concat_iterator::*IncrementHelperFns[])() = {
&concat_iterator::incrementHelper<Ns>...};
@@ -876,7 +869,7 @@ class concat_iterator
/// reference.
///
/// It is an error to call this with all iterators at the end.
- template <size_t... Ns> ValueT &get(index_sequence<Ns...>) const {
+ template <size_t... Ns> ValueT &get(std::index_sequence<Ns...>) const {
// Build a sequence of functions to get from iterator if possible.
ValueT *(concat_iterator::*GetHelperFns[])() const = {
&concat_iterator::getHelper<Ns>...};
@@ -901,11 +894,13 @@ public:
using BaseT::operator++;
concat_iterator &operator++() {
- increment(index_sequence_for<IterTs...>());
+ increment(std::index_sequence_for<IterTs...>());
return *this;
}
- ValueT &operator*() const { return get(index_sequence_for<IterTs...>()); }
+ ValueT &operator*() const {
+ return get(std::index_sequence_for<IterTs...>());
+ }
bool operator==(const concat_iterator &RHS) const {
return Begins == RHS.Begins && Ends == RHS.Ends;
@@ -928,10 +923,10 @@ public:
private:
std::tuple<RangeTs...> Ranges;
- template <size_t... Ns> iterator begin_impl(index_sequence<Ns...>) {
+ template <size_t... Ns> iterator begin_impl(std::index_sequence<Ns...>) {
return iterator(std::get<Ns>(Ranges)...);
}
- template <size_t... Ns> iterator end_impl(index_sequence<Ns...>) {
+ template <size_t... Ns> iterator end_impl(std::index_sequence<Ns...>) {
return iterator(make_range(std::end(std::get<Ns>(Ranges)),
std::end(std::get<Ns>(Ranges)))...);
}
@@ -940,8 +935,8 @@ public:
concat_range(RangeTs &&... Ranges)
: Ranges(std::forward<RangeTs>(Ranges)...) {}
- iterator begin() { return begin_impl(index_sequence_for<RangeTs...>{}); }
- iterator end() { return end_impl(index_sequence_for<RangeTs...>{}); }
+ iterator begin() { return begin_impl(std::index_sequence_for<RangeTs...>{}); }
+ iterator end() { return end_impl(std::index_sequence_for<RangeTs...>{}); }
};
} // end namespace detail
@@ -990,28 +985,6 @@ struct on_first {
}
};
-// A subset of N3658. More stuff can be added as-needed.
-
-/// Represents a compile-time sequence of integers.
-template <class T, T... I> struct integer_sequence {
- using value_type = T;
-
- static constexpr size_t size() { return sizeof...(I); }
-};
-
-/// Alias for the common case of a sequence of size_ts.
-template <size_t... I>
-struct index_sequence : integer_sequence<std::size_t, I...> {};
-
-template <std::size_t N, std::size_t... I>
-struct build_index_impl : build_index_impl<N - 1, N - 1, I...> {};
-template <std::size_t... I>
-struct build_index_impl<0, I...> : index_sequence<I...> {};
-
-/// Creates a compile-time integer sequence for a parameter pack.
-template <class... Ts>
-struct index_sequence_for : build_index_impl<sizeof...(Ts)> {};
-
/// Utility type to build an inheritance chain that makes it easy to rank
/// overload candidates.
template <int N> struct rank : rank<N - 1> {};
@@ -1391,41 +1364,6 @@ void replace(Container &Cont, typename Container::iterator ContIt,
// Extra additions to <memory>
//===----------------------------------------------------------------------===//
-// Implement make_unique according to N3656.
-
-/// Constructs a `new T()` with the given args and returns a
-/// `unique_ptr<T>` which owns the object.
-///
-/// Example:
-///
-/// auto p = make_unique<int>();
-/// auto p = make_unique<std::tuple<int, int>>(0, 1);
-template <class T, class... Args>
-typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
-make_unique(Args &&... args) {
- return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
-}
-
-/// Constructs a `new T[n]` with the given args and returns a
-/// `unique_ptr<T[]>` which owns the object.
-///
-/// \param n size of the new array.
-///
-/// Example:
-///
-/// auto p = make_unique<int[]>(2); // value-initializes the array with 0's.
-template <class T>
-typename std::enable_if<std::is_array<T>::value && std::extent<T>::value == 0,
- std::unique_ptr<T>>::type
-make_unique(size_t n) {
- return std::unique_ptr<T>(new typename std::remove_extent<T>::type[n]());
-}
-
-/// This function isn't used and is only here to provide better compile errors.
-template <class T, class... Args>
-typename std::enable_if<std::extent<T>::value != 0>::type
-make_unique(Args &&...) = delete;
-
struct FreeDeleter {
void operator()(void* v) {
::free(v);
@@ -1439,20 +1377,6 @@ struct pair_hash {
}
};
-/// A functor like C++14's std::less<void> in its absence.
-struct less {
- template <typename A, typename B> bool operator()(A &&a, B &&b) const {
- return std::forward<A>(a) < std::forward<B>(b);
- }
-};
-
-/// A functor like C++14's std::equal<void> in its absence.
-struct equal {
- template <typename A, typename B> bool operator()(A &&a, B &&b) const {
- return std::forward<A>(a) == std::forward<B>(b);
- }
-};
-
/// Binary functor that adapts to any other binary functor after dereferencing
/// operands.
template <typename T> struct deref {
@@ -1580,7 +1504,7 @@ template <typename R> detail::enumerator<R> enumerate(R &&TheRange) {
namespace detail {
template <typename F, typename Tuple, std::size_t... I>
-auto apply_tuple_impl(F &&f, Tuple &&t, index_sequence<I...>)
+auto apply_tuple_impl(F &&f, Tuple &&t, std::index_sequence<I...>)
-> decltype(std::forward<F>(f)(std::get<I>(std::forward<Tuple>(t))...)) {
return std::forward<F>(f)(std::get<I>(std::forward<Tuple>(t))...);
}
@@ -1593,9 +1517,9 @@ auto apply_tuple_impl(F &&f, Tuple &&t, index_sequence<I...>)
template <typename F, typename Tuple>
auto apply_tuple(F &&f, Tuple &&t) -> decltype(detail::apply_tuple_impl(
std::forward<F>(f), std::forward<Tuple>(t),
- build_index_impl<
+ std::make_index_sequence<
std::tuple_size<typename std::decay<Tuple>::type>::value>{})) {
- using Indices = build_index_impl<
+ using Indices = std::make_index_sequence<
std::tuple_size<typename std::decay<Tuple>::type>::value>;
return detail::apply_tuple_impl(std::forward<F>(f), std::forward<Tuple>(t),
diff --git a/include/llvm/ADT/SmallBitVector.h b/include/llvm/ADT/SmallBitVector.h
index 742450e6a951..61375c008022 100644
--- a/include/llvm/ADT/SmallBitVector.h
+++ b/include/llvm/ADT/SmallBitVector.h
@@ -290,7 +290,7 @@ public:
++Prev;
uintptr_t Bits = getSmallBits();
// Mask in previous bits.
- uintptr_t Mask = (1 << Prev) - 1;
+ uintptr_t Mask = (uintptr_t(1) << Prev) - 1;
Bits |= Mask;
if (Bits == ~uintptr_t(0) || Prev + 1 >= getSmallSize())
diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h
index 2ac59da596ef..b7387ddcf1c7 100644
--- a/include/llvm/ADT/Statistic.h
+++ b/include/llvm/ADT/Statistic.h
@@ -44,38 +44,39 @@ class raw_ostream;
class raw_fd_ostream;
class StringRef;
-class Statistic {
+class StatisticBase {
public:
const char *DebugType;
const char *Name;
const char *Desc;
- std::atomic<unsigned> Value;
- std::atomic<bool> Initialized;
- unsigned getValue() const { return Value.load(std::memory_order_relaxed); }
+ StatisticBase(const char *DebugType, const char *Name, const char *Desc)
+ : DebugType(DebugType), Name(Name), Desc(Desc) {}
+
const char *getDebugType() const { return DebugType; }
const char *getName() const { return Name; }
const char *getDesc() const { return Desc; }
+};
- /// construct - This should only be called for non-global statistics.
- void construct(const char *debugtype, const char *name, const char *desc) {
- DebugType = debugtype;
- Name = name;
- Desc = desc;
- Value = 0;
- Initialized = false;
- }
+class TrackingStatistic : public StatisticBase {
+public:
+ std::atomic<unsigned> Value;
+ std::atomic<bool> Initialized;
+
+ TrackingStatistic(const char *DebugType, const char *Name, const char *Desc)
+ : StatisticBase(DebugType, Name, Desc), Value(0), Initialized(false) {}
+
+ unsigned getValue() const { return Value.load(std::memory_order_relaxed); }
// Allow use of this class as the value itself.
operator unsigned() const { return getValue(); }
-#if LLVM_ENABLE_STATS
- const Statistic &operator=(unsigned Val) {
+ const TrackingStatistic &operator=(unsigned Val) {
Value.store(Val, std::memory_order_relaxed);
return init();
}
- const Statistic &operator++() {
+ const TrackingStatistic &operator++() {
Value.fetch_add(1, std::memory_order_relaxed);
return init();
}
@@ -85,7 +86,7 @@ public:
return Value.fetch_add(1, std::memory_order_relaxed);
}
- const Statistic &operator--() {
+ const TrackingStatistic &operator--() {
Value.fetch_sub(1, std::memory_order_relaxed);
return init();
}
@@ -95,14 +96,14 @@ public:
return Value.fetch_sub(1, std::memory_order_relaxed);
}
- const Statistic &operator+=(unsigned V) {
+ const TrackingStatistic &operator+=(unsigned V) {
if (V == 0)
return *this;
Value.fetch_add(V, std::memory_order_relaxed);
return init();
}
- const Statistic &operator-=(unsigned V) {
+ const TrackingStatistic &operator-=(unsigned V) {
if (V == 0)
return *this;
Value.fetch_sub(V, std::memory_order_relaxed);
@@ -119,54 +120,57 @@ public:
init();
}
-#else // Statistics are disabled in release builds.
-
- const Statistic &operator=(unsigned Val) {
+protected:
+ TrackingStatistic &init() {
+ if (!Initialized.load(std::memory_order_acquire))
+ RegisterStatistic();
return *this;
}
- const Statistic &operator++() {
- return *this;
- }
+ void RegisterStatistic();
+};
- unsigned operator++(int) {
- return 0;
- }
+class NoopStatistic : public StatisticBase {
+public:
+ using StatisticBase::StatisticBase;
- const Statistic &operator--() {
- return *this;
- }
+ unsigned getValue() const { return 0; }
- unsigned operator--(int) {
- return 0;
- }
+ // Allow use of this class as the value itself.
+ operator unsigned() const { return 0; }
- const Statistic &operator+=(const unsigned &V) {
- return *this;
- }
+ const NoopStatistic &operator=(unsigned Val) { return *this; }
- const Statistic &operator-=(const unsigned &V) {
- return *this;
- }
+ const NoopStatistic &operator++() { return *this; }
- void updateMax(unsigned V) {}
+ unsigned operator++(int) { return 0; }
-#endif // LLVM_ENABLE_STATS
+ const NoopStatistic &operator--() { return *this; }
-protected:
- Statistic &init() {
- if (!Initialized.load(std::memory_order_acquire))
- RegisterStatistic();
- return *this;
- }
+ unsigned operator--(int) { return 0; }
- void RegisterStatistic();
+ const NoopStatistic &operator+=(const unsigned &V) { return *this; }
+
+ const NoopStatistic &operator-=(const unsigned &V) { return *this; }
+
+ void updateMax(unsigned V) {}
};
+#if LLVM_ENABLE_STATS
+using Statistic = TrackingStatistic;
+#else
+using Statistic = NoopStatistic;
+#endif
+
// STATISTIC - A macro to make definition of statistics really simple. This
// automatically passes the DEBUG_TYPE of the file into the statistic.
#define STATISTIC(VARNAME, DESC) \
- static llvm::Statistic VARNAME = {DEBUG_TYPE, #VARNAME, DESC, {0}, {false}}
+ static llvm::Statistic VARNAME = {DEBUG_TYPE, #VARNAME, DESC}
+
+// ALWAYS_ENABLED_STATISTIC - A macro to define a statistic like STATISTIC but
+// it is enabled even if LLVM_ENABLE_STATS is off.
+#define ALWAYS_ENABLED_STATISTIC(VARNAME, DESC) \
+ static llvm::TrackingStatistic VARNAME = {DEBUG_TYPE, #VARNAME, DESC}
/// Enable the collection and printing of statistics.
void EnableStatistics(bool PrintOnExit = true);
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h
index 16ac90bd6c89..ef1a11e0619b 100644
--- a/include/llvm/ADT/StringExtras.h
+++ b/include/llvm/ADT/StringExtras.h
@@ -345,7 +345,7 @@ inline void join_items_impl(std::string &Result, Sep Separator, const Arg1 &A1,
join_items_impl(Result, Separator, std::forward<Args>(Items)...);
}
-inline size_t join_one_item_size(char C) { return 1; }
+inline size_t join_one_item_size(char) { return 1; }
inline size_t join_one_item_size(const char *S) { return S ? ::strlen(S) : 0; }
template <typename T> inline size_t join_one_item_size(const T &Str) {
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h
index 8a586fc26709..108185bd07b9 100644
--- a/include/llvm/ADT/StringMap.h
+++ b/include/llvm/ADT/StringMap.h
@@ -118,36 +118,59 @@ public:
}
};
-/// StringMapEntry - This is used to represent one value that is inserted into
-/// a StringMap. It contains the Value itself and the key: the string length
-/// and data.
+/// StringMapEntryStorage - Holds the value in a StringMapEntry.
+///
+/// Factored out into a separate base class to make it easier to specialize.
+/// This is primarily intended to support StringSet, which doesn't need a value
+/// stored at all.
template<typename ValueTy>
-class StringMapEntry : public StringMapEntryBase {
+class StringMapEntryStorage : public StringMapEntryBase {
public:
ValueTy second;
- explicit StringMapEntry(size_t strLen)
+ explicit StringMapEntryStorage(size_t strLen)
: StringMapEntryBase(strLen), second() {}
template <typename... InitTy>
- StringMapEntry(size_t strLen, InitTy &&... InitVals)
+ StringMapEntryStorage(size_t strLen, InitTy &&... InitVals)
: StringMapEntryBase(strLen), second(std::forward<InitTy>(InitVals)...) {}
- StringMapEntry(StringMapEntry &E) = delete;
-
- StringRef getKey() const {
- return StringRef(getKeyData(), getKeyLength());
- }
+ StringMapEntryStorage(StringMapEntryStorage &E) = delete;
const ValueTy &getValue() const { return second; }
ValueTy &getValue() { return second; }
void setValue(const ValueTy &V) { second = V; }
+};
+
+template<>
+class StringMapEntryStorage<NoneType> : public StringMapEntryBase {
+public:
+ explicit StringMapEntryStorage(size_t strLen, NoneType none = None)
+ : StringMapEntryBase(strLen) {}
+ StringMapEntryStorage(StringMapEntryStorage &E) = delete;
+
+ NoneType getValue() const { return None; }
+};
+
+/// StringMapEntry - This is used to represent one value that is inserted into
+/// a StringMap. It contains the Value itself and the key: the string length
+/// and data.
+template<typename ValueTy>
+class StringMapEntry final : public StringMapEntryStorage<ValueTy> {
+public:
+ using StringMapEntryStorage<ValueTy>::StringMapEntryStorage;
+
+ StringRef getKey() const {
+ return StringRef(getKeyData(), this->getKeyLength());
+ }
/// getKeyData - Return the start of the string data that is the key for this
/// value. The string data is always stored immediately after the
/// StringMapEntry object.
const char *getKeyData() const {return reinterpret_cast<const char*>(this+1);}
- StringRef first() const { return StringRef(getKeyData(), getKeyLength()); }
+ StringRef first() const {
+ return StringRef(getKeyData(), this->getKeyLength());
+ }
/// Create a StringMapEntry for the specified key construct the value using
/// \p InitiVals.
@@ -199,7 +222,7 @@ public:
template<typename AllocatorTy>
void Destroy(AllocatorTy &Allocator) {
// Free memory referenced by the item.
- size_t AllocSize = sizeof(StringMapEntry) + getKeyLength() + 1;
+ size_t AllocSize = sizeof(StringMapEntry) + this->getKeyLength() + 1;
this->~StringMapEntry();
Allocator.Deallocate(static_cast<void *>(this), AllocSize);
}
@@ -391,6 +414,16 @@ public:
return try_emplace(KV.first, std::move(KV.second));
}
+ /// Inserts an element or assigns to the current element if the key already
+ /// exists. The return type is the same as try_emplace.
+ template <typename V>
+ std::pair<iterator, bool> insert_or_assign(StringRef Key, V &&Val) {
+ auto Ret = try_emplace(Key, std::forward<V>(Val));
+ if (!Ret.second)
+ Ret.first->second = std::forward<V>(Val);
+ return Ret;
+ }
+
/// Emplace a new element for the specified key into the map if the key isn't
/// already in the map. The bool component of the returned pair is true
/// if and only if the insertion takes place, and the iterator component of
diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h
index 4661b1e68b2f..52baab17bede 100644
--- a/include/llvm/ADT/StringRef.h
+++ b/include/llvm/ADT/StringRef.h
@@ -67,6 +67,20 @@ namespace llvm {
return ::memcmp(Lhs,Rhs,Length);
}
+ // Constexpr version of std::strlen.
+ static constexpr size_t strLen(const char *Str) {
+#if __cplusplus > 201402L
+ return std::char_traits<char>::length(Str);
+#elif __has_builtin(__builtin_strlen) || defined(__GNUC__)
+ return __builtin_strlen(Str);
+#else
+ const char *Begin = Str;
+ while (*Str != '\0')
+ ++Str;
+ return Str - Begin;
+#endif
+ }
+
public:
/// @name Constructors
/// @{
@@ -79,8 +93,8 @@ namespace llvm {
StringRef(std::nullptr_t) = delete;
/// Construct a string ref from a cstring.
- /*implicit*/ StringRef(const char *Str)
- : Data(Str), Length(Str ? ::strlen(Str) : 0) {}
+ /*implicit*/ constexpr StringRef(const char *Str)
+ : Data(Str), Length(Str ? strLen(Str) : 0) {}
/// Construct a string ref from a pointer and length.
/*implicit*/ constexpr StringRef(const char *data, size_t length)
diff --git a/include/llvm/ADT/StringSet.h b/include/llvm/ADT/StringSet.h
index af3a44a7b32c..60be09d3c326 100644
--- a/include/llvm/ADT/StringSet.h
+++ b/include/llvm/ADT/StringSet.h
@@ -24,8 +24,8 @@ namespace llvm {
/// StringSet - A wrapper for StringMap that provides set-like functionality.
template <class AllocatorTy = MallocAllocator>
- class StringSet : public StringMap<char, AllocatorTy> {
- using base = StringMap<char, AllocatorTy>;
+ class StringSet : public StringMap<NoneType, AllocatorTy> {
+ using base = StringMap<NoneType, AllocatorTy>;
public:
StringSet() = default;
@@ -37,13 +37,13 @@ namespace llvm {
std::pair<typename base::iterator, bool> insert(StringRef Key) {
assert(!Key.empty());
- return base::insert(std::make_pair(Key, '\0'));
+ return base::insert(std::make_pair(Key, None));
}
template <typename InputIt>
void insert(const InputIt &Begin, const InputIt &End) {
for (auto It = Begin; It != End; ++It)
- base::insert(std::make_pair(*It, '\0'));
+ base::insert(std::make_pair(*It, None));
}
template <typename ValueTy>
diff --git a/include/llvm/ADT/TinyPtrVector.h b/include/llvm/ADT/TinyPtrVector.h
index ac82451a9b21..6b76d35d4e92 100644
--- a/include/llvm/ADT/TinyPtrVector.h
+++ b/include/llvm/ADT/TinyPtrVector.h
@@ -31,6 +31,10 @@ class TinyPtrVector {
public:
using VecTy = SmallVector<EltTy, 4>;
using value_type = typename VecTy::value_type;
+ // EltTy must be the first pointer type so that is<EltTy> is true for the
+ // default-constructed PtrUnion. This allows an empty TinyPtrVector to
+ // naturally vend a begin/end iterator of type EltTy* without an additional
+ // check for the empty state.
using PtrUnion = PointerUnion<EltTy, VecTy *>;
private:
@@ -96,14 +100,14 @@ public:
if (RHS.Val.template is<EltTy>()) {
V->clear();
V->push_back(RHS.front());
- RHS.Val = (EltTy)nullptr;
+ RHS.Val = EltTy();
return *this;
}
delete V;
}
Val = RHS.Val;
- RHS.Val = (EltTy)nullptr;
+ RHS.Val = EltTy();
return *this;
}
@@ -213,9 +217,9 @@ public:
EltTy operator[](unsigned i) const {
assert(!Val.isNull() && "can't index into an empty vector");
- if (EltTy V = Val.template dyn_cast<EltTy>()) {
+ if (Val.template is<EltTy>()) {
assert(i == 0 && "tinyvector index out of range");
- return V;
+ return Val.template get<EltTy>();
}
assert(i < Val.template get<VecTy*>()->size() &&
@@ -225,29 +229,29 @@ public:
EltTy front() const {
assert(!empty() && "vector empty");
- if (EltTy V = Val.template dyn_cast<EltTy>())
- return V;
+ if (Val.template is<EltTy>())
+ return Val.template get<EltTy>();
return Val.template get<VecTy*>()->front();
}
EltTy back() const {
assert(!empty() && "vector empty");
- if (EltTy V = Val.template dyn_cast<EltTy>())
- return V;
+ if (Val.template is<EltTy>())
+ return Val.template get<EltTy>();
return Val.template get<VecTy*>()->back();
}
void push_back(EltTy NewVal) {
- assert(NewVal && "Can't add a null value");
-
// If we have nothing, add something.
if (Val.isNull()) {
Val = NewVal;
+ assert(!Val.isNull() && "Can't add a null value");
return;
}
// If we have a single value, convert to a vector.
- if (EltTy V = Val.template dyn_cast<EltTy>()) {
+ if (Val.template is<EltTy>()) {
+ EltTy V = Val.template get<EltTy>();
Val = new VecTy();
Val.template get<VecTy*>()->push_back(V);
}
@@ -267,7 +271,7 @@ public:
void clear() {
// If we have a single value, convert to empty.
if (Val.template is<EltTy>()) {
- Val = (EltTy)nullptr;
+ Val = EltTy();
} else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
// If we have a vector form, just clear it.
Vec->clear();
@@ -282,7 +286,7 @@ public:
// If we have a single value, convert to empty.
if (Val.template is<EltTy>()) {
if (I == begin())
- Val = (EltTy)nullptr;
+ Val = EltTy();
} else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
// multiple items in a vector; just do the erase, there is no
// benefit to collapsing back to a pointer
@@ -298,7 +302,7 @@ public:
if (Val.template is<EltTy>()) {
if (S == begin() && S != E)
- Val = (EltTy)nullptr;
+ Val = EltTy();
} else if (VecTy *Vec = Val.template dyn_cast<VecTy*>()) {
return Vec->erase(S, E);
}
@@ -313,7 +317,8 @@ public:
return std::prev(end());
}
assert(!Val.isNull() && "Null value with non-end insert iterator.");
- if (EltTy V = Val.template dyn_cast<EltTy>()) {
+ if (Val.template is<EltTy>()) {
+ EltTy V = Val.template get<EltTy>();
assert(I == begin());
Val = Elt;
push_back(V);
@@ -339,7 +344,8 @@ public:
}
Val = new VecTy();
- } else if (EltTy V = Val.template dyn_cast<EltTy>()) {
+ } else if (Val.template is<EltTy>()) {
+ EltTy V = Val.template get<EltTy>();
Val = new VecTy();
Val.template get<VecTy*>()->push_back(V);
}
diff --git a/include/llvm/ADT/VariadicFunction.h b/include/llvm/ADT/VariadicFunction.h
deleted file mode 100644
index 5aefb05ecdda..000000000000
--- a/include/llvm/ADT/VariadicFunction.h
+++ /dev/null
@@ -1,330 +0,0 @@
-//===- VariadicFunction.h - Variadic Functions ------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements compile-time type-safe variadic functions.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ADT_VARIADICFUNCTION_H
-#define LLVM_ADT_VARIADICFUNCTION_H
-
-#include "llvm/ADT/ArrayRef.h"
-
-namespace llvm {
-
-// Define macros to aid in expanding a comma separated series with the index of
-// the series pasted onto the last token.
-#define LLVM_COMMA_JOIN1(x) x ## 0
-#define LLVM_COMMA_JOIN2(x) LLVM_COMMA_JOIN1(x), x ## 1
-#define LLVM_COMMA_JOIN3(x) LLVM_COMMA_JOIN2(x), x ## 2
-#define LLVM_COMMA_JOIN4(x) LLVM_COMMA_JOIN3(x), x ## 3
-#define LLVM_COMMA_JOIN5(x) LLVM_COMMA_JOIN4(x), x ## 4
-#define LLVM_COMMA_JOIN6(x) LLVM_COMMA_JOIN5(x), x ## 5
-#define LLVM_COMMA_JOIN7(x) LLVM_COMMA_JOIN6(x), x ## 6
-#define LLVM_COMMA_JOIN8(x) LLVM_COMMA_JOIN7(x), x ## 7
-#define LLVM_COMMA_JOIN9(x) LLVM_COMMA_JOIN8(x), x ## 8
-#define LLVM_COMMA_JOIN10(x) LLVM_COMMA_JOIN9(x), x ## 9
-#define LLVM_COMMA_JOIN11(x) LLVM_COMMA_JOIN10(x), x ## 10
-#define LLVM_COMMA_JOIN12(x) LLVM_COMMA_JOIN11(x), x ## 11
-#define LLVM_COMMA_JOIN13(x) LLVM_COMMA_JOIN12(x), x ## 12
-#define LLVM_COMMA_JOIN14(x) LLVM_COMMA_JOIN13(x), x ## 13
-#define LLVM_COMMA_JOIN15(x) LLVM_COMMA_JOIN14(x), x ## 14
-#define LLVM_COMMA_JOIN16(x) LLVM_COMMA_JOIN15(x), x ## 15
-#define LLVM_COMMA_JOIN17(x) LLVM_COMMA_JOIN16(x), x ## 16
-#define LLVM_COMMA_JOIN18(x) LLVM_COMMA_JOIN17(x), x ## 17
-#define LLVM_COMMA_JOIN19(x) LLVM_COMMA_JOIN18(x), x ## 18
-#define LLVM_COMMA_JOIN20(x) LLVM_COMMA_JOIN19(x), x ## 19
-#define LLVM_COMMA_JOIN21(x) LLVM_COMMA_JOIN20(x), x ## 20
-#define LLVM_COMMA_JOIN22(x) LLVM_COMMA_JOIN21(x), x ## 21
-#define LLVM_COMMA_JOIN23(x) LLVM_COMMA_JOIN22(x), x ## 22
-#define LLVM_COMMA_JOIN24(x) LLVM_COMMA_JOIN23(x), x ## 23
-#define LLVM_COMMA_JOIN25(x) LLVM_COMMA_JOIN24(x), x ## 24
-#define LLVM_COMMA_JOIN26(x) LLVM_COMMA_JOIN25(x), x ## 25
-#define LLVM_COMMA_JOIN27(x) LLVM_COMMA_JOIN26(x), x ## 26
-#define LLVM_COMMA_JOIN28(x) LLVM_COMMA_JOIN27(x), x ## 27
-#define LLVM_COMMA_JOIN29(x) LLVM_COMMA_JOIN28(x), x ## 28
-#define LLVM_COMMA_JOIN30(x) LLVM_COMMA_JOIN29(x), x ## 29
-#define LLVM_COMMA_JOIN31(x) LLVM_COMMA_JOIN30(x), x ## 30
-#define LLVM_COMMA_JOIN32(x) LLVM_COMMA_JOIN31(x), x ## 31
-
-/// Class which can simulate a type-safe variadic function.
-///
-/// The VariadicFunction class template makes it easy to define
-/// type-safe variadic functions where all arguments have the same
-/// type.
-///
-/// Suppose we need a variadic function like this:
-///
-/// ResultT Foo(const ArgT &A_0, const ArgT &A_1, ..., const ArgT &A_N);
-///
-/// Instead of many overloads of Foo(), we only need to define a helper
-/// function that takes an array of arguments:
-///
-/// ResultT FooImpl(ArrayRef<const ArgT *> Args) {
-/// // 'Args[i]' is a pointer to the i-th argument passed to Foo().
-/// ...
-/// }
-///
-/// and then define Foo() like this:
-///
-/// const VariadicFunction<ResultT, ArgT, FooImpl> Foo;
-///
-/// VariadicFunction takes care of defining the overloads of Foo().
-///
-/// Actually, Foo is a function object (i.e. functor) instead of a plain
-/// function. This object is stateless and its constructor/destructor
-/// does nothing, so it's safe to create global objects and call Foo(...) at
-/// any time.
-///
-/// Sometimes we need a variadic function to have some fixed leading
-/// arguments whose types may be different from that of the optional
-/// arguments. For example:
-///
-/// bool FullMatch(const StringRef &S, const RE &Regex,
-/// const ArgT &A_0, ..., const ArgT &A_N);
-///
-/// VariadicFunctionN is for such cases, where N is the number of fixed
-/// arguments. It is like VariadicFunction, except that it takes N more
-/// template arguments for the types of the fixed arguments:
-///
-/// bool FullMatchImpl(const StringRef &S, const RE &Regex,
-/// ArrayRef<const ArgT *> Args) { ... }
-/// const VariadicFunction2<bool, const StringRef&,
-/// const RE&, ArgT, FullMatchImpl>
-/// FullMatch;
-///
-/// Currently VariadicFunction and friends support up-to 3
-/// fixed leading arguments and up-to 32 optional arguments.
-template <typename ResultT, typename ArgT,
- ResultT (*Func)(ArrayRef<const ArgT *>)>
-struct VariadicFunction {
- ResultT operator()() const {
- return Func(None);
- }
-
-#define LLVM_DEFINE_OVERLOAD(N) \
- ResultT operator()(LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
- const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
- return Func(makeArrayRef(Args)); \
- }
- LLVM_DEFINE_OVERLOAD(1)
- LLVM_DEFINE_OVERLOAD(2)
- LLVM_DEFINE_OVERLOAD(3)
- LLVM_DEFINE_OVERLOAD(4)
- LLVM_DEFINE_OVERLOAD(5)
- LLVM_DEFINE_OVERLOAD(6)
- LLVM_DEFINE_OVERLOAD(7)
- LLVM_DEFINE_OVERLOAD(8)
- LLVM_DEFINE_OVERLOAD(9)
- LLVM_DEFINE_OVERLOAD(10)
- LLVM_DEFINE_OVERLOAD(11)
- LLVM_DEFINE_OVERLOAD(12)
- LLVM_DEFINE_OVERLOAD(13)
- LLVM_DEFINE_OVERLOAD(14)
- LLVM_DEFINE_OVERLOAD(15)
- LLVM_DEFINE_OVERLOAD(16)
- LLVM_DEFINE_OVERLOAD(17)
- LLVM_DEFINE_OVERLOAD(18)
- LLVM_DEFINE_OVERLOAD(19)
- LLVM_DEFINE_OVERLOAD(20)
- LLVM_DEFINE_OVERLOAD(21)
- LLVM_DEFINE_OVERLOAD(22)
- LLVM_DEFINE_OVERLOAD(23)
- LLVM_DEFINE_OVERLOAD(24)
- LLVM_DEFINE_OVERLOAD(25)
- LLVM_DEFINE_OVERLOAD(26)
- LLVM_DEFINE_OVERLOAD(27)
- LLVM_DEFINE_OVERLOAD(28)
- LLVM_DEFINE_OVERLOAD(29)
- LLVM_DEFINE_OVERLOAD(30)
- LLVM_DEFINE_OVERLOAD(31)
- LLVM_DEFINE_OVERLOAD(32)
-#undef LLVM_DEFINE_OVERLOAD
-};
-
-template <typename ResultT, typename Param0T, typename ArgT,
- ResultT (*Func)(Param0T, ArrayRef<const ArgT *>)>
-struct VariadicFunction1 {
- ResultT operator()(Param0T P0) const {
- return Func(P0, None);
- }
-
-#define LLVM_DEFINE_OVERLOAD(N) \
- ResultT operator()(Param0T P0, LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
- const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
- return Func(P0, makeArrayRef(Args)); \
- }
- LLVM_DEFINE_OVERLOAD(1)
- LLVM_DEFINE_OVERLOAD(2)
- LLVM_DEFINE_OVERLOAD(3)
- LLVM_DEFINE_OVERLOAD(4)
- LLVM_DEFINE_OVERLOAD(5)
- LLVM_DEFINE_OVERLOAD(6)
- LLVM_DEFINE_OVERLOAD(7)
- LLVM_DEFINE_OVERLOAD(8)
- LLVM_DEFINE_OVERLOAD(9)
- LLVM_DEFINE_OVERLOAD(10)
- LLVM_DEFINE_OVERLOAD(11)
- LLVM_DEFINE_OVERLOAD(12)
- LLVM_DEFINE_OVERLOAD(13)
- LLVM_DEFINE_OVERLOAD(14)
- LLVM_DEFINE_OVERLOAD(15)
- LLVM_DEFINE_OVERLOAD(16)
- LLVM_DEFINE_OVERLOAD(17)
- LLVM_DEFINE_OVERLOAD(18)
- LLVM_DEFINE_OVERLOAD(19)
- LLVM_DEFINE_OVERLOAD(20)
- LLVM_DEFINE_OVERLOAD(21)
- LLVM_DEFINE_OVERLOAD(22)
- LLVM_DEFINE_OVERLOAD(23)
- LLVM_DEFINE_OVERLOAD(24)
- LLVM_DEFINE_OVERLOAD(25)
- LLVM_DEFINE_OVERLOAD(26)
- LLVM_DEFINE_OVERLOAD(27)
- LLVM_DEFINE_OVERLOAD(28)
- LLVM_DEFINE_OVERLOAD(29)
- LLVM_DEFINE_OVERLOAD(30)
- LLVM_DEFINE_OVERLOAD(31)
- LLVM_DEFINE_OVERLOAD(32)
-#undef LLVM_DEFINE_OVERLOAD
-};
-
-template <typename ResultT, typename Param0T, typename Param1T, typename ArgT,
- ResultT (*Func)(Param0T, Param1T, ArrayRef<const ArgT *>)>
-struct VariadicFunction2 {
- ResultT operator()(Param0T P0, Param1T P1) const {
- return Func(P0, P1, None);
- }
-
-#define LLVM_DEFINE_OVERLOAD(N) \
- ResultT operator()(Param0T P0, Param1T P1, \
- LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
- const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
- return Func(P0, P1, makeArrayRef(Args)); \
- }
- LLVM_DEFINE_OVERLOAD(1)
- LLVM_DEFINE_OVERLOAD(2)
- LLVM_DEFINE_OVERLOAD(3)
- LLVM_DEFINE_OVERLOAD(4)
- LLVM_DEFINE_OVERLOAD(5)
- LLVM_DEFINE_OVERLOAD(6)
- LLVM_DEFINE_OVERLOAD(7)
- LLVM_DEFINE_OVERLOAD(8)
- LLVM_DEFINE_OVERLOAD(9)
- LLVM_DEFINE_OVERLOAD(10)
- LLVM_DEFINE_OVERLOAD(11)
- LLVM_DEFINE_OVERLOAD(12)
- LLVM_DEFINE_OVERLOAD(13)
- LLVM_DEFINE_OVERLOAD(14)
- LLVM_DEFINE_OVERLOAD(15)
- LLVM_DEFINE_OVERLOAD(16)
- LLVM_DEFINE_OVERLOAD(17)
- LLVM_DEFINE_OVERLOAD(18)
- LLVM_DEFINE_OVERLOAD(19)
- LLVM_DEFINE_OVERLOAD(20)
- LLVM_DEFINE_OVERLOAD(21)
- LLVM_DEFINE_OVERLOAD(22)
- LLVM_DEFINE_OVERLOAD(23)
- LLVM_DEFINE_OVERLOAD(24)
- LLVM_DEFINE_OVERLOAD(25)
- LLVM_DEFINE_OVERLOAD(26)
- LLVM_DEFINE_OVERLOAD(27)
- LLVM_DEFINE_OVERLOAD(28)
- LLVM_DEFINE_OVERLOAD(29)
- LLVM_DEFINE_OVERLOAD(30)
- LLVM_DEFINE_OVERLOAD(31)
- LLVM_DEFINE_OVERLOAD(32)
-#undef LLVM_DEFINE_OVERLOAD
-};
-
-template <typename ResultT, typename Param0T, typename Param1T,
- typename Param2T, typename ArgT,
- ResultT (*Func)(Param0T, Param1T, Param2T, ArrayRef<const ArgT *>)>
-struct VariadicFunction3 {
- ResultT operator()(Param0T P0, Param1T P1, Param2T P2) const {
- return Func(P0, P1, P2, None);
- }
-
-#define LLVM_DEFINE_OVERLOAD(N) \
- ResultT operator()(Param0T P0, Param1T P1, Param2T P2, \
- LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \
- const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \
- return Func(P0, P1, P2, makeArrayRef(Args)); \
- }
- LLVM_DEFINE_OVERLOAD(1)
- LLVM_DEFINE_OVERLOAD(2)
- LLVM_DEFINE_OVERLOAD(3)
- LLVM_DEFINE_OVERLOAD(4)
- LLVM_DEFINE_OVERLOAD(5)
- LLVM_DEFINE_OVERLOAD(6)
- LLVM_DEFINE_OVERLOAD(7)
- LLVM_DEFINE_OVERLOAD(8)
- LLVM_DEFINE_OVERLOAD(9)
- LLVM_DEFINE_OVERLOAD(10)
- LLVM_DEFINE_OVERLOAD(11)
- LLVM_DEFINE_OVERLOAD(12)
- LLVM_DEFINE_OVERLOAD(13)
- LLVM_DEFINE_OVERLOAD(14)
- LLVM_DEFINE_OVERLOAD(15)
- LLVM_DEFINE_OVERLOAD(16)
- LLVM_DEFINE_OVERLOAD(17)
- LLVM_DEFINE_OVERLOAD(18)
- LLVM_DEFINE_OVERLOAD(19)
- LLVM_DEFINE_OVERLOAD(20)
- LLVM_DEFINE_OVERLOAD(21)
- LLVM_DEFINE_OVERLOAD(22)
- LLVM_DEFINE_OVERLOAD(23)
- LLVM_DEFINE_OVERLOAD(24)
- LLVM_DEFINE_OVERLOAD(25)
- LLVM_DEFINE_OVERLOAD(26)
- LLVM_DEFINE_OVERLOAD(27)
- LLVM_DEFINE_OVERLOAD(28)
- LLVM_DEFINE_OVERLOAD(29)
- LLVM_DEFINE_OVERLOAD(30)
- LLVM_DEFINE_OVERLOAD(31)
- LLVM_DEFINE_OVERLOAD(32)
-#undef LLVM_DEFINE_OVERLOAD
-};
-
-// Cleanup the macro namespace.
-#undef LLVM_COMMA_JOIN1
-#undef LLVM_COMMA_JOIN2
-#undef LLVM_COMMA_JOIN3
-#undef LLVM_COMMA_JOIN4
-#undef LLVM_COMMA_JOIN5
-#undef LLVM_COMMA_JOIN6
-#undef LLVM_COMMA_JOIN7
-#undef LLVM_COMMA_JOIN8
-#undef LLVM_COMMA_JOIN9
-#undef LLVM_COMMA_JOIN10
-#undef LLVM_COMMA_JOIN11
-#undef LLVM_COMMA_JOIN12
-#undef LLVM_COMMA_JOIN13
-#undef LLVM_COMMA_JOIN14
-#undef LLVM_COMMA_JOIN15
-#undef LLVM_COMMA_JOIN16
-#undef LLVM_COMMA_JOIN17
-#undef LLVM_COMMA_JOIN18
-#undef LLVM_COMMA_JOIN19
-#undef LLVM_COMMA_JOIN20
-#undef LLVM_COMMA_JOIN21
-#undef LLVM_COMMA_JOIN22
-#undef LLVM_COMMA_JOIN23
-#undef LLVM_COMMA_JOIN24
-#undef LLVM_COMMA_JOIN25
-#undef LLVM_COMMA_JOIN26
-#undef LLVM_COMMA_JOIN27
-#undef LLVM_COMMA_JOIN28
-#undef LLVM_COMMA_JOIN29
-#undef LLVM_COMMA_JOIN30
-#undef LLVM_COMMA_JOIN31
-#undef LLVM_COMMA_JOIN32
-
-} // end namespace llvm
-
-#endif // LLVM_ADT_VARIADICFUNCTION_H
diff --git a/include/llvm/ADT/iterator_range.h b/include/llvm/ADT/iterator_range.h
index 774c7c4e3366..aa8830943cab 100644
--- a/include/llvm/ADT/iterator_range.h
+++ b/include/llvm/ADT/iterator_range.h
@@ -44,6 +44,7 @@ public:
IteratorT begin() const { return begin_iterator; }
IteratorT end() const { return end_iterator; }
+ bool empty() const { return begin_iterator == end_iterator; }
};
/// Convenience function for iterating over sub-ranges.
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index 948341554f23..282142f51bb3 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -949,7 +949,7 @@ template <typename DerivedT> class AAResultBase {
/// A pointer to the AAResults object that this AAResult is
/// aggregated within. May be null if not aggregated.
- AAResults *AAR;
+ AAResults *AAR = nullptr;
/// Helper to dispatch calls back through the derived type.
DerivedT &derived() { return static_cast<DerivedT &>(*this); }
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h
index 34a509b7f4bb..187317e3831b 100644
--- a/include/llvm/Analysis/AliasSetTracker.h
+++ b/include/llvm/Analysis/AliasSetTracker.h
@@ -87,10 +87,11 @@ class AliasSet : public ilist_node<AliasSet> {
AAInfo = NewAAInfo;
else {
AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
- if (!Intersection) {
+ if (!Intersection.TBAA || !Intersection.Scope ||
+ !Intersection.NoAlias) {
// NewAAInfo conflicts with AAInfo.
AAInfo = DenseMapInfo<AAMDNodes>::getTombstoneKey();
- return SizeChanged;
+ SizeChanged = true;
}
AAInfo = Intersection;
}
diff --git a/include/llvm/Analysis/AssumptionCache.h b/include/llvm/Analysis/AssumptionCache.h
index b42846472f2e..0efbd59023d6 100644
--- a/include/llvm/Analysis/AssumptionCache.h
+++ b/include/llvm/Analysis/AssumptionCache.h
@@ -73,8 +73,8 @@ class AssumptionCache {
/// Get the vector of assumptions which affect a value from the cache.
SmallVector<WeakTrackingVH, 1> &getOrInsertAffectedValues(Value *V);
- /// Copy affected values in the cache for OV to be affected values for NV.
- void copyAffectedValuesInCache(Value *OV, Value *NV);
+ /// Move affected values in the cache for OV to be affected values for NV.
+ void transferAffectedValuesInCache(Value *OV, Value *NV);
/// Flag tracking whether we have scanned the function yet.
///
diff --git a/include/llvm/Analysis/CFG.h b/include/llvm/Analysis/CFG.h
index bb55e76ac86a..68f137ba622c 100644
--- a/include/llvm/Analysis/CFG.h
+++ b/include/llvm/Analysis/CFG.h
@@ -46,6 +46,8 @@ unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ);
///
bool isCriticalEdge(const Instruction *TI, unsigned SuccNum,
bool AllowIdenticalEdges = false);
+bool isCriticalEdge(const Instruction *TI, const BasicBlock *Succ,
+ bool AllowIdenticalEdges = false);
/// Determine whether instruction 'To' is reachable from 'From', without passing
/// through any blocks in ExclusionSet, returning true if uncertain.
diff --git a/include/llvm/Analysis/CFLAndersAliasAnalysis.h b/include/llvm/Analysis/CFLAndersAliasAnalysis.h
index 7c8b42b1d8d2..5f5e52af3d88 100644
--- a/include/llvm/Analysis/CFLAndersAliasAnalysis.h
+++ b/include/llvm/Analysis/CFLAndersAliasAnalysis.h
@@ -41,7 +41,8 @@ class CFLAndersAAResult : public AAResultBase<CFLAndersAAResult> {
class FunctionInfo;
public:
- explicit CFLAndersAAResult(const TargetLibraryInfo &TLI);
+ explicit CFLAndersAAResult(
+ std::function<const TargetLibraryInfo &(Function &F)> GetTLI);
CFLAndersAAResult(CFLAndersAAResult &&RHS);
~CFLAndersAAResult();
@@ -74,7 +75,7 @@ private:
/// Build summary for a given function
FunctionInfo buildInfoFrom(const Function &);
- const TargetLibraryInfo &TLI;
+ std::function<const TargetLibraryInfo &(Function &F)> GetTLI;
/// Cached mapping of Functions to their StratifiedSets.
/// If a function's sets are currently being built, it is marked
diff --git a/include/llvm/Analysis/CFLSteensAliasAnalysis.h b/include/llvm/Analysis/CFLSteensAliasAnalysis.h
index cc7a47cd9a5f..135321616b7c 100644
--- a/include/llvm/Analysis/CFLSteensAliasAnalysis.h
+++ b/include/llvm/Analysis/CFLSteensAliasAnalysis.h
@@ -42,7 +42,8 @@ class CFLSteensAAResult : public AAResultBase<CFLSteensAAResult> {
class FunctionInfo;
public:
- explicit CFLSteensAAResult(const TargetLibraryInfo &TLI);
+ explicit CFLSteensAAResult(
+ std::function<const TargetLibraryInfo &(Function &)> GetTLI);
CFLSteensAAResult(CFLSteensAAResult &&Arg);
~CFLSteensAAResult();
@@ -90,7 +91,7 @@ public:
}
private:
- const TargetLibraryInfo &TLI;
+ std::function<const TargetLibraryInfo &(Function &)> GetTLI;
/// Cached mapping of Functions to their StratifiedSets.
/// If a function's sets are currently being built, it is marked
diff --git a/include/llvm/Analysis/CGSCCPassManager.h b/include/llvm/Analysis/CGSCCPassManager.h
index 8af5fb86995a..933f2210dafc 100644
--- a/include/llvm/Analysis/CGSCCPassManager.h
+++ b/include/llvm/Analysis/CGSCCPassManager.h
@@ -88,6 +88,7 @@
#ifndef LLVM_ANALYSIS_CGSCCPASSMANAGER_H
#define LLVM_ANALYSIS_CGSCCPASSMANAGER_H
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/PriorityWorklist.h"
#include "llvm/ADT/STLExtras.h"
@@ -583,10 +584,12 @@ public:
SmallVectorImpl<WeakTrackingVH> &CallHandles) {
assert(CallHandles.empty() && "Must start with a clear set of handles.");
- SmallVector<CallCount, 4> CallCounts;
+ SmallDenseMap<Function *, CallCount> CallCounts;
+ CallCount CountLocal = {0, 0};
for (LazyCallGraph::Node &N : C) {
- CallCounts.push_back({0, 0});
- CallCount &Count = CallCounts.back();
+ CallCount &Count =
+ CallCounts.insert(std::make_pair(&N.getFunction(), CountLocal))
+ .first->second;
for (Instruction &I : instructions(N.getFunction()))
if (auto CS = CallSite(&I)) {
if (CS.getCalledFunction()) {
@@ -626,8 +629,6 @@ public:
// Check that we didn't miss any update scenario.
assert(!UR.InvalidatedSCCs.count(C) && "Processing an invalid SCC!");
assert(C->begin() != C->end() && "Cannot have an empty SCC!");
- assert((int)CallCounts.size() == C->size() &&
- "Cannot have changed the size of the SCC!");
// Check whether any of the handles were devirtualized.
auto IsDevirtualizedHandle = [&](WeakTrackingVH &CallH) {
@@ -642,7 +643,7 @@ public:
if (!F)
return false;
- LLVM_DEBUG(dbgs() << "Found devirutalized call from "
+ LLVM_DEBUG(dbgs() << "Found devirtualized call from "
<< CS.getParent()->getParent()->getName() << " to "
<< F->getName() << "\n");
@@ -664,12 +665,20 @@ public:
// manner of transformations such as DCE and other things, but seems to
// work well in practice.
if (!Devirt)
- for (int i = 0, Size = C->size(); i < Size; ++i)
- if (CallCounts[i].Indirect > NewCallCounts[i].Indirect &&
- CallCounts[i].Direct < NewCallCounts[i].Direct) {
- Devirt = true;
- break;
+ // Iterate over the keys in NewCallCounts, if Function also exists in
+ // CallCounts, make the check below.
+ for (auto &Pair : NewCallCounts) {
+ auto &CallCountNew = Pair.second;
+ auto CountIt = CallCounts.find(Pair.first);
+ if (CountIt != CallCounts.end()) {
+ const auto &CallCountOld = CountIt->second;
+ if (CallCountOld.Indirect > CallCountNew.Indirect &&
+ CallCountOld.Direct < CallCountNew.Direct) {
+ Devirt = true;
+ break;
+ }
}
+ }
if (!Devirt) {
PA.intersect(std::move(PassPA));
diff --git a/include/llvm/Analysis/CaptureTracking.h b/include/llvm/Analysis/CaptureTracking.h
index ca7abd34fea2..29921a51d5be 100644
--- a/include/llvm/Analysis/CaptureTracking.h
+++ b/include/llvm/Analysis/CaptureTracking.h
@@ -17,6 +17,7 @@ namespace llvm {
class Value;
class Use;
+ class DataLayout;
class Instruction;
class DominatorTree;
class OrderedBasicBlock;
@@ -83,6 +84,11 @@ namespace llvm {
/// use U. Return true to stop the traversal or false to continue looking
/// for more capturing instructions.
virtual bool captured(const Use *U) = 0;
+
+ /// isDereferenceableOrNull - Overload to allow clients with additional
+ /// knowledge about pointer dereferenceability to provide it and thereby
+ /// avoid conservative responses when a pointer is compared to null.
+ virtual bool isDereferenceableOrNull(Value *O, const DataLayout &DL);
};
/// PointerMayBeCaptured - Visit the value and the values derived from it and
diff --git a/include/llvm/Analysis/DDG.h b/include/llvm/Analysis/DDG.h
new file mode 100644
index 000000000000..0e1eb9d2cda3
--- /dev/null
+++ b/include/llvm/Analysis/DDG.h
@@ -0,0 +1,430 @@
+//===- llvm/Analysis/DDG.h --------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the Data-Dependence Graph (DDG).
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ANALYSIS_DDG_H
+#define LLVM_ANALYSIS_DDG_H
+
+#include "llvm/ADT/DirectedGraph.h"
+#include "llvm/Analysis/DependenceAnalysis.h"
+#include "llvm/Analysis/DependenceGraphBuilder.h"
+#include "llvm/Analysis/LoopAnalysisManager.h"
+#include "llvm/IR/Instructions.h"
+#include <unordered_map>
+
+namespace llvm {
+class DDGNode;
+class DDGEdge;
+using DDGNodeBase = DGNode<DDGNode, DDGEdge>;
+using DDGEdgeBase = DGEdge<DDGNode, DDGEdge>;
+using DDGBase = DirectedGraph<DDGNode, DDGEdge>;
+class LPMUpdater;
+
+/// Data Dependence Graph Node
+/// The graph can represent the following types of nodes:
+/// 1. Single instruction node containing just one instruction.
+/// 2. Multiple instruction node where two or more instructions from
+/// the same basic block are merged into one node.
+/// 3. Root node is a special node that connects to all components such that
+/// there is always a path from it to any node in the graph.
+class DDGNode : public DDGNodeBase {
+public:
+ using InstructionListType = SmallVectorImpl<Instruction *>;
+
+ enum class NodeKind {
+ Unknown,
+ SingleInstruction,
+ MultiInstruction,
+ Root,
+ };
+
+ DDGNode() = delete;
+ DDGNode(const NodeKind K) : DDGNodeBase(), Kind(K) {}
+ DDGNode(const DDGNode &N) : DDGNodeBase(N), Kind(N.Kind) {}
+ DDGNode(DDGNode &&N) : DDGNodeBase(std::move(N)), Kind(N.Kind) {}
+ virtual ~DDGNode() = 0;
+
+ DDGNode &operator=(const DDGNode &N) {
+ DGNode::operator=(N);
+ Kind = N.Kind;
+ return *this;
+ }
+
+ DDGNode &operator=(DDGNode &&N) {
+ DGNode::operator=(std::move(N));
+ Kind = N.Kind;
+ return *this;
+ }
+
+ /// Getter for the kind of this node.
+ NodeKind getKind() const { return Kind; }
+
+ /// Collect a list of instructions, in \p IList, for which predicate \p Pred
+ /// evaluates to true when iterating over instructions of this node. Return
+ /// true if at least one instruction was collected, and false otherwise.
+ bool collectInstructions(llvm::function_ref<bool(Instruction *)> const &Pred,
+ InstructionListType &IList) const;
+
+protected:
+ /// Setter for the kind of this node.
+ void setKind(NodeKind K) { Kind = K; }
+
+private:
+ NodeKind Kind;
+};
+
+/// Subclass of DDGNode representing the root node of the graph.
+/// There should only be one such node in a given graph.
+class RootDDGNode : public DDGNode {
+public:
+ RootDDGNode() : DDGNode(NodeKind::Root) {}
+ RootDDGNode(const RootDDGNode &N) = delete;
+ RootDDGNode(RootDDGNode &&N) : DDGNode(std::move(N)) {}
+ ~RootDDGNode() {}
+
+ /// Define classof to be able to use isa<>, cast<>, dyn_cast<>, etc.
+ static bool classof(const DDGNode *N) {
+ return N->getKind() == NodeKind::Root;
+ }
+ static bool classof(const RootDDGNode *N) { return true; }
+};
+
+/// Subclass of DDGNode representing single or multi-instruction nodes.
+class SimpleDDGNode : public DDGNode {
+public:
+ SimpleDDGNode() = delete;
+ SimpleDDGNode(Instruction &I);
+ SimpleDDGNode(const SimpleDDGNode &N);
+ SimpleDDGNode(SimpleDDGNode &&N);
+ ~SimpleDDGNode();
+
+ SimpleDDGNode &operator=(const SimpleDDGNode &N) {
+ DDGNode::operator=(N);
+ InstList = N.InstList;
+ return *this;
+ }
+
+ SimpleDDGNode &operator=(SimpleDDGNode &&N) {
+ DDGNode::operator=(std::move(N));
+ InstList = std::move(N.InstList);
+ return *this;
+ }
+
+ /// Get the list of instructions in this node.
+ const InstructionListType &getInstructions() const {
+ assert(!InstList.empty() && "Instruction List is empty.");
+ return InstList;
+ }
+ InstructionListType &getInstructions() {
+ return const_cast<InstructionListType &>(
+ static_cast<const SimpleDDGNode *>(this)->getInstructions());
+ }
+
+ /// Get the first/last instruction in the node.
+ Instruction *getFirstInstruction() const { return getInstructions().front(); }
+ Instruction *getLastInstruction() const { return getInstructions().back(); }
+
+ /// Define classof to be able to use isa<>, cast<>, dyn_cast<>, etc.
+ static bool classof(const DDGNode *N) {
+ return N->getKind() == NodeKind::SingleInstruction ||
+ N->getKind() == NodeKind::MultiInstruction;
+ }
+ static bool classof(const SimpleDDGNode *N) { return true; }
+
+private:
+ /// Append the list of instructions in \p Input to this node.
+ void appendInstructions(const InstructionListType &Input) {
+ setKind((InstList.size() == 0 && Input.size() == 1)
+ ? NodeKind::SingleInstruction
+ : NodeKind::MultiInstruction);
+ InstList.insert(InstList.end(), Input.begin(), Input.end());
+ }
+ void appendInstructions(const SimpleDDGNode &Input) {
+ appendInstructions(Input.getInstructions());
+ }
+
+ /// List of instructions associated with a single or multi-instruction node.
+ SmallVector<Instruction *, 2> InstList;
+};
+
+/// Data Dependency Graph Edge.
+/// An edge in the DDG can represent a def-use relationship or
+/// a memory dependence based on the result of DependenceAnalysis.
+/// A rooted edge connects the root node to one of the components
+/// of the graph.
+class DDGEdge : public DDGEdgeBase {
+public:
+ /// The kind of edge in the DDG
+ enum class EdgeKind { Unknown, RegisterDefUse, MemoryDependence, Rooted };
+
+ explicit DDGEdge(DDGNode &N) = delete;
+ DDGEdge(DDGNode &N, EdgeKind K) : DDGEdgeBase(N), Kind(K) {}
+ DDGEdge(const DDGEdge &E) : DDGEdgeBase(E), Kind(E.getKind()) {}
+ DDGEdge(DDGEdge &&E) : DDGEdgeBase(std::move(E)), Kind(E.Kind) {}
+ DDGEdge &operator=(const DDGEdge &E) {
+ DDGEdgeBase::operator=(E);
+ Kind = E.Kind;
+ return *this;
+ }
+
+ DDGEdge &operator=(DDGEdge &&E) {
+ DDGEdgeBase::operator=(std::move(E));
+ Kind = E.Kind;
+ return *this;
+ }
+
+ /// Get the edge kind
+ EdgeKind getKind() const { return Kind; };
+
+ /// Return true if this is a def-use edge, and false otherwise.
+ bool isDefUse() const { return Kind == EdgeKind::RegisterDefUse; }
+
+ /// Return true if this is a memory dependence edge, and false otherwise.
+ bool isMemoryDependence() const { return Kind == EdgeKind::MemoryDependence; }
+
+ /// Return true if this is an edge stemming from the root node, and false
+ /// otherwise.
+ bool isRooted() const { return Kind == EdgeKind::Rooted; }
+
+private:
+ EdgeKind Kind;
+};
+
+/// Encapsulate some common data and functionality needed for different
+/// variations of data dependence graphs.
+template <typename NodeType> class DependenceGraphInfo {
+public:
+ using DependenceList = SmallVector<std::unique_ptr<Dependence>, 1>;
+
+ DependenceGraphInfo() = delete;
+ DependenceGraphInfo(const DependenceGraphInfo &G) = delete;
+ DependenceGraphInfo(const std::string &N, const DependenceInfo &DepInfo)
+ : Name(N), DI(DepInfo), Root(nullptr) {}
+ DependenceGraphInfo(DependenceGraphInfo &&G)
+ : Name(std::move(G.Name)), DI(std::move(G.DI)), Root(G.Root) {}
+ virtual ~DependenceGraphInfo() {}
+
+ /// Return the label that is used to name this graph.
+ const StringRef getName() const { return Name; }
+
+ /// Return the root node of the graph.
+ NodeType &getRoot() const {
+ assert(Root && "Root node is not available yet. Graph construction may "
+ "still be in progress\n");
+ return *Root;
+ }
+
+protected:
+ // Name of the graph.
+ std::string Name;
+
+ // Store a copy of DependenceInfo in the graph, so that individual memory
+ // dependencies don't need to be stored. Instead when the dependence is
+ // queried it is recomputed using @DI.
+ const DependenceInfo DI;
+
+ // A special node in the graph that has an edge to every connected component of
+ // the graph, to ensure all nodes are reachable in a graph walk.
+ NodeType *Root = nullptr;
+};
+
+using DDGInfo = DependenceGraphInfo<DDGNode>;
+
+/// Data Dependency Graph
+class DataDependenceGraph : public DDGBase, public DDGInfo {
+ friend class DDGBuilder;
+
+public:
+ using NodeType = DDGNode;
+ using EdgeType = DDGEdge;
+
+ DataDependenceGraph() = delete;
+ DataDependenceGraph(const DataDependenceGraph &G) = delete;
+ DataDependenceGraph(DataDependenceGraph &&G)
+ : DDGBase(std::move(G)), DDGInfo(std::move(G)) {}
+ DataDependenceGraph(Function &F, DependenceInfo &DI);
+ DataDependenceGraph(const Loop &L, DependenceInfo &DI);
+ ~DataDependenceGraph();
+
+protected:
+ /// Add node \p N to the graph, if it's not added yet, and keep track of
+ /// the root node. Return true if node is successfully added.
+ bool addNode(NodeType &N);
+
+};
+
+/// Concrete implementation of a pure data dependence graph builder. This class
+/// provides custom implementation for the pure-virtual functions used in the
+/// generic dependence graph build algorithm.
+///
+/// For information about time complexity of the build algorithm see the
+/// comments near the declaration of AbstractDependenceGraphBuilder.
+class DDGBuilder : public AbstractDependenceGraphBuilder<DataDependenceGraph> {
+public:
+ DDGBuilder(DataDependenceGraph &G, DependenceInfo &D,
+ const BasicBlockListType &BBs)
+ : AbstractDependenceGraphBuilder(G, D, BBs) {}
+ DDGNode &createRootNode() final override {
+ auto *RN = new RootDDGNode();
+ assert(RN && "Failed to allocate memory for DDG root node.");
+ Graph.addNode(*RN);
+ return *RN;
+ }
+ DDGNode &createFineGrainedNode(Instruction &I) final override {
+ auto *SN = new SimpleDDGNode(I);
+ assert(SN && "Failed to allocate memory for simple DDG node.");
+ Graph.addNode(*SN);
+ return *SN;
+ }
+ DDGEdge &createDefUseEdge(DDGNode &Src, DDGNode &Tgt) final override {
+ auto *E = new DDGEdge(Tgt, DDGEdge::EdgeKind::RegisterDefUse);
+ assert(E && "Failed to allocate memory for edge");
+ Graph.connect(Src, Tgt, *E);
+ return *E;
+ }
+ DDGEdge &createMemoryEdge(DDGNode &Src, DDGNode &Tgt) final override {
+ auto *E = new DDGEdge(Tgt, DDGEdge::EdgeKind::MemoryDependence);
+ assert(E && "Failed to allocate memory for edge");
+ Graph.connect(Src, Tgt, *E);
+ return *E;
+ }
+ DDGEdge &createRootedEdge(DDGNode &Src, DDGNode &Tgt) final override {
+ auto *E = new DDGEdge(Tgt, DDGEdge::EdgeKind::Rooted);
+ assert(E && "Failed to allocate memory for edge");
+ assert(isa<RootDDGNode>(Src) && "Expected root node");
+ Graph.connect(Src, Tgt, *E);
+ return *E;
+ }
+
+};
+
+raw_ostream &operator<<(raw_ostream &OS, const DDGNode &N);
+raw_ostream &operator<<(raw_ostream &OS, const DDGNode::NodeKind K);
+raw_ostream &operator<<(raw_ostream &OS, const DDGEdge &E);
+raw_ostream &operator<<(raw_ostream &OS, const DDGEdge::EdgeKind K);
+raw_ostream &operator<<(raw_ostream &OS, const DataDependenceGraph &G);
+
+//===--------------------------------------------------------------------===//
+// DDG Analysis Passes
+//===--------------------------------------------------------------------===//
+
+/// Analysis pass that builds the DDG for a loop.
+class DDGAnalysis : public AnalysisInfoMixin<DDGAnalysis> {
+public:
+ using Result = std::unique_ptr<DataDependenceGraph>;
+ Result run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR);
+
+private:
+ friend AnalysisInfoMixin<DDGAnalysis>;
+ static AnalysisKey Key;
+};
+
+/// Textual printer pass for the DDG of a loop.
+class DDGAnalysisPrinterPass : public PassInfoMixin<DDGAnalysisPrinterPass> {
+public:
+ explicit DDGAnalysisPrinterPass(raw_ostream &OS) : OS(OS) {}
+ PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
+ LoopStandardAnalysisResults &AR, LPMUpdater &U);
+
+private:
+ raw_ostream &OS;
+};
+
+//===--------------------------------------------------------------------===//
+// GraphTraits specializations for the DDG
+//===--------------------------------------------------------------------===//
+
+/// non-const versions of the grapth trait specializations for DDG
+template <> struct GraphTraits<DDGNode *> {
+ using NodeRef = DDGNode *;
+
+ static DDGNode *DDGGetTargetNode(DGEdge<DDGNode, DDGEdge> *P) {
+ return &P->getTargetNode();
+ }
+
+ // Provide a mapped iterator so that the GraphTrait-based implementations can
+ // find the target nodes without having to explicitly go through the edges.
+ using ChildIteratorType =
+ mapped_iterator<DDGNode::iterator, decltype(&DDGGetTargetNode)>;
+ using ChildEdgeIteratorType = DDGNode::iterator;
+
+ static NodeRef getEntryNode(NodeRef N) { return N; }
+ static ChildIteratorType child_begin(NodeRef N) {
+ return ChildIteratorType(N->begin(), &DDGGetTargetNode);
+ }