From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/include/llvm-c/Core.h | 56 +- llvm/include/llvm-c/DataTypes.h | 6 - llvm/include/llvm-c/DebugInfo.h | 13 +- llvm/include/llvm-c/ExecutionEngine.h | 5 + llvm/include/llvm-c/Orc.h | 335 + llvm/include/llvm-c/Transforms/Coroutines.h | 4 + llvm/include/llvm-c/lto.h | 17 +- llvm/include/llvm/ADT/APFloat.h | 72 +- llvm/include/llvm/ADT/APInt.h | 19 +- llvm/include/llvm/ADT/AllocatorList.h | 4 +- llvm/include/llvm/ADT/Any.h | 63 +- llvm/include/llvm/ADT/ArrayRef.h | 58 +- llvm/include/llvm/ADT/BitVector.h | 58 +- llvm/include/llvm/ADT/Bitfields.h | 289 + llvm/include/llvm/ADT/BitmaskEnum.h | 41 +- llvm/include/llvm/ADT/CachedHashString.h | 3 +- llvm/include/llvm/ADT/CoalescingBitVector.h | 444 + llvm/include/llvm/ADT/DAGDeltaAlgorithm.h | 2 +- llvm/include/llvm/ADT/DeltaAlgorithm.h | 2 +- llvm/include/llvm/ADT/DenseMap.h | 87 +- llvm/include/llvm/ADT/DenseMapInfo.h | 114 +- llvm/include/llvm/ADT/DenseSet.h | 6 + llvm/include/llvm/ADT/EnumeratedArray.h | 1 + llvm/include/llvm/ADT/FloatingPointMode.h | 141 +- llvm/include/llvm/ADT/FoldingSet.h | 138 +- llvm/include/llvm/ADT/FunctionExtras.h | 225 +- llvm/include/llvm/ADT/Hashing.h | 20 +- llvm/include/llvm/ADT/ImmutableMap.h | 98 +- llvm/include/llvm/ADT/ImmutableSet.h | 104 +- llvm/include/llvm/ADT/IntervalMap.h | 14 +- llvm/include/llvm/ADT/Optional.h | 2 +- llvm/include/llvm/ADT/PointerEmbeddedInt.h | 2 +- llvm/include/llvm/ADT/PointerIntPair.h | 5 +- llvm/include/llvm/ADT/PointerSumType.h | 2 +- llvm/include/llvm/ADT/PointerUnion.h | 4 +- llvm/include/llvm/ADT/PostOrderIterator.h | 3 +- llvm/include/llvm/ADT/PriorityWorklist.h | 2 +- llvm/include/llvm/ADT/SCCIterator.h | 8 +- llvm/include/llvm/ADT/STLExtras.h | 631 +- llvm/include/llvm/ADT/ScopedHashTable.h | 2 +- llvm/include/llvm/ADT/SetOperations.h | 21 + llvm/include/llvm/ADT/SetVector.h | 25 +- llvm/include/llvm/ADT/SmallBitVector.h | 37 +- llvm/include/llvm/ADT/SmallPtrSet.h | 16 +- llvm/include/llvm/ADT/SmallString.h | 6 +- llvm/include/llvm/ADT/SmallVector.h | 107 +- llvm/include/llvm/ADT/SparseMultiSet.h | 2 +- llvm/include/llvm/ADT/SparseSet.h | 4 +- llvm/include/llvm/ADT/StringExtras.h | 22 +- llvm/include/llvm/ADT/StringMap.h | 230 +- llvm/include/llvm/ADT/StringMapEntry.h | 135 + llvm/include/llvm/ADT/StringRef.h | 35 +- llvm/include/llvm/ADT/StringSet.h | 66 +- llvm/include/llvm/ADT/TinyPtrVector.h | 8 +- llvm/include/llvm/ADT/Triple.h | 44 +- llvm/include/llvm/ADT/Twine.h | 4 +- llvm/include/llvm/ADT/TypeSwitch.h | 176 + llvm/include/llvm/ADT/Waymarking.h | 325 + llvm/include/llvm/ADT/bit.h | 23 +- llvm/include/llvm/ADT/fallible_iterator.h | 8 +- llvm/include/llvm/ADT/ilist.h | 8 +- llvm/include/llvm/ADT/ilist_iterator.h | 7 +- llvm/include/llvm/ADT/iterator.h | 20 +- llvm/include/llvm/Analysis/AliasAnalysis.h | 66 +- llvm/include/llvm/Analysis/AliasSetTracker.h | 7 +- llvm/include/llvm/Analysis/AssumeBundleQueries.h | 167 + llvm/include/llvm/Analysis/AssumptionCache.h | 42 +- llvm/include/llvm/Analysis/BasicAliasAnalysis.h | 4 +- llvm/include/llvm/Analysis/BlockFrequencyInfo.h | 3 + .../include/llvm/Analysis/BlockFrequencyInfoImpl.h | 126 +- llvm/include/llvm/Analysis/BranchProbabilityInfo.h | 22 +- llvm/include/llvm/Analysis/CFG.h | 6 +- llvm/include/llvm/Analysis/CFGPrinter.h | 194 +- llvm/include/llvm/Analysis/CGSCCPassManager.h | 87 +- llvm/include/llvm/Analysis/CallGraph.h | 36 +- llvm/include/llvm/Analysis/CallGraphSCCPass.h | 4 + llvm/include/llvm/Analysis/CaptureTracking.h | 46 +- llvm/include/llvm/Analysis/CodeMetrics.h | 4 +- llvm/include/llvm/Analysis/ConstantFolding.h | 14 +- llvm/include/llvm/Analysis/DDG.h | 40 + llvm/include/llvm/Analysis/DOTGraphTraitsPass.h | 2 - llvm/include/llvm/Analysis/DependenceAnalysis.h | 29 +- .../include/llvm/Analysis/DependenceGraphBuilder.h | 31 +- llvm/include/llvm/Analysis/DivergenceAnalysis.h | 2 +- llvm/include/llvm/Analysis/DomTreeUpdater.h | 8 +- llvm/include/llvm/Analysis/DominanceFrontier.h | 2 +- llvm/include/llvm/Analysis/EHPersonalities.h | 2 +- llvm/include/llvm/Analysis/GlobalsModRef.h | 5 +- llvm/include/llvm/Analysis/HeatUtils.h | 40 + llvm/include/llvm/Analysis/IVDescriptors.h | 23 +- llvm/include/llvm/Analysis/IndirectCallVisitor.h | 4 +- llvm/include/llvm/Analysis/InlineAdvisor.h | 238 + llvm/include/llvm/Analysis/InlineCost.h | 108 +- .../include/llvm/Analysis/InlineFeaturesAnalysis.h | 45 + .../include/llvm/Analysis/InlineModelFeatureMaps.h | 70 + .../llvm/Analysis/InlineSizeEstimatorAnalysis.h | 35 + .../llvm/Analysis/InstructionPrecedenceTracking.h | 20 +- llvm/include/llvm/Analysis/InstructionSimplify.h | 16 +- .../llvm/Analysis/IteratedDominanceFrontier.h | 2 +- .../llvm/Analysis/LazyBranchProbabilityInfo.h | 2 +- llvm/include/llvm/Analysis/LazyCallGraph.h | 17 + llvm/include/llvm/Analysis/LazyValueInfo.h | 24 +- .../llvm/Analysis/LegacyDivergenceAnalysis.h | 12 +- llvm/include/llvm/Analysis/Loads.h | 17 +- llvm/include/llvm/Analysis/LoopAccessAnalysis.h | 136 +- llvm/include/llvm/Analysis/LoopAnalysisManager.h | 23 +- llvm/include/llvm/Analysis/LoopInfo.h | 20 +- llvm/include/llvm/Analysis/LoopInfoImpl.h | 1 - llvm/include/llvm/Analysis/LoopNestAnalysis.h | 162 + llvm/include/llvm/Analysis/LoopPass.h | 40 - llvm/include/llvm/Analysis/MLInlineAdvisor.h | 107 + llvm/include/llvm/Analysis/MLModelRunner.h | 39 + llvm/include/llvm/Analysis/MemoryBuiltins.h | 14 +- .../llvm/Analysis/MemoryDependenceAnalysis.h | 30 +- llvm/include/llvm/Analysis/MemoryLocation.h | 42 +- llvm/include/llvm/Analysis/MemorySSA.h | 31 +- llvm/include/llvm/Analysis/MemorySSAUpdater.h | 24 +- llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h | 26 +- llvm/include/llvm/Analysis/MustExecute.h | 135 +- llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h | 23 +- llvm/include/llvm/Analysis/ObjCARCInstKind.h | 2 - .../llvm/Analysis/OptimizationRemarkEmitter.h | 10 +- llvm/include/llvm/Analysis/OrderedBasicBlock.h | 74 - llvm/include/llvm/Analysis/OrderedInstructions.h | 64 - llvm/include/llvm/Analysis/Passes.h | 3 - llvm/include/llvm/Analysis/PhiValues.h | 1 - llvm/include/llvm/Analysis/PostDominators.h | 4 +- llvm/include/llvm/Analysis/ProfileSummaryInfo.h | 107 +- llvm/include/llvm/Analysis/PtrUseVisitor.h | 7 +- llvm/include/llvm/Analysis/RegionInfo.h | 5 +- llvm/include/llvm/Analysis/RegionInfoImpl.h | 8 +- llvm/include/llvm/Analysis/RegionPass.h | 4 +- llvm/include/llvm/Analysis/ScalarEvolution.h | 22 +- .../llvm/Analysis/ScalarEvolutionDivision.h | 69 + .../llvm/Analysis/ScalarEvolutionExpander.h | 415 - .../llvm/Analysis/ScalarEvolutionExpressions.h | 24 +- .../llvm/Analysis/ScalarEvolutionNormalization.h | 2 +- llvm/include/llvm/Analysis/ScopedNoAliasAA.h | 1 - llvm/include/llvm/Analysis/StackLifetime.h | 202 + llvm/include/llvm/Analysis/StackSafetyAnalysis.h | 59 +- .../include/llvm/Analysis/SyncDependenceAnalysis.h | 5 - llvm/include/llvm/Analysis/SyntheticCountsUtils.h | 3 - llvm/include/llvm/Analysis/TargetFolder.h | 115 +- llvm/include/llvm/Analysis/TargetLibraryInfo.def | 36 + llvm/include/llvm/Analysis/TargetLibraryInfo.h | 36 +- llvm/include/llvm/Analysis/TargetTransformInfo.h | 923 +- .../llvm/Analysis/TargetTransformInfoImpl.h | 715 +- .../include/llvm/Analysis/TypeBasedAliasAnalysis.h | 3 +- llvm/include/llvm/Analysis/TypeMetadataUtils.h | 9 +- llvm/include/llvm/Analysis/Utils/Local.h | 18 +- llvm/include/llvm/Analysis/Utils/TFUtils.h | 115 + llvm/include/llvm/Analysis/ValueLattice.h | 385 +- llvm/include/llvm/Analysis/ValueTracking.h | 91 +- llvm/include/llvm/Analysis/VecFuncs.def | 23 + llvm/include/llvm/Analysis/VectorUtils.h | 237 +- llvm/include/llvm/AsmParser/Parser.h | 81 +- llvm/include/llvm/BinaryFormat/COFF.h | 6 + llvm/include/llvm/BinaryFormat/Dwarf.def | 94 +- llvm/include/llvm/BinaryFormat/Dwarf.h | 39 +- llvm/include/llvm/BinaryFormat/ELF.h | 132 +- .../llvm/BinaryFormat/ELFRelocs/AArch64.def | 4 + .../llvm/BinaryFormat/ELFRelocs/PowerPC64.def | 8 + llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def | 1 + llvm/include/llvm/BinaryFormat/ELFRelocs/VE.def | 48 + llvm/include/llvm/BinaryFormat/MachO.h | 17 +- llvm/include/llvm/BinaryFormat/Magic.h | 6 +- llvm/include/llvm/BinaryFormat/MsgPackDocument.h | 99 +- llvm/include/llvm/BinaryFormat/MsgPackReader.h | 2 + llvm/include/llvm/BinaryFormat/Wasm.h | 31 +- llvm/include/llvm/BinaryFormat/WasmRelocs.def | 31 +- llvm/include/llvm/BinaryFormat/XCOFF.h | 57 +- llvm/include/llvm/Bitcode/BitcodeReader.h | 24 +- llvm/include/llvm/Bitcode/LLVMBitCodes.h | 17 +- llvm/include/llvm/Bitstream/BitstreamReader.h | 1 + llvm/include/llvm/CodeGen/Analysis.h | 6 +- llvm/include/llvm/CodeGen/AntiDepBreaker.h | 97 + llvm/include/llvm/CodeGen/AsmPrinter.h | 145 +- llvm/include/llvm/CodeGen/AsmPrinterHandler.h | 6 + llvm/include/llvm/CodeGen/BasicTTIImpl.h | 920 +- llvm/include/llvm/CodeGen/CallingConvLower.h | 84 +- llvm/include/llvm/CodeGen/CommandFlags.h | 151 + llvm/include/llvm/CodeGen/CommandFlags.inc | 428 - llvm/include/llvm/CodeGen/DIE.h | 49 +- .../llvm/CodeGen/DbgEntityHistoryCalculator.h | 3 +- llvm/include/llvm/CodeGen/DebugHandlerBase.h | 9 +- llvm/include/llvm/CodeGen/EdgeBundles.h | 1 - llvm/include/llvm/CodeGen/ExecutionDomainFix.h | 15 +- llvm/include/llvm/CodeGen/FastISel.h | 64 +- llvm/include/llvm/CodeGen/FunctionLoweringInfo.h | 75 +- llvm/include/llvm/CodeGen/GlobalISel/CSEInfo.h | 8 +- .../include/llvm/CodeGen/GlobalISel/CallLowering.h | 24 +- .../llvm/CodeGen/GlobalISel/CombinerHelper.h | 88 +- .../include/llvm/CodeGen/GlobalISel/CombinerInfo.h | 2 +- .../llvm/CodeGen/GlobalISel/GISelChangeObserver.h | 24 +- .../llvm/CodeGen/GlobalISel/GISelKnownBits.h | 36 +- .../include/llvm/CodeGen/GlobalISel/IRTranslator.h | 19 +- .../llvm/CodeGen/GlobalISel/InlineAsmLowering.h | 67 + .../llvm/CodeGen/GlobalISel/InstructionSelector.h | 7 + .../CodeGen/GlobalISel/InstructionSelectorImpl.h | 36 +- .../GlobalISel/LegalizationArtifactCombiner.h | 353 +- llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h | 2 + .../llvm/CodeGen/GlobalISel/LegalizerHelper.h | 117 +- .../llvm/CodeGen/GlobalISel/LegalizerInfo.h | 120 +- llvm/include/llvm/CodeGen/GlobalISel/Localizer.h | 4 +- .../llvm/CodeGen/GlobalISel/LostDebugLocObserver.h | 50 + .../llvm/CodeGen/GlobalISel/MIPatternMatch.h | 74 +- .../llvm/CodeGen/GlobalISel/MachineIRBuilder.h | 236 +- llvm/include/llvm/CodeGen/GlobalISel/Types.h | 33 - llvm/include/llvm/CodeGen/GlobalISel/Utils.h | 58 +- llvm/include/llvm/CodeGen/ISDOpcodes.h | 2355 +- llvm/include/llvm/CodeGen/IndirectThunks.h | 110 + llvm/include/llvm/CodeGen/IntrinsicLowering.h | 1 - llvm/include/llvm/CodeGen/LexicalScopes.h | 9 +- llvm/include/llvm/CodeGen/LiveInterval.h | 13 +- llvm/include/llvm/CodeGen/LiveIntervalCalc.h | 71 + llvm/include/llvm/CodeGen/LiveIntervals.h | 31 +- llvm/include/llvm/CodeGen/LiveRangeCalc.h | 57 +- llvm/include/llvm/CodeGen/LiveRangeEdit.h | 36 +- llvm/include/llvm/CodeGen/LiveVariables.h | 5 + llvm/include/llvm/CodeGen/MBFIWrapper.h | 46 + llvm/include/llvm/CodeGen/MIRParser/MIParser.h | 17 +- llvm/include/llvm/CodeGen/MIRParser/MIRParser.h | 6 +- llvm/include/llvm/CodeGen/MIRYamlMapping.h | 33 +- llvm/include/llvm/CodeGen/MachineBasicBlock.h | 149 +- .../llvm/CodeGen/MachineBlockFrequencyInfo.h | 2 + llvm/include/llvm/CodeGen/MachineCombinerPattern.h | 4 + llvm/include/llvm/CodeGen/MachineConstantPool.h | 40 +- llvm/include/llvm/CodeGen/MachineDominators.h | 12 +- llvm/include/llvm/CodeGen/MachineFrameInfo.h | 63 +- llvm/include/llvm/CodeGen/MachineFunction.h | 100 +- llvm/include/llvm/CodeGen/MachineInstr.h | 125 +- llvm/include/llvm/CodeGen/MachineInstrBundle.h | 4 +- .../llvm/CodeGen/MachineInstrBundleIterator.h | 4 +- llvm/include/llvm/CodeGen/MachineMemOperand.h | 30 +- llvm/include/llvm/CodeGen/MachineModuleInfo.h | 11 +- llvm/include/llvm/CodeGen/MachineOperand.h | 9 +- .../CodeGen/MachineOptimizationRemarkEmitter.h | 4 +- llvm/include/llvm/CodeGen/MachinePipeliner.h | 23 +- llvm/include/llvm/CodeGen/MachinePostDominators.h | 10 +- llvm/include/llvm/CodeGen/MachineRegisterInfo.h | 184 +- llvm/include/llvm/CodeGen/MachineSSAUpdater.h | 16 +- llvm/include/llvm/CodeGen/MachineScheduler.h | 11 +- llvm/include/llvm/CodeGen/MachineSizeOpts.h | 7 + llvm/include/llvm/CodeGen/ModuloSchedule.h | 35 +- llvm/include/llvm/CodeGen/ParallelCG.h | 5 +- llvm/include/llvm/CodeGen/Passes.h | 28 +- llvm/include/llvm/CodeGen/PseudoSourceValue.h | 5 +- llvm/include/llvm/CodeGen/RDFGraph.h | 968 + llvm/include/llvm/CodeGen/RDFLiveness.h | 151 + llvm/include/llvm/CodeGen/RDFRegisters.h | 240 + llvm/include/llvm/CodeGen/ReachingDefAnalysis.h | 171 +- llvm/include/llvm/CodeGen/Register.h | 23 +- llvm/include/llvm/CodeGen/ResourcePriorityQueue.h | 10 +- llvm/include/llvm/CodeGen/ScheduleDAG.h | 4 + llvm/include/llvm/CodeGen/ScheduleDFS.h | 2 +- .../llvm/CodeGen/ScoreboardHazardRecognizer.h | 8 +- llvm/include/llvm/CodeGen/SelectionDAG.h | 337 +- llvm/include/llvm/CodeGen/SelectionDAGISel.h | 14 +- llvm/include/llvm/CodeGen/SelectionDAGNodes.h | 91 +- llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h | 11 +- llvm/include/llvm/CodeGen/SlotIndexes.h | 24 +- llvm/include/llvm/CodeGen/Spiller.h | 42 + llvm/include/llvm/CodeGen/StackMaps.h | 37 +- llvm/include/llvm/CodeGen/StackProtector.h | 2 +- llvm/include/llvm/CodeGen/TailDuplicator.h | 34 +- llvm/include/llvm/CodeGen/TargetCallingConv.h | 28 +- llvm/include/llvm/CodeGen/TargetFrameLowering.h | 73 +- llvm/include/llvm/CodeGen/TargetInstrInfo.h | 98 +- llvm/include/llvm/CodeGen/TargetLowering.h | 453 +- .../llvm/CodeGen/TargetLoweringObjectFileImpl.h | 36 +- llvm/include/llvm/CodeGen/TargetPassConfig.h | 20 +- llvm/include/llvm/CodeGen/TargetRegisterInfo.h | 84 +- llvm/include/llvm/CodeGen/TargetSubtargetInfo.h | 17 +- llvm/include/llvm/CodeGen/ValueTypes.h | 76 +- llvm/include/llvm/CodeGen/ValueTypes.td | 305 +- llvm/include/llvm/CodeGen/VirtRegMap.h | 1 - llvm/include/llvm/CodeGen/WasmEHFuncInfo.h | 6 +- llvm/include/llvm/DWARFLinker/DWARFLinker.h | 619 +- .../llvm/DWARFLinker/DWARFLinkerCompileUnit.h | 5 + .../llvm/DWARFLinker/DWARFLinkerDeclContext.h | 1 + llvm/include/llvm/DWARFLinker/DWARFStreamer.h | 219 + .../DebugInfo/CodeView/AppendingTypeTableBuilder.h | 3 +- .../llvm/DebugInfo/CodeView/CodeViewRecordIO.h | 14 +- .../DebugInfo/CodeView/ContinuationRecordBuilder.h | 1 - .../DebugInfo/CodeView/DebugSubsectionRecord.h | 23 +- .../DebugInfo/CodeView/GlobalTypeTableBuilder.h | 8 +- .../DebugInfo/CodeView/LazyRandomTypeCollection.h | 1 + .../DebugInfo/CodeView/MergingTypeTableBuilder.h | 3 +- .../llvm/DebugInfo/CodeView/SimpleTypeSerializer.h | 16 +- .../include/llvm/DebugInfo/CodeView/SymbolRecord.h | 7 + .../llvm/DebugInfo/CodeView/TypeCollection.h | 1 + .../llvm/DebugInfo/CodeView/TypeSymbolEmitter.h | 4 +- .../llvm/DebugInfo/CodeView/TypeTableCollection.h | 1 + llvm/include/llvm/DebugInfo/DIContext.h | 22 +- .../llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | 27 +- .../llvm/DebugInfo/DWARF/DWARFAddressRange.h | 18 + llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h | 83 +- .../llvm/DebugInfo/DWARF/DWARFDataExtractor.h | 28 + llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h | 86 +- .../llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h | 13 +- .../llvm/DebugInfo/DWARF/DWARFDebugAranges.h | 8 +- .../include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h | 30 +- llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h | 84 +- .../include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h | 81 +- .../llvm/DebugInfo/DWARF/DWARFDebugPubTable.h | 16 +- llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h | 16 +- .../include/llvm/DebugInfo/DWARF/DWARFExpression.h | 28 +- llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h | 2 + llvm/include/llvm/DebugInfo/DWARF/DWARFObject.h | 2 + llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h | 35 +- llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h | 75 +- llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h | 11 +- .../include/llvm/DebugInfo/GSYM/DwarfTransformer.h | 91 + llvm/include/llvm/DebugInfo/GSYM/GsymCreator.h | 72 +- llvm/include/llvm/DebugInfo/GSYM/GsymReader.h | 63 +- llvm/include/llvm/DebugInfo/GSYM/InlineInfo.h | 2 +- llvm/include/llvm/DebugInfo/GSYM/LineTable.h | 18 + llvm/include/llvm/DebugInfo/GSYM/LookupResult.h | 4 +- .../llvm/DebugInfo/GSYM/ObjectFileTransformer.h | 51 + llvm/include/llvm/DebugInfo/GSYM/Range.h | 2 + llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h | 12 +- llvm/include/llvm/DebugInfo/PDB/GenericError.h | 1 - .../llvm/DebugInfo/PDB/IPDBInjectedSource.h | 6 +- llvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h | 2 +- llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h | 6 +- llvm/include/llvm/DebugInfo/PDB/IPDBSession.h | 11 +- .../PDB/Native/DbiModuleDescriptorBuilder.h | 3 +- .../llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h | 8 +- .../llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h | 78 +- .../DebugInfo/PDB/Native/NativeEnumLineNumbers.h | 39 + .../DebugInfo/PDB/Native/NativeFunctionSymbol.h | 45 + .../llvm/DebugInfo/PDB/Native/NativeLineNumber.h | 51 + .../llvm/DebugInfo/PDB/Native/NativePublicSymbol.h | 44 + .../llvm/DebugInfo/PDB/Native/NativeSession.h | 23 +- .../llvm/DebugInfo/PDB/Native/NativeSourceFile.h | 40 + .../DebugInfo/PDB/Native/NativeTypeFunctionSig.h | 2 +- .../llvm/DebugInfo/PDB/Native/NativeTypePointer.h | 2 +- .../llvm/DebugInfo/PDB/Native/NativeTypeTypedef.h | 2 +- .../llvm/DebugInfo/PDB/Native/NativeTypeUDT.h | 2 +- .../llvm/DebugInfo/PDB/Native/NativeTypeVTShape.h | 2 +- .../llvm/DebugInfo/PDB/Native/PDBFileBuilder.h | 1 - .../llvm/DebugInfo/PDB/Native/SymbolCache.h | 51 +- llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h | 6 +- llvm/include/llvm/DebugInfo/PDB/PDBTypes.h | 84 + llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h | 10 +- .../llvm/DebugInfo/Symbolize/SymbolizableModule.h | 5 +- llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h | 6 +- llvm/include/llvm/Demangle/Demangle.h | 16 +- llvm/include/llvm/Demangle/ItaniumDemangle.h | 47 +- .../include/llvm/Demangle/MicrosoftDemangleNodes.h | 12 +- .../include/llvm/ExecutionEngine/ExecutionEngine.h | 16 +- llvm/include/llvm/ExecutionEngine/JITLink/ELF.h | 31 + .../llvm/ExecutionEngine/JITLink/ELF_x86_64.h | 52 + .../include/llvm/ExecutionEngine/JITLink/JITLink.h | 35 +- .../ExecutionEngine/JITLink/JITLinkMemoryManager.h | 12 + .../llvm/ExecutionEngine/JITLink/MachO_x86_64.h | 1 + llvm/include/llvm/ExecutionEngine/JITSymbol.h | 38 +- llvm/include/llvm/ExecutionEngine/ObjectCache.h | 3 +- .../ExecutionEngine/Orc/CompileOnDemandLayer.h | 92 +- .../llvm/ExecutionEngine/Orc/CompileUtils.h | 19 +- llvm/include/llvm/ExecutionEngine/Orc/Core.h | 418 +- llvm/include/llvm/ExecutionEngine/Orc/DebugUtils.h | 72 + .../llvm/ExecutionEngine/Orc/ExecutionUtils.h | 72 + .../llvm/ExecutionEngine/Orc/IRCompileLayer.h | 29 +- .../llvm/ExecutionEngine/Orc/IRTransformLayer.h | 7 +- .../llvm/ExecutionEngine/Orc/IndirectionUtils.h | 136 +- .../ExecutionEngine/Orc/JITTargetMachineBuilder.h | 11 +- llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h | 174 +- llvm/include/llvm/ExecutionEngine/Orc/Layer.h | 100 +- .../llvm/ExecutionEngine/Orc/LazyEmittingLayer.h | 2 +- .../llvm/ExecutionEngine/Orc/LazyReexports.h | 96 +- llvm/include/llvm/ExecutionEngine/Orc/Legacy.h | 12 +- .../llvm/ExecutionEngine/Orc/MachOPlatform.h | 161 + llvm/include/llvm/ExecutionEngine/Orc/Mangling.h | 66 + .../llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h | 15 + .../llvm/ExecutionEngine/Orc/OrcABISupport.h | 355 +- llvm/include/llvm/ExecutionEngine/Orc/OrcError.h | 4 +- .../ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h | 3 +- .../ExecutionEngine/Orc/OrcRemoteTargetServer.h | 44 +- .../ExecutionEngine/Orc/RPC/RPCSerialization.h | 17 +- .../llvm/ExecutionEngine/Orc/RPC/RPCUtils.h | 43 +- .../llvm/ExecutionEngine/Orc/RPC/RawByteChannel.h | 32 +- .../ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h | 30 +- .../include/llvm/ExecutionEngine/Orc/Speculation.h | 9 +- .../llvm/ExecutionEngine/Orc/SymbolStringPool.h | 7 +- .../llvm/ExecutionEngine/Orc/ThreadSafeModule.h | 7 +- llvm/include/llvm/ExecutionEngine/RuntimeDyld.h | 27 +- .../llvm/ExecutionEngine/SectionMemoryManager.h | 1 - .../llvm/Frontend/Directive/DirectiveBase.td | 109 + llvm/include/llvm/Frontend/OpenACC/ACC.td | 604 + llvm/include/llvm/Frontend/OpenMP/OMP.td | 1489 + llvm/include/llvm/Frontend/OpenMP/OMPConstants.h | 69 +- llvm/include/llvm/Frontend/OpenMP/OMPContext.h | 187 + llvm/include/llvm/Frontend/OpenMP/OMPGridValues.h | 131 + llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h | 258 +- llvm/include/llvm/Frontend/OpenMP/OMPKinds.def | 870 +- llvm/include/llvm/FuzzMutate/FuzzerCLI.h | 3 +- llvm/include/llvm/FuzzMutate/Random.h | 6 +- llvm/include/llvm/IR/AbstractCallSite.h | 247 + llvm/include/llvm/IR/Argument.h | 11 +- llvm/include/llvm/IR/Attributes.h | 46 +- llvm/include/llvm/IR/Attributes.td | 34 +- llvm/include/llvm/IR/AutoUpgrade.h | 8 +- llvm/include/llvm/IR/BasicBlock.h | 107 +- llvm/include/llvm/IR/CFG.h | 43 +- llvm/include/llvm/IR/CFGDiff.h | 284 - llvm/include/llvm/IR/CallSite.h | 926 - llvm/include/llvm/IR/Constant.h | 2 + llvm/include/llvm/IR/ConstantFolder.h | 107 +- llvm/include/llvm/IR/ConstantRange.h | 4 + llvm/include/llvm/IR/Constants.h | 103 +- llvm/include/llvm/IR/ConstrainedOps.def | 105 +- llvm/include/llvm/IR/DIBuilder.h | 35 +- llvm/include/llvm/IR/DataLayout.h | 42 +- llvm/include/llvm/IR/DebugInfo.h | 18 +- llvm/include/llvm/IR/DebugInfoMetadata.h | 345 +- llvm/include/llvm/IR/DebugLoc.h | 2 +- llvm/include/llvm/IR/DerivedTypes.h | 275 +- llvm/include/llvm/IR/DiagnosticInfo.h | 46 +- llvm/include/llvm/IR/Dominators.h | 7 +- llvm/include/llvm/IR/FPEnv.h | 22 +- llvm/include/llvm/IR/Function.h | 28 +- llvm/include/llvm/IR/GetElementPtrTypeIterator.h | 12 +- llvm/include/llvm/IR/GlobalObject.h | 25 +- llvm/include/llvm/IR/GlobalValue.h | 31 +- llvm/include/llvm/IR/GlobalVariable.h | 1 - llvm/include/llvm/IR/IRBuilder.h | 1044 +- llvm/include/llvm/IR/IRBuilderFolder.h | 141 + llvm/include/llvm/IR/IRPrintingPasses.h | 17 +- llvm/include/llvm/IR/InlineAsm.h | 91 + llvm/include/llvm/IR/InstVisitor.h | 26 +- llvm/include/llvm/IR/InstrTypes.h | 170 +- llvm/include/llvm/IR/Instruction.h | 87 +- llvm/include/llvm/IR/Instructions.h | 655 +- llvm/include/llvm/IR/IntrinsicInst.h | 1685 +- llvm/include/llvm/IR/Intrinsics.h | 50 +- llvm/include/llvm/IR/Intrinsics.td | 436 +- llvm/include/llvm/IR/IntrinsicsAArch64.td | 923 +- llvm/include/llvm/IR/IntrinsicsAMDGPU.td | 696 +- llvm/include/llvm/IR/IntrinsicsARM.td | 361 +- llvm/include/llvm/IR/IntrinsicsBPF.td | 5 +- llvm/include/llvm/IR/IntrinsicsHexagon.td | 6212 +--- llvm/include/llvm/IR/IntrinsicsHexagonDep.td | 6144 ++++ llvm/include/llvm/IR/IntrinsicsMips.td | 268 +- llvm/include/llvm/IR/IntrinsicsNVVM.td | 26 +- llvm/include/llvm/IR/IntrinsicsPowerPC.td | 226 +- llvm/include/llvm/IR/IntrinsicsRISCV.td | 4 +- llvm/include/llvm/IR/IntrinsicsSystemZ.td | 126 +- llvm/include/llvm/IR/IntrinsicsWebAssembly.td | 63 +- llvm/include/llvm/IR/IntrinsicsX86.td | 801 +- llvm/include/llvm/IR/IntrinsicsXCore.td | 72 +- llvm/include/llvm/IR/LLVMContext.h | 50 +- llvm/include/llvm/IR/LLVMRemarkStreamer.h | 95 + llvm/include/llvm/IR/LegacyPassManagers.h | 3 +- llvm/include/llvm/IR/LegacyPassNameParser.h | 41 - llvm/include/llvm/IR/Mangler.h | 2 +- llvm/include/llvm/IR/MatrixBuilder.h | 221 + llvm/include/llvm/IR/Metadata.h | 32 +- llvm/include/llvm/IR/Module.h | 42 +- llvm/include/llvm/IR/ModuleSummaryIndex.h | 150 +- llvm/include/llvm/IR/ModuleSummaryIndexYAML.h | 9 +- llvm/include/llvm/IR/NoFolder.h | 155 +- llvm/include/llvm/IR/Operator.h | 47 +- llvm/include/llvm/IR/PassInstrumentation.h | 2 +- llvm/include/llvm/IR/PassManager.h | 170 +- llvm/include/llvm/IR/PassManagerImpl.h | 157 + llvm/include/llvm/IR/PassTimingInfo.h | 9 +- llvm/include/llvm/IR/PatternMatch.h | 325 +- llvm/include/llvm/IR/ProfileSummary.h | 31 +- llvm/include/llvm/IR/RemarkStreamer.h | 108 - llvm/include/llvm/IR/RuntimeLibcalls.def | 5 + llvm/include/llvm/IR/Statepoint.h | 309 +- llvm/include/llvm/IR/Type.h | 83 +- llvm/include/llvm/IR/Use.h | 69 +- llvm/include/llvm/IR/User.h | 5 + llvm/include/llvm/IR/VPIntrinsics.def | 84 + llvm/include/llvm/IR/Value.h | 62 +- llvm/include/llvm/IR/ValueHandle.h | 44 +- llvm/include/llvm/IR/ValueMap.h | 2 +- llvm/include/llvm/IRReader/IRReader.h | 29 +- llvm/include/llvm/InitializePasses.h | 15 + llvm/include/llvm/LTO/Config.h | 19 + llvm/include/llvm/LTO/LTO.h | 29 +- llvm/include/llvm/LTO/LTOBackend.h | 3 + llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h | 6 +- llvm/include/llvm/LTO/legacy/LTOModule.h | 4 + llvm/include/llvm/LinkAllPasses.h | 7 +- llvm/include/llvm/MC/ConstantPools.h | 1 - llvm/include/llvm/MC/LaneBitmask.h | 6 +- llvm/include/llvm/MC/MCAsmBackend.h | 33 +- llvm/include/llvm/MC/MCAsmInfo.h | 47 +- llvm/include/llvm/MC/MCAsmLayout.h | 4 + llvm/include/llvm/MC/MCAssembler.h | 5 +- llvm/include/llvm/MC/MCContext.h | 88 +- llvm/include/llvm/MC/MCDirectives.h | 51 +- .../llvm/MC/MCDisassembler/MCDisassembler.h | 87 +- llvm/include/llvm/MC/MCDwarf.h | 23 +- llvm/include/llvm/MC/MCELFObjectWriter.h | 14 +- llvm/include/llvm/MC/MCELFStreamer.h | 42 +- llvm/include/llvm/MC/MCExpr.h | 237 +- llvm/include/llvm/MC/MCFixup.h | 13 +- llvm/include/llvm/MC/MCFixupKindInfo.h | 10 +- llvm/include/llvm/MC/MCFragment.h | 33 +- llvm/include/llvm/MC/MCInstPrinter.h | 34 +- llvm/include/llvm/MC/MCInstrDesc.h | 25 +- llvm/include/llvm/MC/MCInstrInfo.h | 25 +- llvm/include/llvm/MC/MCInstrItineraries.h | 7 +- llvm/include/llvm/MC/MCMachObjectWriter.h | 3 +- llvm/include/llvm/MC/MCObjectFileInfo.h | 12 +- llvm/include/llvm/MC/MCObjectStreamer.h | 102 +- llvm/include/llvm/MC/MCObjectWriter.h | 6 - llvm/include/llvm/MC/MCParser/AsmLexer.h | 4 +- llvm/include/llvm/MC/MCParser/MCAsmParser.h | 25 +- .../llvm/MC/MCParser/MCAsmParserExtension.h | 2 + llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h | 18 +- llvm/include/llvm/MC/MCRegister.h | 19 +- llvm/include/llvm/MC/MCSchedule.h | 2 +- llvm/include/llvm/MC/MCSection.h | 9 +- llvm/include/llvm/MC/MCSectionCOFF.h | 13 +- llvm/include/llvm/MC/MCSectionELF.h | 34 +- llvm/include/llvm/MC/MCSectionMachO.h | 7 - llvm/include/llvm/MC/MCSectionWasm.h | 18 +- llvm/include/llvm/MC/MCSectionXCOFF.h | 22 +- llvm/include/llvm/MC/MCStreamer.h | 247 +- llvm/include/llvm/MC/MCSubtargetInfo.h | 9 +- llvm/include/llvm/MC/MCSymbolWasm.h | 37 +- llvm/include/llvm/MC/MCSymbolXCOFF.h | 52 +- llvm/include/llvm/MC/MCTargetOptions.h | 11 + llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h | 57 + .../llvm/MC/MCTargetOptionsCommandFlags.inc | 65 - llvm/include/llvm/MC/MCValue.h | 2 - llvm/include/llvm/MC/MCWasmObjectWriter.h | 2 +- llvm/include/llvm/MC/MCWasmStreamer.h | 36 +- llvm/include/llvm/MC/MCWinCOFFObjectWriter.h | 2 +- llvm/include/llvm/MC/MCWinCOFFStreamer.h | 29 +- llvm/include/llvm/MC/MCXCOFFObjectWriter.h | 7 + llvm/include/llvm/MC/MCXCOFFStreamer.h | 18 +- llvm/include/llvm/MC/StringTableBuilder.h | 10 + llvm/include/llvm/MC/SubtargetFeature.h | 2 +- llvm/include/llvm/MCA/CodeEmitter.h | 3 - llvm/include/llvm/MCA/HardwareUnits/LSUnit.h | 51 +- llvm/include/llvm/MCA/HardwareUnits/RegisterFile.h | 3 +- .../llvm/MCA/HardwareUnits/ResourceManager.h | 1 - llvm/include/llvm/MCA/Pipeline.h | 2 - llvm/include/llvm/MCA/Stages/DispatchStage.h | 1 - llvm/include/llvm/Object/ArchiveWriter.h | 3 - llvm/include/llvm/Object/Binary.h | 8 +- llvm/include/llvm/Object/COFF.h | 136 +- llvm/include/llvm/Object/COFFImportFile.h | 2 +- llvm/include/llvm/Object/ELF.h | 58 +- llvm/include/llvm/Object/ELFObjectFile.h | 121 +- llvm/include/llvm/Object/ELFTypes.h | 15 +- llvm/include/llvm/Object/Error.h | 10 +- llvm/include/llvm/Object/IRObjectFile.h | 2 +- llvm/include/llvm/Object/IRSymtab.h | 1 + llvm/include/llvm/Object/MachO.h | 11 +- llvm/include/llvm/Object/MachOUniversal.h | 23 +- llvm/include/llvm/Object/ModuleSymbolTable.h | 1 + llvm/include/llvm/Object/ObjectFile.h | 23 +- llvm/include/llvm/Object/SymbolicFile.h | 7 +- llvm/include/llvm/Object/TapiFile.h | 5 +- llvm/include/llvm/Object/TapiUniversal.h | 28 +- llvm/include/llvm/Object/Wasm.h | 13 +- llvm/include/llvm/Object/XCOFFObjectFile.h | 26 +- llvm/include/llvm/ObjectYAML/DWARFEmitter.h | 21 +- llvm/include/llvm/ObjectYAML/DWARFYAML.h | 91 +- llvm/include/llvm/ObjectYAML/ELFYAML.h | 138 +- llvm/include/llvm/ObjectYAML/MachOYAML.h | 20 + llvm/include/llvm/ObjectYAML/WasmYAML.h | 20 +- llvm/include/llvm/ObjectYAML/yaml2obj.h | 11 +- llvm/include/llvm/Option/OptParser.td | 43 + llvm/include/llvm/Option/Option.h | 14 +- llvm/include/llvm/Pass.h | 14 +- llvm/include/llvm/PassAnalysisSupport.h | 34 +- llvm/include/llvm/PassSupport.h | 4 + llvm/include/llvm/Passes/PassBuilder.h | 96 +- .../llvm/ProfileData/Coverage/CoverageMapping.h | 233 +- .../ProfileData/Coverage/CoverageMappingReader.h | 48 +- .../ProfileData/Coverage/CoverageMappingWriter.h | 5 +- llvm/include/llvm/ProfileData/GCOV.h | 322 +- llvm/include/llvm/ProfileData/InstrProf.h | 14 +- llvm/include/llvm/ProfileData/InstrProfData.inc | 51 +- llvm/include/llvm/ProfileData/ProfileCommon.h | 4 + llvm/include/llvm/ProfileData/SampleProf.h | 153 +- llvm/include/llvm/ProfileData/SampleProfReader.h | 35 +- llvm/include/llvm/ProfileData/SampleProfWriter.h | 34 +- llvm/include/llvm/Remarks/Remark.h | 2 +- llvm/include/llvm/Remarks/RemarkLinker.h | 3 +- llvm/include/llvm/Remarks/RemarkStreamer.h | 73 + llvm/include/llvm/Remarks/RemarkStringTable.h | 5 +- llvm/include/llvm/Support/AArch64TargetParser.def | 30 + llvm/include/llvm/Support/AArch64TargetParser.h | 11 +- llvm/include/llvm/Support/AMDGPUMetadata.h | 7 +- llvm/include/llvm/Support/ARMAttributeParser.h | 173 +- llvm/include/llvm/Support/ARMBuildAttributes.h | 109 +- llvm/include/llvm/Support/ARMTargetParser.def | 24 + llvm/include/llvm/Support/ARMTargetParser.h | 50 +- llvm/include/llvm/Support/Alignment.h | 166 +- llvm/include/llvm/Support/Allocator.h | 150 +- llvm/include/llvm/Support/AllocatorBase.h | 103 + llvm/include/llvm/Support/AtomicOrdering.h | 5 +- llvm/include/llvm/Support/Base64.h | 56 + llvm/include/llvm/Support/BinaryStreamArray.h | 1 + llvm/include/llvm/Support/BinaryStreamReader.h | 3 +- llvm/include/llvm/Support/BinaryStreamWriter.h | 2 +- llvm/include/llvm/Support/BranchProbability.h | 4 +- llvm/include/llvm/Support/CFGDiff.h | 250 + llvm/include/llvm/Support/CFGUpdate.h | 12 +- llvm/include/llvm/Support/CachePruning.h | 3 +- llvm/include/llvm/Support/Casting.h | 64 +- llvm/include/llvm/Support/CheckedArithmetic.h | 18 +- llvm/include/llvm/Support/Chrono.h | 4 +- llvm/include/llvm/Support/CommandLine.h | 29 +- llvm/include/llvm/Support/Compiler.h | 64 +- llvm/include/llvm/Support/CrashRecoveryContext.h | 3 +- llvm/include/llvm/Support/DataExtractor.h | 146 +- llvm/include/llvm/Support/DebugCounter.h | 7 +- llvm/include/llvm/Support/ELFAttributeParser.h | 72 + llvm/include/llvm/Support/ELFAttributes.h | 37 + llvm/include/llvm/Support/Endian.h | 4 +- llvm/include/llvm/Support/Errno.h | 4 +- llvm/include/llvm/Support/Error.h | 35 +- llvm/include/llvm/Support/ErrorHandling.h | 11 +- llvm/include/llvm/Support/ErrorOr.h | 48 +- llvm/include/llvm/Support/ExtensibleRTTI.h | 135 + llvm/include/llvm/Support/FileCheck.h | 19 +- llvm/include/llvm/Support/FileCollector.h | 58 +- llvm/include/llvm/Support/FileOutputBuffer.h | 2 - llvm/include/llvm/Support/FormatAdapters.h | 11 +- llvm/include/llvm/Support/FormatProviders.h | 14 +- llvm/include/llvm/Support/FormatVariadic.h | 63 +- llvm/include/llvm/Support/FormatVariadicDetails.h | 34 +- llvm/include/llvm/Support/FormattedStream.h | 40 +- llvm/include/llvm/Support/GenericDomTree.h | 66 +- .../llvm/Support/GenericDomTreeConstruction.h | 77 +- .../Support/GenericIteratedDominanceFrontier.h | 20 +- llvm/include/llvm/Support/GlobPattern.h | 4 +- llvm/include/llvm/Support/GraphWriter.h | 20 +- llvm/include/llvm/Support/Host.h | 8 +- .../llvm/Support/ItaniumManglingCanonicalizer.h | 6 +- llvm/include/llvm/Support/JSON.h | 29 +- llvm/include/llvm/Support/KnownBits.h | 93 +- llvm/include/llvm/Support/LEB128.h | 4 +- llvm/include/llvm/Support/LockFileManager.h | 4 +- llvm/include/llvm/Support/LowLevelTypeImpl.h | 28 + llvm/include/llvm/Support/MD5.h | 2 +- llvm/include/llvm/Support/MSVCErrorWorkarounds.h | 9 +- llvm/include/llvm/Support/MachineValueType.h | 489 +- llvm/include/llvm/Support/ManagedStatic.h | 10 +- llvm/include/llvm/Support/MathExtras.h | 77 +- llvm/include/llvm/Support/MemAlloc.h | 23 +- llvm/include/llvm/Support/MemoryBuffer.h | 22 +- llvm/include/llvm/Support/NativeFormatting.h | 3 +- llvm/include/llvm/Support/OptimizedStructLayout.h | 142 + llvm/include/llvm/Support/Parallel.h | 92 +- llvm/include/llvm/Support/Path.h | 42 +- llvm/include/llvm/Support/PointerLikeTypeTraits.h | 21 +- llvm/include/llvm/Support/PrettyStackTrace.h | 7 + llvm/include/llvm/Support/Process.h | 13 +- llvm/include/llvm/Support/Program.h | 28 +- llvm/include/llvm/Support/RISCVAttributeParser.h | 37 + llvm/include/llvm/Support/RISCVAttributes.h | 44 + llvm/include/llvm/Support/Regex.h | 16 +- llvm/include/llvm/Support/SHA1.h | 9 +- llvm/include/llvm/Support/ScaledNumber.h | 4 +- .../include/llvm/Support/SmallVectorMemoryBuffer.h | 2 +- llvm/include/llvm/Support/SourceMgr.h | 98 +- llvm/include/llvm/Support/SpecialCaseList.h | 20 +- llvm/include/llvm/Support/StringPool.h | 139 - llvm/include/llvm/Support/SuffixTree.h | 350 + llvm/include/llvm/Support/SwapByteOrder.h | 81 +- llvm/include/llvm/Support/SystemUtils.h | 7 +- llvm/include/llvm/Support/TargetOpcodes.def | 41 +- llvm/include/llvm/Support/TargetParser.h | 53 +- llvm/include/llvm/Support/TaskQueue.h | 6 +- llvm/include/llvm/Support/ThreadPool.h | 25 +- llvm/include/llvm/Support/Threading.h | 98 +- llvm/include/llvm/Support/TimeProfiler.h | 26 +- llvm/include/llvm/Support/Timer.h | 5 + llvm/include/llvm/Support/ToolOutputFile.h | 11 +- llvm/include/llvm/Support/TrailingObjects.h | 8 +- llvm/include/llvm/Support/TrigramIndex.h | 1 - llvm/include/llvm/Support/TypeSize.h | 70 +- llvm/include/llvm/Support/VersionTuple.h | 9 +- llvm/include/llvm/Support/VirtualFileSystem.h | 23 +- llvm/include/llvm/Support/Windows/WindowsSupport.h | 249 + llvm/include/llvm/Support/WithColor.h | 48 +- .../llvm/Support/X86DisassemblerDecoderCommon.h | 5 +- llvm/include/llvm/Support/X86TargetParser.def | 281 +- llvm/include/llvm/Support/X86TargetParser.h | 148 + llvm/include/llvm/Support/YAMLParser.h | 2 +- llvm/include/llvm/Support/YAMLTraits.h | 127 +- llvm/include/llvm/Support/circular_raw_ostream.h | 4 +- llvm/include/llvm/Support/raw_ostream.h | 93 +- llvm/include/llvm/Support/type_traits.h | 13 +- llvm/include/llvm/TableGen/Main.h | 2 +- llvm/include/llvm/TableGen/Record.h | 22 +- llvm/include/llvm/TableGen/StringToOffsetTable.h | 2 +- llvm/include/llvm/Target/GenericOpcodes.td | 110 +- llvm/include/llvm/Target/GlobalISel/Combine.td | 139 +- .../llvm/Target/GlobalISel/SelectionDAGCompat.td | 14 + llvm/include/llvm/Target/GlobalISel/Target.td | 9 +- llvm/include/llvm/Target/Target.td | 77 +- llvm/include/llvm/Target/TargetCallingConv.td | 5 + llvm/include/llvm/Target/TargetIntrinsicInfo.h | 1 - llvm/include/llvm/Target/TargetItinerary.td | 2 +- .../include/llvm/Target/TargetLoweringObjectFile.h | 66 +- llvm/include/llvm/Target/TargetMachine.h | 35 +- llvm/include/llvm/Target/TargetOptions.h | 94 +- llvm/include/llvm/Target/TargetSchedule.td | 4 +- llvm/include/llvm/Target/TargetSelectionDAG.td | 76 +- llvm/include/llvm/Testing/Support/Annotations.h | 2 + llvm/include/llvm/Testing/Support/Error.h | 42 + llvm/include/llvm/TextAPI/ELF/TBEHandler.h | 1 - llvm/include/llvm/TextAPI/MachO/Architecture.def | 27 +- llvm/include/llvm/TextAPI/MachO/Architecture.h | 14 +- llvm/include/llvm/TextAPI/MachO/ArchitectureSet.h | 5 +- llvm/include/llvm/TextAPI/MachO/InterfaceFile.h | 31 +- llvm/include/llvm/TextAPI/MachO/PackedVersion.h | 7 +- llvm/include/llvm/TextAPI/MachO/TextAPIReader.h | 4 +- llvm/include/llvm/TextAPI/MachO/TextAPIWriter.h | 6 +- .../llvm/Transforms/Coroutines/CoroCleanup.h | 28 + .../include/llvm/Transforms/Coroutines/CoroEarly.h | 31 + .../include/llvm/Transforms/Coroutines/CoroElide.h | 30 + .../include/llvm/Transforms/Coroutines/CoroSplit.h | 30 + llvm/include/llvm/Transforms/IPO.h | 24 +- .../llvm/Transforms/IPO/ArgumentPromotion.h | 12 + llvm/include/llvm/Transforms/IPO/Attributor.h | 1586 +- llvm/include/llvm/Transforms/IPO/FunctionImport.h | 10 +- llvm/include/llvm/Transforms/IPO/Inliner.h | 49 +- llvm/include/llvm/Transforms/IPO/LowerTypeTests.h | 7 +- llvm/include/llvm/Transforms/IPO/OpenMPOpt.h | 66 + .../llvm/Transforms/IPO/PassManagerBuilder.h | 39 +- .../Transforms/IPO/SyntheticCountsPropagation.h | 12 +- .../llvm/Transforms/IPO/WholeProgramDevirt.h | 5 + .../llvm/Transforms/InstCombine/InstCombine.h | 16 +- .../Transforms/InstCombine/InstCombineWorklist.h | 90 +- llvm/include/llvm/Transforms/Instrumentation.h | 25 +- .../Transforms/Instrumentation/AddressSanitizer.h | 2 +- .../Instrumentation/AddressSanitizerCommon.h | 49 + .../llvm/Transforms/Instrumentation/CGProfile.h | 5 - .../Transforms/Instrumentation/InstrProfiling.h | 3 + .../Transforms/Instrumentation/SanitizerCoverage.h | 25 +- llvm/include/llvm/Transforms/Scalar.h | 4 - .../Transforms/Scalar/AlignmentFromAssumptions.h | 14 +- llvm/include/llvm/Transforms/Scalar/Float2Int.h | 8 +- llvm/include/llvm/Transforms/Scalar/GVN.h | 58 +- .../include/llvm/Transforms/Scalar/GVNExpression.h | 9 +- .../Scalar/InductiveRangeCheckElimination.h | 4 +- .../include/llvm/Transforms/Scalar/JumpThreading.h | 11 +- .../llvm/Transforms/Scalar/LoopPassManager.h | 57 +- .../llvm/Transforms/Scalar/LoopUnrollAndJamPass.h | 3 - .../llvm/Transforms/Scalar/MemCpyOptimizer.h | 11 +- llvm/include/llvm/Transforms/Scalar/Reassociate.h | 4 +- llvm/include/llvm/Transforms/Utils.h | 37 +- .../llvm/Transforms/Utils/AMDGPUEmitPrintf.h | 25 + .../llvm/Transforms/Utils/AssumeBundleBuilder.h | 60 + .../llvm/Transforms/Utils/BasicBlockUtils.h | 100 +- llvm/include/llvm/Transforms/Utils/BuildLibCalls.h | 103 +- .../llvm/Transforms/Utils/CallGraphUpdater.h | 109 + .../llvm/Transforms/Utils/CallPromotionUtils.h | 39 +- .../Transforms/Utils/CanonicalizeFreezeInLoops.h | 33 + llvm/include/llvm/Transforms/Utils/Cloning.h | 24 +- llvm/include/llvm/Transforms/Utils/CodeExtractor.h | 6 +- .../include/llvm/Transforms/Utils/CodeMoverUtils.h | 41 +- llvm/include/llvm/Transforms/Utils/Debugify.h | 22 + llvm/include/llvm/Transforms/Utils/Evaluator.h | 20 +- .../llvm/Transforms/Utils/FunctionComparator.h | 2 +- .../llvm/Transforms/Utils/FunctionImportUtils.h | 23 +- llvm/include/llvm/Transforms/Utils/Local.h | 102 +- llvm/include/llvm/Transforms/Utils/LoopSimplify.h | 8 +- llvm/include/llvm/Transforms/Utils/LoopUtils.h | 156 +- .../include/llvm/Transforms/Utils/LoopVersioning.h | 20 +- .../llvm/Transforms/Utils/LowerMemIntrinsics.h | 6 +- llvm/include/llvm/Transforms/Utils/ModuleUtils.h | 8 +- llvm/include/llvm/Transforms/Utils/PredicateInfo.h | 85 +- .../llvm/Transforms/Utils/PromoteMemToReg.h | 1 - .../include/llvm/Transforms/Utils/SSAUpdaterBulk.h | 1 - .../Transforms/Utils/ScalarEvolutionExpander.h | 435 + .../include/llvm/Transforms/Utils/SimplifyIndVar.h | 7 +- .../llvm/Transforms/Utils/SimplifyLibCalls.h | 169 +- llvm/include/llvm/Transforms/Utils/SizeOpts.h | 67 +- .../llvm/Transforms/Utils/UnifyFunctionExitNodes.h | 3 +- .../Transforms/Utils/UniqueInternalLinkageNames.h | 31 + llvm/include/llvm/Transforms/Utils/UnrollLoop.h | 46 +- llvm/include/llvm/Transforms/Utils/VNCoercion.h | 6 +- llvm/include/llvm/Transforms/Vectorize.h | 6 + .../Vectorize/LoopVectorizationLegality.h | 20 +- .../llvm/Transforms/Vectorize/LoopVectorize.h | 32 +- .../llvm/Transforms/Vectorize/SLPVectorizer.h | 13 +- .../llvm/Transforms/Vectorize/VectorCombine.h | 30 + llvm/include/llvm/XRay/Graph.h | 24 +- llvm/include/llvm/XRay/InstrumentationMap.h | 4 + llvm/include/llvm/module.modulemap | 25 +- llvm/lib/Analysis/AliasAnalysis.cpp | 14 +- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp | 2 +- llvm/lib/Analysis/AliasAnalysisSummary.cpp | 1 + llvm/lib/Analysis/AliasAnalysisSummary.h | 5 +- llvm/lib/Analysis/AliasSetTracker.cpp | 2 +- llvm/lib/Analysis/AssumeBundleQueries.cpp | 213 + llvm/lib/Analysis/AssumptionCache.cpp | 64 +- llvm/lib/Analysis/BasicAliasAnalysis.cpp | 82 +- llvm/lib/Analysis/BlockFrequencyInfo.cpp | 7 +- llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp | 17 +- llvm/lib/Analysis/BranchProbabilityInfo.cpp | 265 +- llvm/lib/Analysis/CFG.cpp | 8 +- llvm/lib/Analysis/CFGPrinter.cpp | 309 +- llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp | 2 +- llvm/lib/Analysis/CGSCCPassManager.cpp | 169 +- llvm/lib/Analysis/CallGraph.cpp | 72 +- llvm/lib/Analysis/CallGraphSCCPass.cpp | 74 +- llvm/lib/Analysis/CallPrinter.cpp | 272 +- llvm/lib/Analysis/CaptureTracking.cpp | 48 +- llvm/lib/Analysis/CodeMetrics.cpp | 5 +- llvm/lib/Analysis/ConstantFolding.cpp | 527 +- llvm/lib/Analysis/DDG.cpp | 46 +- llvm/lib/Analysis/DependenceAnalysis.cpp | 160 +- llvm/lib/Analysis/DependenceGraphBuilder.cpp | 104 + llvm/lib/Analysis/DivergenceAnalysis.cpp | 40 +- llvm/lib/Analysis/DomPrinter.cpp | 8 +- llvm/lib/Analysis/DomTreeUpdater.cpp | 6 +- llvm/lib/Analysis/GlobalsModRef.cpp | 12 +- llvm/lib/Analysis/GuardUtils.cpp | 8 +- llvm/lib/Analysis/HeatUtils.cpp | 78 + llvm/lib/Analysis/IVDescriptors.cpp | 1 + .../lib/Analysis/IndirectCallPromotionAnalysis.cpp | 1 - llvm/lib/Analysis/InlineAdvisor.cpp | 408 + llvm/lib/Analysis/InlineCost.cpp | 479 +- llvm/lib/Analysis/InlineFeaturesAnalysis.cpp | 41 + llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 299 + .../lib/Analysis/InstructionPrecedenceTracking.cpp | 27 +- llvm/lib/Analysis/InstructionSimplify.cpp | 401 +- llvm/lib/Analysis/LazyCallGraph.cpp | 57 +- llvm/lib/Analysis/LazyValueInfo.cpp | 1021 +- llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp | 9 +- llvm/lib/Analysis/Lint.cpp | 135 +- llvm/lib/Analysis/Loads.cpp | 129 +- llvm/lib/Analysis/LoopAccessAnalysis.cpp | 254 +- llvm/lib/Analysis/LoopAnalysisManager.cpp | 1 + llvm/lib/Analysis/LoopCacheAnalysis.cpp | 46 +- llvm/lib/Analysis/LoopInfo.cpp | 11 +- llvm/lib/Analysis/LoopNestAnalysis.cpp | 296 + llvm/lib/Analysis/LoopPass.cpp | 37 +- llvm/lib/Analysis/LoopUnrollAnalyzer.cpp | 1 + llvm/lib/Analysis/MLInlineAdvisor.cpp | 301 + llvm/lib/Analysis/MemDepPrinter.cpp | 2 + llvm/lib/Analysis/MemDerefPrinter.cpp | 3 +- llvm/lib/Analysis/MemoryBuiltins.cpp | 70 +- llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 220 +- llvm/lib/Analysis/MemoryLocation.cpp | 17 + llvm/lib/Analysis/MemorySSA.cpp | 16 +- llvm/lib/Analysis/MemorySSAUpdater.cpp | 14 +- llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 97 +- llvm/lib/Analysis/MustExecute.cpp | 175 +- llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp | 4 +- llvm/lib/Analysis/ObjCARCInstKind.cpp | 8 +- llvm/lib/Analysis/OptimizationRemarkEmitter.cpp | 7 +- llvm/lib/Analysis/OrderedBasicBlock.cpp | 111 - llvm/lib/Analysis/OrderedInstructions.cpp | 50 - llvm/lib/Analysis/ProfileSummaryInfo.cpp | 279 +- llvm/lib/Analysis/RegionPrinter.cpp | 8 +- llvm/lib/Analysis/ReleaseModeModelRunner.cpp | 87 + llvm/lib/Analysis/ScalarEvolution.cpp | 517 +- llvm/lib/Analysis/ScalarEvolutionDivision.cpp | 259 + llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 2452 -- llvm/lib/Analysis/StackLifetime.cpp | 373 + llvm/lib/Analysis/StackSafetyAnalysis.cpp | 915 +- llvm/lib/Analysis/SyncDependenceAnalysis.cpp | 10 +- llvm/lib/Analysis/SyntheticCountsUtils.cpp | 1 - llvm/lib/Analysis/TFUtils.cpp | 289 + llvm/lib/Analysis/TargetLibraryInfo.cpp | 45 +- llvm/lib/Analysis/TargetTransformInfo.cpp | 717 +- llvm/lib/Analysis/TypeMetadataUtils.cpp | 9 +- llvm/lib/Analysis/VFABIDemangling.cpp | 108 +- llvm/lib/Analysis/ValueLattice.cpp | 12 +- llvm/lib/Analysis/ValueLatticeUtils.cpp | 18 +- llvm/lib/Analysis/ValueTracking.cpp | 1413 +- llvm/lib/Analysis/VectorUtils.cpp | 269 +- llvm/lib/Analysis/models/inliner/saved_model.pbtxt | 32634 +++++++++++++++++++ .../variables/variables.data-00000-of-00001 | Bin 0 -> 39110 bytes .../models/inliner/variables/variables.index | Bin 0 -> 377 bytes llvm/lib/AsmParser/LLLexer.cpp | 20 +- llvm/lib/AsmParser/LLLexer.h | 4 +- llvm/lib/AsmParser/LLParser.cpp | 534 +- llvm/lib/AsmParser/LLParser.h | 36 +- llvm/lib/AsmParser/LLToken.h | 8 + llvm/lib/AsmParser/Parser.cpp | 101 +- llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp | 20 +- llvm/lib/BinaryFormat/Dwarf.cpp | 33 + llvm/lib/BinaryFormat/MachO.cpp | 109 + llvm/lib/BinaryFormat/Magic.cpp | 3 +- llvm/lib/BinaryFormat/MsgPackDocument.cpp | 122 +- llvm/lib/BinaryFormat/Wasm.cpp | 4 + llvm/lib/BinaryFormat/XCOFF.cpp | 80 +- llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp | 15 +- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 404 +- llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 90 +- llvm/lib/Bitcode/Reader/MetadataLoader.h | 2 - llvm/lib/Bitcode/Reader/ValueList.cpp | 2 +- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 170 +- llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 49 +- llvm/lib/Bitcode/Writer/ValueEnumerator.h | 2 - llvm/lib/Bitstream/Reader/BitstreamReader.cpp | 18 +- llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp | 11 +- llvm/lib/CodeGen/AggressiveAntiDepBreaker.h | 2 +- llvm/lib/CodeGen/AllocationOrder.h | 3 +- llvm/lib/CodeGen/Analysis.cpp | 84 +- llvm/lib/CodeGen/AntiDepBreaker.h | 87 - llvm/lib/CodeGen/AsmPrinter/ARMException.cpp | 12 +- llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | 42 +- llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp | 10 +- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 919 +- llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 77 +- .../lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 13 +- llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h | 24 +- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 264 +- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | 13 +- llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 90 +- llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp | 9 +- llvm/lib/CodeGen/AsmPrinter/DIEHash.h | 1 - .../AsmPrinter/DbgEntityHistoryCalculator.cpp | 3 +- llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp | 39 +- llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | 23 +- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 203 +- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 34 +- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 890 +- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 24 +- llvm/lib/CodeGen/AsmPrinter/DwarfException.h | 3 + llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | 134 +- llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h | 74 +- llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 2 +- llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp | 8 +- llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 69 +- llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h | 1 - llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp | 50 +- llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp | 4 +- llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | 12 +- llvm/lib/CodeGen/AsmPrinter/WasmException.cpp | 4 +- llvm/lib/CodeGen/AsmPrinter/WinException.cpp | 129 +- llvm/lib/CodeGen/AsmPrinter/WinException.h | 2 - llvm/lib/CodeGen/AtomicExpandPass.cpp | 345 +- llvm/lib/CodeGen/BBSectionsPrepare.cpp | 457 + llvm/lib/CodeGen/BranchFolding.cpp | 172 +- llvm/lib/CodeGen/BranchFolding.h | 31 +- llvm/lib/CodeGen/BranchRelaxation.cpp | 16 +- llvm/lib/CodeGen/BreakFalseDeps.cpp | 9 + llvm/lib/CodeGen/CFIInstrInserter.cpp | 191 +- llvm/lib/CodeGen/CalcSpillWeights.cpp | 9 +- llvm/lib/CodeGen/CallingConvLower.cpp | 34 +- llvm/lib/CodeGen/CodeGen.cpp | 5 + llvm/lib/CodeGen/CodeGenPrepare.cpp | 915 +- llvm/lib/CodeGen/CommandFlags.cpp | 634 + llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp | 9 +- llvm/lib/CodeGen/CriticalAntiDepBreaker.h | 2 +- llvm/lib/CodeGen/DwarfEHPrepare.cpp | 19 +- llvm/lib/CodeGen/EarlyIfConversion.cpp | 19 +- llvm/lib/CodeGen/EdgeBundles.cpp | 1 + llvm/lib/CodeGen/ExpandMemCmp.cpp | 185 +- llvm/lib/CodeGen/ExpandReductions.cpp | 6 +- llvm/lib/CodeGen/FEntryInserter.cpp | 4 +- llvm/lib/CodeGen/FaultMaps.cpp | 22 +- llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp | 311 + llvm/lib/CodeGen/GCMetadata.cpp | 2 +- llvm/lib/CodeGen/GCRootLowering.cpp | 14 +- llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp | 60 +- llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp | 2 +- llvm/lib/CodeGen/GlobalISel/CallLowering.cpp | 109 +- llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 576 +- .../lib/CodeGen/GlobalISel/GISelChangeObserver.cpp | 8 + llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp | 263 +- llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 517 +- llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp | 667 + llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | 15 +- .../lib/CodeGen/GlobalISel/InstructionSelector.cpp | 2 +- llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp | 38 +- llvm/lib/CodeGen/GlobalISel/Legalizer.cpp | 72 +- llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 2005 +- llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp | 22 +- llvm/lib/CodeGen/GlobalISel/Localizer.cpp | 65 +- .../CodeGen/GlobalISel/LostDebugLocObserver.cpp | 113 + llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp | 177 +- llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 9 + llvm/lib/CodeGen/GlobalISel/Utils.cpp | 266 +- llvm/lib/CodeGen/GlobalMerge.cpp | 7 +- llvm/lib/CodeGen/HardwareLoops.cpp | 23 +- llvm/lib/CodeGen/IfConversion.cpp | 38 +- llvm/lib/CodeGen/ImplicitNullChecks.cpp | 8 +- llvm/lib/CodeGen/InlineSpiller.cpp | 158 +- llvm/lib/CodeGen/InterferenceCache.h | 2 - llvm/lib/CodeGen/InterleavedAccessPass.cpp | 10 +- llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp | 26 +- llvm/lib/CodeGen/IntrinsicLowering.cpp | 19 +- llvm/lib/CodeGen/LLVMTargetMachine.cpp | 3 - llvm/lib/CodeGen/LexicalScopes.cpp | 55 +- llvm/lib/CodeGen/LiveDebugValues.cpp | 799 +- llvm/lib/CodeGen/LiveDebugVariables.cpp | 334 +- llvm/lib/CodeGen/LiveDebugVariables.h | 2 +- llvm/lib/CodeGen/LiveIntervalCalc.cpp | 205 + llvm/lib/CodeGen/LiveIntervals.cpp | 102 +- llvm/lib/CodeGen/LivePhysRegs.cpp | 13 + llvm/lib/CodeGen/LiveRangeCalc.cpp | 154 +- llvm/lib/CodeGen/LiveRangeEdit.cpp | 27 +- llvm/lib/CodeGen/LiveRangeShrink.cpp | 3 +- llvm/lib/CodeGen/LiveVariables.cpp | 28 + llvm/lib/CodeGen/LocalStackSlotAllocation.cpp | 30 +- llvm/lib/CodeGen/LowLevelType.cpp | 2 +- llvm/lib/CodeGen/LowerEmuTLS.cpp | 19 +- llvm/lib/CodeGen/MBFIWrapper.cpp | 49 + llvm/lib/CodeGen/MIRCanonicalizerPass.cpp | 4 +- llvm/lib/CodeGen/MIRParser/MILexer.cpp | 23 +- llvm/lib/CodeGen/MIRParser/MILexer.h | 3 +- llvm/lib/CodeGen/MIRParser/MIParser.cpp | 104 +- llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 63 +- llvm/lib/CodeGen/MIRPrinter.cpp | 72 +- llvm/lib/CodeGen/MIRVRegNamerUtils.cpp | 8 +- llvm/lib/CodeGen/MIRVRegNamerUtils.h | 18 +- llvm/lib/CodeGen/MachineBasicBlock.cpp | 247 +- llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 6 + llvm/lib/CodeGen/MachineBlockPlacement.cpp | 298 +- llvm/lib/CodeGen/MachineCSE.cpp | 15 +- llvm/lib/CodeGen/MachineCombiner.cpp | 8 +- llvm/lib/CodeGen/MachineCopyPropagation.cpp | 4 +- llvm/lib/CodeGen/MachineDebugify.cpp | 172 + llvm/lib/CodeGen/MachineFrameInfo.cpp | 28 +- llvm/lib/CodeGen/MachineFunction.cpp | 174 +- llvm/lib/CodeGen/MachineInstr.cpp | 142 +- llvm/lib/CodeGen/MachineInstrBundle.cpp | 29 +- llvm/lib/CodeGen/MachineLICM.cpp | 38 +- llvm/lib/CodeGen/MachineLoopUtils.cpp | 3 +- llvm/lib/CodeGen/MachineModuleInfo.cpp | 61 +- llvm/lib/CodeGen/MachineOperand.cpp | 32 +- .../CodeGen/MachineOptimizationRemarkEmitter.cpp | 2 +- llvm/lib/CodeGen/MachineOutliner.cpp | 658 +- llvm/lib/CodeGen/MachinePipeliner.cpp | 150 +- llvm/lib/CodeGen/MachineRegisterInfo.cpp | 72 +- llvm/lib/CodeGen/MachineSSAUpdater.cpp | 54 +- llvm/lib/CodeGen/MachineScheduler.cpp | 167 +- llvm/lib/CodeGen/MachineSink.cpp | 72 +- llvm/lib/CodeGen/MachineSizeOpts.cpp | 90 +- llvm/lib/CodeGen/MachineStripDebug.cpp | 111 + llvm/lib/CodeGen/MachineVerifier.cpp | 629 +- llvm/lib/CodeGen/ModuloSchedule.cpp | 74 +- llvm/lib/CodeGen/PHIElimination.cpp | 45 +- llvm/lib/CodeGen/PHIEliminationUtils.cpp | 5 +- llvm/lib/CodeGen/ParallelCG.cpp | 2 +- llvm/lib/CodeGen/PatchableFunction.cpp | 4 +- llvm/lib/CodeGen/PeepholeOptimizer.cpp | 23 +- llvm/lib/CodeGen/PostRASchedulerList.cpp | 14 +- llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 4 +- llvm/lib/CodeGen/PrologEpilogInserter.cpp | 73 +- llvm/lib/CodeGen/RDFGraph.cpp | 1837 ++ llvm/lib/CodeGen/RDFLiveness.cpp | 1118 + llvm/lib/CodeGen/RDFRegisters.cpp | 380 + llvm/lib/CodeGen/ReachingDefAnalysis.cpp | 527 +- llvm/lib/CodeGen/RegAllocBase.cpp | 4 +- llvm/lib/CodeGen/RegAllocBase.h | 4 +- llvm/lib/CodeGen/RegAllocBasic.cpp | 26 +- llvm/lib/CodeGen/RegAllocFast.cpp | 223 +- llvm/lib/CodeGen/RegAllocGreedy.cpp | 169 +- llvm/lib/CodeGen/RegAllocPBQP.cpp | 12 +- llvm/lib/CodeGen/RegUsageInfoPropagate.cpp | 11 +- llvm/lib/CodeGen/RegisterCoalescer.cpp | 62 +- llvm/lib/CodeGen/RegisterPressure.cpp | 4 +- llvm/lib/CodeGen/RegisterScavenging.cpp | 6 +- llvm/lib/CodeGen/SafeStack.cpp | 62 +- llvm/lib/CodeGen/SafeStackColoring.cpp | 310 - llvm/lib/CodeGen/SafeStackColoring.h | 165 - llvm/lib/CodeGen/SafeStackLayout.cpp | 10 +- llvm/lib/CodeGen/SafeStackLayout.h | 10 +- llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp | 106 +- llvm/lib/CodeGen/ScheduleDAG.cpp | 8 + llvm/lib/CodeGen/ScheduleDAGInstrs.cpp | 19 +- llvm/lib/CodeGen/ScheduleDAGPrinter.cpp | 2 +- llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp | 13 +- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3368 +- llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 332 +- .../CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 75 +- llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 113 +- llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h | 34 +- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 415 +- .../CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | 479 +- .../CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 311 +- llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | 62 +- llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h | 89 +- .../CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | 58 +- .../lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 202 +- .../CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 687 +- .../CodeGen/SelectionDAG/ResourcePriorityQueue.cpp | 4 + llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 2 +- .../lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 4 +- .../CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 38 +- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h | 2 +- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 1298 +- .../CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 1572 +- .../lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 19 +- .../CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 18 +- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 90 +- .../CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 16 +- .../CodeGen/SelectionDAG/StatepointLowering.cpp | 429 +- llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h | 2 - llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 1486 +- llvm/lib/CodeGen/ShrinkWrap.cpp | 16 +- llvm/lib/CodeGen/SjLjEHPrepare.cpp | 36 +- llvm/lib/CodeGen/SlotIndexes.cpp | 9 +- llvm/lib/CodeGen/Spiller.h | 43 - llvm/lib/CodeGen/SplitKit.cpp | 86 +- llvm/lib/CodeGen/SplitKit.h | 27 +- llvm/lib/CodeGen/StackColoring.cpp | 30 +- llvm/lib/CodeGen/StackMaps.cpp | 72 +- llvm/lib/CodeGen/StackProtector.cpp | 37 +- llvm/lib/CodeGen/StackSlotColoring.cpp | 10 +- llvm/lib/CodeGen/SwiftErrorValueTracking.cpp | 5 +- llvm/lib/CodeGen/SwitchLoweringUtils.cpp | 1 + llvm/lib/CodeGen/TailDuplication.cpp | 6 +- llvm/lib/CodeGen/TailDuplicator.cpp | 109 +- llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | 21 +- llvm/lib/CodeGen/TargetInstrInfo.cpp | 125 +- llvm/lib/CodeGen/TargetLoweringBase.cpp | 347 +- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 454 +- llvm/lib/CodeGen/TargetOptionsImpl.cpp | 6 + llvm/lib/CodeGen/TargetPassConfig.cpp | 161 +- llvm/lib/CodeGen/TargetRegisterInfo.cpp | 74 +- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 33 +- llvm/lib/CodeGen/TypePromotion.cpp | 13 +- llvm/lib/CodeGen/UnreachableBlockElim.cpp | 6 +- llvm/lib/CodeGen/ValueTypes.cpp | 473 +- llvm/lib/CodeGen/VirtRegMap.cpp | 4 +- llvm/lib/CodeGen/WasmEHPrepare.cpp | 169 +- llvm/lib/CodeGen/WinEHPrepare.cpp | 42 +- llvm/lib/CodeGen/XRayInstrumentation.cpp | 135 +- llvm/lib/DWARFLinker/DWARFLinker.cpp | 2575 ++ llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp | 8 + llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp | 8 +- llvm/lib/DWARFLinker/DWARFStreamer.cpp | 774 + .../CodeView/AppendingTypeTableBuilder.cpp | 23 +- llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp | 40 +- .../DebugInfo/CodeView/DebugSubsectionRecord.cpp | 22 +- .../DebugInfo/CodeView/GlobalTypeTableBuilder.cpp | 34 + .../CodeView/LazyRandomTypeCollection.cpp | 5 + .../DebugInfo/CodeView/MergingTypeTableBuilder.cpp | 31 +- llvm/lib/DebugInfo/CodeView/RecordName.cpp | 2 +- .../DebugInfo/CodeView/SimpleTypeSerializer.cpp | 11 + llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp | 39 +- llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp | 23 +- .../lib/DebugInfo/CodeView/TypeTableCollection.cpp | 5 + .../DWARF/DWARFAbbreviationDeclaration.cpp | 36 +- llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp | 92 +- llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp | 14 +- llvm/lib/DebugInfo/DWARF/DWARFContext.cpp | 406 +- llvm/lib/DebugInfo/DWARF/DWARFDataExtractor.cpp | 37 +- llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp | 258 +- llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp | 193 +- llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp | 19 +- llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp | 433 +- llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 783 +- llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 17 +- llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp | 185 +- llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp | 93 +- llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | 33 +- llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp | 231 +- llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp | 70 +- llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp | 50 +- llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp | 23 +- llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | 164 +- llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp | 134 +- llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 82 +- llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp | 572 + llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp | 11 +- llvm/lib/DebugInfo/GSYM/GsymCreator.cpp | 61 +- llvm/lib/DebugInfo/GSYM/GsymReader.cpp | 153 +- llvm/lib/DebugInfo/GSYM/InlineInfo.cpp | 18 +- llvm/lib/DebugInfo/GSYM/LookupResult.cpp | 31 +- llvm/lib/DebugInfo/GSYM/ObjectFileTransformer.cpp | 116 + llvm/lib/DebugInfo/GSYM/Range.cpp | 10 + llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp | 8 +- .../PDB/Native/DbiModuleDescriptorBuilder.cpp | 18 +- llvm/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp | 17 +- llvm/lib/DebugInfo/PDB/Native/EnumTables.cpp | 2 +- llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp | 446 +- .../DebugInfo/PDB/Native/NativeCompilandSymbol.cpp | 4 +- .../PDB/Native/NativeEnumInjectedSources.cpp | 6 +- .../DebugInfo/PDB/Native/NativeEnumLineNumbers.cpp | 42 + llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp | 2 +- .../DebugInfo/PDB/Native/NativeFunctionSymbol.cpp | 57 + llvm/lib/DebugInfo/PDB/Native/NativeLineNumber.cpp | 50 + .../DebugInfo/PDB/Native/NativePublicSymbol.cpp | 52 + llvm/lib/DebugInfo/PDB/Native/NativeSession.cpp | 197 +- llvm/lib/DebugInfo/PDB/Native/NativeSourceFile.cpp | 47 + .../PDB/Native/NativeSymbolEnumerator.cpp | 4 +- llvm/lib/DebugInfo/PDB/Native/NativeTypeArray.cpp | 2 +- llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp | 2 +- .../lib/DebugInfo/PDB/Native/NativeTypeTypedef.cpp | 4 +- llvm/lib/DebugInfo/PDB/Native/NativeTypeUDT.cpp | 2 +- llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 3 +- llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp | 7 +- llvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp | 377 +- llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp | 10 +- llvm/lib/DebugInfo/PDB/PDB.cpp | 19 +- llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp | 4 +- .../DebugInfo/Symbolize/SymbolizableObjectFile.cpp | 62 +- .../DebugInfo/Symbolize/SymbolizableObjectFile.h | 15 +- llvm/lib/DebugInfo/Symbolize/Symbolize.cpp | 51 +- llvm/lib/Demangle/Demangle.cpp | 4 +- llvm/lib/Demangle/ItaniumDemangle.cpp | 6 +- llvm/lib/Demangle/MicrosoftDemangle.cpp | 7 +- llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 89 +- .../ExecutionEngine/ExecutionEngineBindings.cpp | 12 + llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 172 +- .../Interpreter/ExternalFunctions.cpp | 2 +- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h | 14 +- .../JITLink/BasicGOTAndStubsBuilder.h | 30 +- llvm/lib/ExecutionEngine/JITLink/ELF.cpp | 51 + llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp | 463 + llvm/lib/ExecutionEngine/JITLink/JITLink.cpp | 17 +- .../lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp | 119 +- llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h | 109 +- .../JITLink/JITLinkMemoryManager.cpp | 2 +- llvm/lib/ExecutionEngine/JITLink/MachO.cpp | 26 +- .../JITLink/MachOLinkGraphBuilder.cpp | 82 +- .../JITLink/MachOLinkGraphBuilder.h | 28 +- llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp | 34 +- llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp | 131 +- llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 10 +- llvm/lib/ExecutionEngine/MCJIT/MCJIT.h | 5 +- .../ExecutionEngine/Orc/CompileOnDemandLayer.cpp | 139 +- llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp | 33 +- llvm/lib/ExecutionEngine/Orc/Core.cpp | 752 +- llvm/lib/ExecutionEngine/Orc/DebugUtils.cpp | 281 + llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp | 95 +- llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp | 11 +- llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp | 8 +- llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 3 +- .../Orc/JITTargetMachineBuilder.cpp | 76 +- llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | 1048 +- llvm/lib/ExecutionEngine/Orc/Layer.cpp | 142 +- llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp | 110 +- llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp | 506 + llvm/lib/ExecutionEngine/Orc/Mangling.cpp | 160 + .../lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp | 229 +- llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp | 641 +- llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h | 4 +- llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h | 9 +- llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp | 254 + .../Orc/RTDyldObjectLinkingLayer.cpp | 145 +- llvm/lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp | 2 +- llvm/lib/ExecutionEngine/Orc/Speculation.cpp | 2 +- llvm/lib/ExecutionEngine/OrcError/OrcError.cpp | 4 + .../PerfJITEvents/PerfJITEventListener.cpp | 10 +- llvm/lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp | 46 +- .../ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 76 +- .../RuntimeDyld/RuntimeDyldCOFF.cpp | 38 +- .../ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.h | 17 +- .../RuntimeDyld/RuntimeDyldChecker.cpp | 21 +- .../ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 9 +- .../ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h | 5 +- .../ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | 53 +- .../RuntimeDyld/Targets/RuntimeDyldCOFFAArch64.h | 31 +- .../RuntimeDyld/Targets/RuntimeDyldCOFFI386.h | 35 +- .../RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h | 47 +- .../RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h | 31 +- llvm/lib/Frontend/OpenMP/OMPConstants.cpp | 87 - llvm/lib/Frontend/OpenMP/OMPContext.cpp | 527 + llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 780 +- llvm/lib/FuzzMutate/FuzzerCLI.cpp | 7 +- llvm/lib/FuzzMutate/Operations.cpp | 24 +- llvm/lib/IR/AbstractCallSite.cpp | 41 +- llvm/lib/IR/AsmWriter.cpp | 244 +- llvm/lib/IR/AttributeImpl.h | 108 +- llvm/lib/IR/Attributes.cpp | 425 +- llvm/lib/IR/AttributesCompatFunc.td | 1 - llvm/lib/IR/AutoUpgrade.cpp | 419 +- llvm/lib/IR/BasicBlock.cpp | 136 +- llvm/lib/IR/ConstantFold.cpp | 274 +- llvm/lib/IR/ConstantFold.h | 2 +- llvm/lib/IR/ConstantRange.cpp | 22 + llvm/lib/IR/Constants.cpp | 541 +- llvm/lib/IR/ConstantsContext.h | 164 +- llvm/lib/IR/Core.cpp | 43 +- llvm/lib/IR/DIBuilder.cpp | 74 +- llvm/lib/IR/DataLayout.cpp | 79 +- llvm/lib/IR/DebugInfo.cpp | 119 +- llvm/lib/IR/DebugInfoMetadata.cpp | 223 +- llvm/lib/IR/DebugLoc.cpp | 2 +- llvm/lib/IR/DiagnosticInfo.cpp | 40 +- llvm/lib/IR/Dominators.cpp | 39 +- llvm/lib/IR/FPEnv.cpp | 37 +- llvm/lib/IR/Function.cpp | 203 +- llvm/lib/IR/Globals.cpp | 33 +- llvm/lib/IR/IRBuilder.cpp | 580 +- llvm/lib/IR/InlineAsm.cpp | 10 +- llvm/lib/IR/Instruction.cpp | 39 +- llvm/lib/IR/Instructions.cpp | 611 +- llvm/lib/IR/IntrinsicInst.cpp | 239 +- llvm/lib/IR/LLVMContext.cpp | 45 +- llvm/lib/IR/LLVMContextImpl.cpp | 38 +- llvm/lib/IR/LLVMContextImpl.h | 145 +- llvm/lib/IR/LLVMRemarkStreamer.cpp | 174 + llvm/lib/IR/LegacyPassManager.cpp | 321 +- llvm/lib/IR/MDBuilder.cpp | 2 +- llvm/lib/IR/Mangler.cpp | 13 +- llvm/lib/IR/Metadata.cpp | 9 +- llvm/lib/IR/Module.cpp | 109 +- llvm/lib/IR/ModuleSummaryIndex.cpp | 65 +- llvm/lib/IR/Operator.cpp | 108 +- llvm/lib/IR/Pass.cpp | 3 - llvm/lib/IR/PassManager.cpp | 3 +- llvm/lib/IR/PassRegistry.cpp | 2 +- llvm/lib/IR/PassTimingInfo.cpp | 37 +- llvm/lib/IR/ProfileSummary.cpp | 140 +- llvm/lib/IR/RemarkStreamer.cpp | 217 - llvm/lib/IR/SafepointIRVerifier.cpp | 5 +- llvm/lib/IR/Statepoint.cpp | 34 - llvm/lib/IR/SymbolTableListTraitsImpl.h | 15 +- llvm/lib/IR/Type.cpp | 176 +- llvm/lib/IR/Use.cpp | 77 +- llvm/lib/IR/User.cpp | 32 +- llvm/lib/IR/Value.cpp | 162 +- llvm/lib/IR/ValueSymbolTable.cpp | 13 +- llvm/lib/IR/Verifier.cpp | 678 +- llvm/lib/IRReader/IRReader.cpp | 19 +- llvm/lib/LTO/Caching.cpp | 2 +- llvm/lib/LTO/LTO.cpp | 185 +- llvm/lib/LTO/LTOBackend.cpp | 106 +- llvm/lib/LTO/LTOCodeGenerator.cpp | 20 +- llvm/lib/LTO/LTOModule.cpp | 14 +- llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 63 +- llvm/lib/LTO/UpdateCompilerUsed.cpp | 1 + llvm/lib/LineEditor/LineEditor.cpp | 4 +- llvm/lib/Linker/IRMover.cpp | 86 +- llvm/lib/MC/ConstantPools.cpp | 10 +- llvm/lib/MC/ELFObjectWriter.cpp | 20 +- llvm/lib/MC/MCAsmInfo.cpp | 4 +- llvm/lib/MC/MCAsmInfoCOFF.cpp | 4 +- llvm/lib/MC/MCAsmInfoDarwin.cpp | 7 +- llvm/lib/MC/MCAsmInfoXCOFF.cpp | 28 +- llvm/lib/MC/MCAsmStreamer.cpp | 535 +- llvm/lib/MC/MCAssembler.cpp | 211 +- llvm/lib/MC/MCCodeView.cpp | 52 +- llvm/lib/MC/MCContext.cpp | 205 +- llvm/lib/MC/MCDisassembler/MCDisassembler.cpp | 60 +- llvm/lib/MC/MCDwarf.cpp | 706 +- llvm/lib/MC/MCELFStreamer.cpp | 73 +- llvm/lib/MC/MCExpr.cpp | 84 +- llvm/lib/MC/MCFragment.cpp | 29 +- llvm/lib/MC/MCInstPrinter.cpp | 26 +- llvm/lib/MC/MCInstrAnalysis.cpp | 13 +- llvm/lib/MC/MCInstrDesc.cpp | 11 - llvm/lib/MC/MCInstrInfo.cpp | 27 + llvm/lib/MC/MCMachOStreamer.cpp | 131 +- llvm/lib/MC/MCNullStreamer.cpp | 10 +- llvm/lib/MC/MCObjectFileInfo.cpp | 70 +- llvm/lib/MC/MCObjectStreamer.cpp | 228 +- llvm/lib/MC/MCParser/AsmLexer.cpp | 25 +- llvm/lib/MC/MCParser/AsmParser.cpp | 253 +- llvm/lib/MC/MCParser/COFFAsmParser.cpp | 14 +- llvm/lib/MC/MCParser/COFFMasmParser.cpp | 386 + llvm/lib/MC/MCParser/DarwinAsmParser.cpp | 38 +- llvm/lib/MC/MCParser/ELFAsmParser.cpp | 108 +- llvm/lib/MC/MCParser/MCAsmParser.cpp | 5 + llvm/lib/MC/MCParser/MCAsmParserExtension.cpp | 43 + llvm/lib/MC/MCParser/MasmParser.cpp | 6876 ++++ llvm/lib/MC/MCParser/WasmAsmParser.cpp | 4 +- llvm/lib/MC/MCSection.cpp | 10 +- llvm/lib/MC/MCSectionCOFF.cpp | 12 +- llvm/lib/MC/MCSectionELF.cpp | 14 +- llvm/lib/MC/MCSectionMachO.cpp | 9 +- llvm/lib/MC/MCSectionWasm.cpp | 7 +- llvm/lib/MC/MCSectionXCOFF.cpp | 10 +- llvm/lib/MC/MCStreamer.cpp | 423 +- llvm/lib/MC/MCSubtargetInfo.cpp | 39 +- llvm/lib/MC/MCSymbolXCOFF.cpp | 39 + llvm/lib/MC/MCTargetOptions.cpp | 6 +- llvm/lib/MC/MCTargetOptionsCommandFlags.cpp | 114 + llvm/lib/MC/MCWasmStreamer.cpp | 44 +- llvm/lib/MC/MCWin64EH.cpp | 130 +- llvm/lib/MC/MCWinCOFFStreamer.cpp | 69 +- llvm/lib/MC/MCXCOFFStreamer.cpp | 62 +- llvm/lib/MC/MachObjectWriter.cpp | 6 +- llvm/lib/MC/SubtargetFeature.cpp | 4 +- llvm/lib/MC/WasmObjectWriter.cpp | 360 +- llvm/lib/MC/WinCOFFObjectWriter.cpp | 82 +- llvm/lib/MC/XCOFFObjectWriter.cpp | 281 +- llvm/lib/MCA/CodeEmitter.cpp | 2 +- llvm/lib/MCA/HardwareUnits/LSUnit.cpp | 84 +- llvm/lib/MCA/InstrBuilder.cpp | 25 +- llvm/lib/Object/Archive.cpp | 14 +- llvm/lib/Object/ArchiveWriter.cpp | 14 +- llvm/lib/Object/COFFImportFile.cpp | 2 +- llvm/lib/Object/COFFModuleDefinition.cpp | 8 +- llvm/lib/Object/COFFObjectFile.cpp | 573 +- llvm/lib/Object/ELF.cpp | 30 +- llvm/lib/Object/ELFObjectFile.cpp | 101 +- llvm/lib/Object/Error.cpp | 6 +- llvm/lib/Object/IRObjectFile.cpp | 3 +- llvm/lib/Object/IRSymtab.cpp | 8 +- llvm/lib/Object/MachOObjectFile.cpp | 41 +- llvm/lib/Object/ModuleSymbolTable.cpp | 8 +- llvm/lib/Object/ObjectFile.cpp | 30 +- llvm/lib/Object/RecordStreamer.cpp | 22 +- llvm/lib/Object/RecordStreamer.h | 15 +- llvm/lib/Object/RelocationResolver.cpp | 50 + llvm/lib/Object/SymbolSize.cpp | 13 +- llvm/lib/Object/TapiFile.cpp | 22 +- llvm/lib/Object/TapiUniversal.cpp | 17 +- llvm/lib/Object/WasmObjectFile.cpp | 229 +- llvm/lib/Object/WindowsResource.cpp | 10 +- llvm/lib/Object/XCOFFObjectFile.cpp | 110 +- llvm/lib/ObjectYAML/COFFEmitter.cpp | 4 +- llvm/lib/ObjectYAML/DWARFEmitter.cpp | 274 +- llvm/lib/ObjectYAML/DWARFVisitor.cpp | 29 +- llvm/lib/ObjectYAML/DWARFVisitor.h | 3 +- llvm/lib/ObjectYAML/DWARFYAML.cpp | 110 +- llvm/lib/ObjectYAML/ELFEmitter.cpp | 1035 +- llvm/lib/ObjectYAML/ELFYAML.cpp | 157 +- llvm/lib/ObjectYAML/MachOEmitter.cpp | 159 +- llvm/lib/ObjectYAML/MachOYAML.cpp | 15 + llvm/lib/ObjectYAML/WasmEmitter.cpp | 39 +- llvm/lib/ObjectYAML/WasmYAML.cpp | 27 +- llvm/lib/ObjectYAML/yaml2obj.cpp | 4 +- llvm/lib/Option/Arg.cpp | 2 +- llvm/lib/Option/ArgList.cpp | 2 +- llvm/lib/Option/OptTable.cpp | 6 +- llvm/lib/Passes/PassBuilder.cpp | 639 +- llvm/lib/Passes/PassRegistry.def | 46 +- llvm/lib/Passes/StandardInstrumentations.cpp | 20 +- llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 5 +- .../ProfileData/Coverage/CoverageMappingReader.cpp | 377 +- .../ProfileData/Coverage/CoverageMappingWriter.cpp | 34 +- llvm/lib/ProfileData/GCOV.cpp | 592 +- llvm/lib/ProfileData/InstrProf.cpp | 8 +- llvm/lib/ProfileData/InstrProfReader.cpp | 7 +- llvm/lib/ProfileData/ProfileSummaryBuilder.cpp | 13 + llvm/lib/ProfileData/SampleProf.cpp | 1 + llvm/lib/ProfileData/SampleProfReader.cpp | 117 +- llvm/lib/ProfileData/SampleProfWriter.cpp | 32 +- llvm/lib/Remarks/BitstreamRemarkParser.cpp | 2 +- llvm/lib/Remarks/Remark.cpp | 3 +- llvm/lib/Remarks/RemarkLinker.cpp | 2 +- llvm/lib/Remarks/RemarkStreamer.cpp | 72 + llvm/lib/Remarks/RemarkStringTable.cpp | 4 +- llvm/lib/Remarks/YAMLRemarkParser.cpp | 1 - llvm/lib/Remarks/YAMLRemarkParser.h | 2 +- llvm/lib/Support/AArch64TargetParser.cpp | 10 +- llvm/lib/Support/AMDGPUMetadata.cpp | 6 +- llvm/lib/Support/APFloat.cpp | 446 +- llvm/lib/Support/APInt.cpp | 25 +- llvm/lib/Support/APSInt.cpp | 9 +- llvm/lib/Support/ARMAttributeParser.cpp | 848 +- llvm/lib/Support/ARMBuildAttrs.cpp | 140 +- llvm/lib/Support/ARMTargetParser.cpp | 42 +- llvm/lib/Support/BranchProbability.cpp | 2 +- llvm/lib/Support/CRC.cpp | 12 +- llvm/lib/Support/CachePruning.cpp | 2 +- llvm/lib/Support/CodeGenCoverage.cpp | 17 +- llvm/lib/Support/CommandLine.cpp | 170 +- llvm/lib/Support/Compression.cpp | 8 +- llvm/lib/Support/ConvertUTFWrapper.cpp | 2 +- llvm/lib/Support/CrashRecoveryContext.cpp | 91 +- llvm/lib/Support/DataExtractor.cpp | 164 +- llvm/lib/Support/Debug.cpp | 2 +- llvm/lib/Support/DebugCounter.cpp | 8 +- llvm/lib/Support/ELFAttributeParser.cpp | 233 + llvm/lib/Support/ELFAttributes.cpp | 34 + llvm/lib/Support/ErrorHandling.cpp | 3 +- llvm/lib/Support/ExtensibleRTTI.cpp | 13 + llvm/lib/Support/FileCheck.cpp | 928 +- llvm/lib/Support/FileCheckImpl.h | 349 +- llvm/lib/Support/FileCollector.cpp | 67 +- llvm/lib/Support/FileOutputBuffer.cpp | 6 +- llvm/lib/Support/FileUtilities.cpp | 10 +- llvm/lib/Support/FoldingSet.cpp | 51 +- llvm/lib/Support/FormatVariadic.cpp | 5 +- llvm/lib/Support/FormattedStream.cpp | 66 +- llvm/lib/Support/GraphWriter.cpp | 31 +- llvm/lib/Support/Host.cpp | 552 +- llvm/lib/Support/InitLLVM.cpp | 2 +- llvm/lib/Support/IntEqClasses.cpp | 1 + llvm/lib/Support/IntervalMap.cpp | 1 + llvm/lib/Support/ItaniumManglingCanonicalizer.cpp | 11 +- llvm/lib/Support/KnownBits.cpp | 26 + llvm/lib/Support/LockFileManager.cpp | 80 +- llvm/lib/Support/MD5.cpp | 1 + llvm/lib/Support/MemAlloc.cpp | 34 + llvm/lib/Support/MemoryBuffer.cpp | 18 +- llvm/lib/Support/NativeFormatting.cpp | 5 +- llvm/lib/Support/OptimizedStructLayout.cpp | 449 + llvm/lib/Support/Parallel.cpp | 27 +- llvm/lib/Support/Path.cpp | 154 +- llvm/lib/Support/PrettyStackTrace.cpp | 15 + llvm/lib/Support/Process.cpp | 12 +- llvm/lib/Support/Program.cpp | 27 +- llvm/lib/Support/RISCVAttributeParser.cpp | 67 + llvm/lib/Support/RISCVAttributes.cpp | 25 + llvm/lib/Support/RandomNumberGenerator.cpp | 2 +- llvm/lib/Support/Regex.cpp | 8 +- llvm/lib/Support/SHA1.cpp | 11 +- llvm/lib/Support/Signals.cpp | 2 +- llvm/lib/Support/SmallVector.cpp | 47 +- llvm/lib/Support/SourceMgr.cpp | 254 +- llvm/lib/Support/SpecialCaseList.cpp | 6 +- llvm/lib/Support/Statistic.cpp | 2 +- llvm/lib/Support/StringExtras.cpp | 45 + llvm/lib/Support/StringMap.cpp | 52 +- llvm/lib/Support/StringPool.cpp | 34 - llvm/lib/Support/StringRef.cpp | 16 +- llvm/lib/Support/SuffixTree.cpp | 210 + llvm/lib/Support/SystemUtils.cpp | 13 +- llvm/lib/Support/TarWriter.cpp | 15 +- llvm/lib/Support/TargetParser.cpp | 10 +- llvm/lib/Support/ThreadPool.cpp | 46 +- llvm/lib/Support/Threading.cpp | 67 +- llvm/lib/Support/TimeProfiler.cpp | 214 +- llvm/lib/Support/Timer.cpp | 7 +- llvm/lib/Support/ToolOutputFile.cpp | 28 +- llvm/lib/Support/TrigramIndex.cpp | 1 + llvm/lib/Support/Triple.cpp | 92 +- llvm/lib/Support/Unix/Host.inc | 2 +- llvm/lib/Support/Unix/Memory.inc | 1 + llvm/lib/Support/Unix/Path.inc | 111 +- llvm/lib/Support/Unix/Process.inc | 26 +- llvm/lib/Support/Unix/Program.inc | 87 +- llvm/lib/Support/Unix/Threading.inc | 35 + llvm/lib/Support/Unix/Unix.h | 4 - llvm/lib/Support/VersionTuple.cpp | 3 + llvm/lib/Support/VirtualFileSystem.cpp | 146 +- llvm/lib/Support/Windows/DynamicLibrary.inc | 2 +- llvm/lib/Support/Windows/Host.inc | 2 +- llvm/lib/Support/Windows/Memory.inc | 2 +- llvm/lib/Support/Windows/Path.inc | 117 +- llvm/lib/Support/Windows/Process.inc | 48 +- llvm/lib/Support/Windows/Program.inc | 30 +- llvm/lib/Support/Windows/Signals.inc | 28 +- llvm/lib/Support/Windows/ThreadLocal.inc | 2 +- llvm/lib/Support/Windows/Threading.inc | 176 +- llvm/lib/Support/Windows/WindowsSupport.h | 243 - llvm/lib/Support/WithColor.cpp | 48 +- llvm/lib/Support/X86TargetParser.cpp | 595 + llvm/lib/Support/YAMLParser.cpp | 24 +- llvm/lib/Support/YAMLTraits.cpp | 8 +- llvm/lib/Support/Z3Solver.cpp | 40 +- llvm/lib/Support/raw_ostream.cpp | 194 +- llvm/lib/TableGen/Main.cpp | 2 +- llvm/lib/TableGen/Record.cpp | 32 +- llvm/lib/TableGen/SetTheory.cpp | 2 +- llvm/lib/TableGen/TGLexer.cpp | 1 + llvm/lib/TableGen/TGLexer.h | 4 +- llvm/lib/TableGen/TGParser.cpp | 294 +- llvm/lib/TableGen/TGParser.h | 12 +- llvm/lib/TableGen/TableGenBackend.cpp | 1 + llvm/lib/Target/AArch64/AArch64.h | 9 +- llvm/lib/Target/AArch64/AArch64.td | 174 +- llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp | 182 +- llvm/lib/Target/AArch64/AArch64BranchTargets.cpp | 12 +- llvm/lib/Target/AArch64/AArch64CallLowering.cpp | 1029 - llvm/lib/Target/AArch64/AArch64CallLowering.h | 82 - .../Target/AArch64/AArch64CallingConvention.cpp | 15 +- .../lib/Target/AArch64/AArch64CallingConvention.td | 145 +- .../AArch64/AArch64CleanupLocalDynamicTLSPass.cpp | 4 + llvm/lib/Target/AArch64/AArch64CollectLOH.cpp | 21 +- llvm/lib/Target/AArch64/AArch64Combine.td | 68 +- .../Target/AArch64/AArch64CompressJumpTables.cpp | 2 +- llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp | 16 +- .../Target/AArch64/AArch64ConditionOptimizer.cpp | 37 +- .../Target/AArch64/AArch64ConditionalCompares.cpp | 14 +- .../Target/AArch64/AArch64ExpandPseudoInsts.cpp | 327 +- llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp | 3 - llvm/lib/Target/AArch64/AArch64FastISel.cpp | 15 +- llvm/lib/Target/AArch64/AArch64FrameLowering.cpp | 702 +- llvm/lib/Target/AArch64/AArch64FrameLowering.h | 30 +- llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | 743 +- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 3009 +- llvm/lib/Target/AArch64/AArch64ISelLowering.h | 236 +- llvm/lib/Target/AArch64/AArch64InstrFormats.td | 560 +- llvm/lib/Target/AArch64/AArch64InstrGISel.td | 124 + llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 557 +- llvm/lib/Target/AArch64/AArch64InstrInfo.h | 99 +- llvm/lib/Target/AArch64/AArch64InstrInfo.td | 632 +- .../Target/AArch64/AArch64InstructionSelector.cpp | 4918 --- llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp | 771 - llvm/lib/Target/AArch64/AArch64LegalizerInfo.h | 48 - .../Target/AArch64/AArch64LoadStoreOptimizer.cpp | 122 +- .../Target/AArch64/AArch64MachineFunctionInfo.cpp | 32 + .../Target/AArch64/AArch64MachineFunctionInfo.h | 32 + .../Target/AArch64/AArch64PreLegalizerCombiner.cpp | 168 - llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp | 23 +- .../lib/Target/AArch64/AArch64RegisterBankInfo.cpp | 852 - llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h | 145 - llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp | 140 +- llvm/lib/Target/AArch64/AArch64RegisterInfo.h | 19 +- llvm/lib/Target/AArch64/AArch64RegisterInfo.td | 34 +- llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp | 5 +- llvm/lib/Target/AArch64/AArch64SLSHardening.cpp | 443 + llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td | 2140 +- llvm/lib/Target/AArch64/AArch64SchedA53.td | 3 +- llvm/lib/Target/AArch64/AArch64SchedA57.td | 5 +- llvm/lib/Target/AArch64/AArch64SchedCyclone.td | 5 +- llvm/lib/Target/AArch64/AArch64SchedExynosM3.td | 5 +- llvm/lib/Target/AArch64/AArch64SchedExynosM4.td | 5 +- llvm/lib/Target/AArch64/AArch64SchedExynosM5.td | 5 +- llvm/lib/Target/AArch64/AArch64SchedFalkor.td | 4 +- .../Target/AArch64/AArch64SchedFalkorDetails.td | 4 +- llvm/lib/Target/AArch64/AArch64SchedKryo.td | 4 +- llvm/lib/Target/AArch64/AArch64SchedKryoDetails.td | 4 +- llvm/lib/Target/AArch64/AArch64SchedThunderX.td | 4 +- .../lib/Target/AArch64/AArch64SchedThunderX2T99.td | 6 +- .../Target/AArch64/AArch64SchedThunderX3T110.td | 1997 ++ .../lib/Target/AArch64/AArch64SelectionDAGInfo.cpp | 29 +- llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h | 3 +- llvm/lib/Target/AArch64/AArch64StackOffset.h | 1 + llvm/lib/Target/AArch64/AArch64StackTagging.cpp | 49 +- .../Target/AArch64/AArch64StorePairSuppress.cpp | 4 +- llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 67 +- llvm/lib/Target/AArch64/AArch64Subtarget.h | 61 +- llvm/lib/Target/AArch64/AArch64SystemOperands.td | 60 +- llvm/lib/Target/AArch64/AArch64TargetMachine.cpp | 67 +- llvm/lib/Target/AArch64/AArch64TargetMachine.h | 8 + .../lib/Target/AArch64/AArch64TargetObjectFile.cpp | 5 +- llvm/lib/Target/AArch64/AArch64TargetObjectFile.h | 5 + .../Target/AArch64/AArch64TargetTransformInfo.cpp | 202 +- .../Target/AArch64/AArch64TargetTransformInfo.h | 85 +- .../Target/AArch64/AsmParser/AArch64AsmParser.cpp | 95 +- .../AArch64/Disassembler/AArch64Disassembler.cpp | 36 + .../Target/AArch64/GISel/AArch64CallLowering.cpp | 1049 + .../lib/Target/AArch64/GISel/AArch64CallLowering.h | 84 + .../AArch64/GISel/AArch64InstructionSelector.cpp | 5704 ++++ .../Target/AArch64/GISel/AArch64LegalizerInfo.cpp | 809 + .../Target/AArch64/GISel/AArch64LegalizerInfo.h | 51 + .../AArch64/GISel/AArch64PostLegalizerCombiner.cpp | 507 + .../AArch64/GISel/AArch64PreLegalizerCombiner.cpp | 203 + .../AArch64/GISel/AArch64RegisterBankInfo.cpp | 868 + .../Target/AArch64/GISel/AArch64RegisterBankInfo.h | 145 + .../AArch64/MCTargetDesc/AArch64AddressingModes.h | 7 +- .../AArch64/MCTargetDesc/AArch64AsmBackend.cpp | 84 +- .../MCTargetDesc/AArch64ELFObjectWriter.cpp | 17 +- .../AArch64/MCTargetDesc/AArch64ELFStreamer.cpp | 28 +- .../AArch64/MCTargetDesc/AArch64InstPrinter.cpp | 52 +- .../AArch64/MCTargetDesc/AArch64InstPrinter.h | 21 +- .../AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp | 4 +- .../AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp | 31 +- .../AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | 2 +- .../MCTargetDesc/AArch64MachObjectWriter.cpp | 4 +- .../AArch64/MCTargetDesc/AArch64TargetStreamer.cpp | 2 +- .../MCTargetDesc/AArch64WinCOFFStreamer.cpp | 16 +- llvm/lib/Target/AArch64/SVEInstrFormats.td | 1920 +- llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp | 265 + llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h | 1 + llvm/lib/Target/AMDGPU/AMDGPU.h | 29 +- llvm/lib/Target/AMDGPU/AMDGPU.td | 278 +- llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp | 10 +- llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h | 4 - llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp | 7 + .../Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp | 69 +- .../Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp | 14 +- llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp | 119 +- llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h | 35 +- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | 201 +- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h | 16 +- llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp | 7 +- llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | 247 +- llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h | 10 +- llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td | 26 +- llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp | 714 +- llvm/lib/Target/AMDGPU/AMDGPUCombine.td | 69 + llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp | 150 + llvm/lib/Target/AMDGPU/AMDGPUExportClustering.h | 15 + llvm/lib/Target/AMDGPU/AMDGPUFeatures.td | 23 +- .../Target/AMDGPU/AMDGPUFixFunctionBitcasts.cpp | 12 +- llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h | 2 +- llvm/lib/Target/AMDGPU/AMDGPUGISel.td | 114 +- .../Target/AMDGPU/AMDGPUGenRegisterBankInfo.def | 80 +- llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.cpp | 9 + llvm/lib/Target/AMDGPU/AMDGPUGlobalISelUtils.h | 33 + .../Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp | 118 +- llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h | 15 +- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp | 583 +- llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 493 +- llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h | 33 +- llvm/lib/Target/AMDGPU/AMDGPUInline.cpp | 44 +- llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp | 1 - llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h | 3 + llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td | 90 +- .../Target/AMDGPU/AMDGPUInstructionSelector.cpp | 2537 +- llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h | 122 +- llvm/lib/Target/AMDGPU/AMDGPUInstructions.td | 42 +- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp | 2837 +- llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h | 93 +- llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp | 56 +- llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp | 21 +- llvm/lib/Target/AMDGPU/AMDGPULibFunc.h | 5 +- llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp | 12 +- .../Target/AMDGPU/AMDGPULowerKernelArguments.cpp | 27 +- llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp | 8 +- llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp | 18 +- llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h | 14 +- llvm/lib/Target/AMDGPU/AMDGPUMacroFusion.cpp | 1 + .../AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp | 1 + llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp | 6 +- .../Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp | 359 + .../Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp | 153 + .../Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | 25 +- llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp | 255 +- .../Target/AMDGPU/AMDGPUPropagateAttributes.cpp | 137 +- llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp | 154 + llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp | 2156 +- llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h | 27 +- llvm/lib/Target/AMDGPU/AMDGPURegisterBanks.td | 6 +- llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp | 142 - llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h | 38 - llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td | 21 - .../Target/AMDGPU/AMDGPURewriteOutArguments.cpp | 11 +- llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td | 11 + llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp | 181 +- llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | 172 +- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | 113 +- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h | 4 +- llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.h | 2 - .../Target/AMDGPU/AMDGPUTargetTransformInfo.cpp | 507 +- llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h | 94 +- .../AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp | 112 +- .../Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | 280 +- llvm/lib/Target/AMDGPU/BUFInstructions.td | 183 +- llvm/lib/Target/AMDGPU/CaymanInstructions.td | 9 +- llvm/lib/Target/AMDGPU/DSInstructions.td | 59 +- .../AMDGPU/Disassembler/AMDGPUDisassembler.cpp | 46 +- llvm/lib/Target/AMDGPU/EvergreenInstructions.td | 10 +- llvm/lib/Target/AMDGPU/FLATInstructions.td | 75 +- llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp | 37 +- llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp | 15 +- llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h | 1 - llvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp | 5 + llvm/lib/Target/AMDGPU/GCNIterativeScheduler.h | 8 + llvm/lib/Target/AMDGPU/GCNMinRegStrategy.cpp | 10 +- llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp | 11 +- llvm/lib/Target/AMDGPU/GCNProcessors.td | 4 + llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp | 109 +- llvm/lib/Target/AMDGPU/GCNRegPressure.cpp | 27 +- llvm/lib/Target/AMDGPU/GCNRegPressure.h | 10 +- llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp | 123 +- llvm/lib/Target/AMDGPU/GCNSchedStrategy.h | 12 + .../AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp | 12 +- .../AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp | 11 + .../AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp | 73 +- .../Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.h | 13 +- .../Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp | 3 + .../AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.h | 6 + .../AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp | 8 +- .../AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h | 4 + .../AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp | 100 +- .../AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h | 7 +- .../AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp | 2 +- .../Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp | 41 +- llvm/lib/Target/AMDGPU/MIMGInstructions.td | 239 +- llvm/lib/Target/AMDGPU/R600AsmPrinter.cpp | 14 +- llvm/lib/Target/AMDGPU/R600AsmPrinter.h | 2 +- .../lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp | 7 +- llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp | 8 +- llvm/lib/Target/AMDGPU/R600FrameLowering.cpp | 11 +- llvm/lib/Target/AMDGPU/R600FrameLowering.h | 4 +- llvm/lib/Target/AMDGPU/R600ISelLowering.cpp | 22 +- llvm/lib/Target/AMDGPU/R600InstrInfo.cpp | 8 +- llvm/lib/Target/AMDGPU/R600Instructions.td | 9 +- .../Target/AMDGPU/R600OptimizeVectorRegisters.cpp | 32 +- llvm/lib/Target/AMDGPU/R600RegisterInfo.cpp | 22 +- llvm/lib/Target/AMDGPU/R600RegisterInfo.h | 11 +- llvm/lib/Target/AMDGPU/R600RegisterInfo.td | 6 +- llvm/lib/Target/AMDGPU/SIAddIMGInit.cpp | 8 +- llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp | 2 +- llvm/lib/Target/AMDGPU/SIDefines.h | 26 +- llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp | 33 +- llvm/lib/Target/AMDGPU/SIFixupVectorISel.cpp | 5 + llvm/lib/Target/AMDGPU/SIFoldOperands.cpp | 51 +- llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | 997 +- llvm/lib/Target/AMDGPU/SIFrameLowering.h | 37 +- llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 2276 +- llvm/lib/Target/AMDGPU/SIISelLowering.h | 63 +- llvm/lib/Target/AMDGPU/SIInsertHardClauses.cpp | 203 + llvm/lib/Target/AMDGPU/SIInsertSkips.cpp | 374 +- llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 496 +- llvm/lib/Target/AMDGPU/SIInstrFormats.td | 5 +- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 1090 +- llvm/lib/Target/AMDGPU/SIInstrInfo.h | 67 +- llvm/lib/Target/AMDGPU/SIInstrInfo.td | 98 +- llvm/lib/Target/AMDGPU/SIInstructions.td | 677 +- llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | 627 +- llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | 293 +- llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp | 5 + llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp | 60 +- llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 190 +- llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | 142 +- llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp | 28 +- llvm/lib/Target/AMDGPU/SIMachineScheduler.h | 6 - llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp | 28 + llvm/lib/Target/AMDGPU/SIModeRegister.cpp | 59 +- .../Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp | 175 +- llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp | 37 +- llvm/lib/Target/AMDGPU/SIPostRABundler.cpp | 139 + llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp | 326 + llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp | 1387 +- llvm/lib/Target/AMDGPU/SIRegisterInfo.h | 165 +- llvm/lib/Target/AMDGPU/SIRegisterInfo.td | 453 +- .../Target/AMDGPU/SIRemoveShortExecBranches.cpp | 10 +- llvm/lib/Target/AMDGPU/SISchedule.td | 39 +- llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | 147 +- llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp | 59 +- llvm/lib/Target/AMDGPU/SMInstructions.td | 104 +- llvm/lib/Target/AMDGPU/SOPInstructions.td | 153 +- llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp | 6 +- llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 204 +- llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h | 153 +- llvm/lib/Target/AMDGPU/Utils/AMDGPUPALMetadata.cpp | 114 +- llvm/lib/Target/AMDGPU/Utils/AMDGPUPALMetadata.h | 6 +- llvm/lib/Target/AMDGPU/VIInstructions.td | 13 - llvm/lib/Target/AMDGPU/VOP1Instructions.td | 139 +- llvm/lib/Target/AMDGPU/VOP2Instructions.td | 76 +- llvm/lib/Target/AMDGPU/VOP3Instructions.td | 242 +- llvm/lib/Target/AMDGPU/VOP3PInstructions.td | 92 +- llvm/lib/Target/AMDGPU/VOPCInstructions.td | 10 +- llvm/lib/Target/AMDGPU/VOPInstructions.td | 43 +- llvm/lib/Target/ARC/ARCAsmPrinter.cpp | 12 +- llvm/lib/Target/ARC/ARCFrameLowering.cpp | 14 +- llvm/lib/Target/ARC/ARCFrameLowering.h | 4 +- llvm/lib/Target/ARC/ARCISelLowering.cpp | 14 +- llvm/lib/Target/ARC/ARCInstrFormats.td | 48 +- llvm/lib/Target/ARC/ARCInstrInfo.cpp | 16 +- llvm/lib/Target/ARC/ARCInstrInfo.h | 4 +- llvm/lib/Target/ARC/ARCInstrInfo.td | 30 +- llvm/lib/Target/ARC/ARCMachineFunctionInfo.h | 5 +- llvm/lib/Target/ARC/ARCRegisterInfo.cpp | 5 - llvm/lib/Target/ARC/ARCRegisterInfo.h | 2 - llvm/lib/Target/ARC/ARCRegisterInfo.td | 16 +- llvm/lib/Target/ARC/ARCTargetMachine.cpp | 2 +- llvm/lib/Target/ARC/MCTargetDesc/ARCInstPrinter.h | 4 + .../Target/ARC/MCTargetDesc/ARCMCTargetDesc.cpp | 2 +- llvm/lib/Target/ARM/ARM.h | 2 + llvm/lib/Target/ARM/ARM.td | 73 + llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 267 +- llvm/lib/Target/ARM/ARMAsmPrinter.h | 26 +- llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 662 +- llvm/lib/Target/ARM/ARMBaseInstrInfo.h | 190 +- llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp | 95 +- llvm/lib/Target/ARM/ARMBaseRegisterInfo.h | 29 +- llvm/lib/Target/ARM/ARMBasicBlockInfo.cpp | 2 +- llvm/lib/Target/ARM/ARMBasicBlockInfo.h | 6 +- llvm/lib/Target/ARM/ARMCallLowering.cpp | 57 +- llvm/lib/Target/ARM/ARMCallingConv.cpp | 65 +- llvm/lib/Target/ARM/ARMCallingConv.td | 48 +- llvm/lib/Target/ARM/ARMConstantIslandPass.cpp | 74 +- llvm/lib/Target/ARM/ARMConstantPoolValue.cpp | 10 +- llvm/lib/Target/ARM/ARMConstantPoolValue.h | 14 +- llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp | 840 +- llvm/lib/Target/ARM/ARMFastISel.cpp | 94 +- llvm/lib/Target/ARM/ARMFrameLowering.cpp | 239 +- llvm/lib/Target/ARM/ARMFrameLowering.h | 41 +- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 483 +- llvm/lib/Target/ARM/ARMISelLowering.cpp | 2409 +- llvm/lib/Target/ARM/ARMISelLowering.h | 84 +- llvm/lib/Target/ARM/ARMInstrCDE.td | 666 + llvm/lib/Target/ARM/ARMInstrFormats.td | 10 +- llvm/lib/Target/ARM/ARMInstrInfo.cpp | 2 +- llvm/lib/Target/ARM/ARMInstrInfo.td | 129 +- llvm/lib/Target/ARM/ARMInstrMVE.td | 2090 +- llvm/lib/Target/ARM/ARMInstrNEON.td | 486 +- llvm/lib/Target/ARM/ARMInstrThumb.td | 14 +- llvm/lib/Target/ARM/ARMInstrThumb2.td | 83 +- llvm/lib/Target/ARM/ARMInstrVFP.td | 276 +- llvm/lib/Target/ARM/ARMInstructionSelector.cpp | 32 +- llvm/lib/Target/ARM/ARMLegalizerInfo.cpp | 14 +- llvm/lib/Target/ARM/ARMLegalizerInfo.h | 4 +- llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 311 +- llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | 1116 +- llvm/lib/Target/ARM/ARMMCInstLower.cpp | 13 +- llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp | 4 +- llvm/lib/Target/ARM/ARMMachineFunctionInfo.h | 18 +- llvm/lib/Target/ARM/ARMParallelDSP.cpp | 32 +- llvm/lib/Target/ARM/ARMPredicates.td | 130 +- llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp | 60 +- llvm/lib/Target/ARM/ARMRegisterInfo.td | 24 +- llvm/lib/Target/ARM/ARMScheduleA57.td | 2 +- llvm/lib/Target/ARM/ARMScheduleSwift.td | 6 +- llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 24 +- llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 8 +- llvm/lib/Target/ARM/ARMSubtarget.cpp | 5 +- llvm/lib/Target/ARM/ARMSubtarget.h | 19 + llvm/lib/Target/ARM/ARMTargetMachine.cpp | 20 +- llvm/lib/Target/ARM/ARMTargetObjectFile.cpp | 2 +- llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp | 532 +- llvm/lib/Target/ARM/ARMTargetTransformInfo.h | 88 +- llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 442 +- .../Target/ARM/Disassembler/ARMDisassembler.cpp | 59 +- llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 127 +- llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h | 4 +- .../Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h | 12 +- llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h | 14 +- .../Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp | 50 +- .../lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | 147 +- .../lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp | 13 +- llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.h | 25 +- llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp | 5 - .../Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp | 8 - .../Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp | 42 +- llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h | 3 + .../Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp | 4 +- .../lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp | 2 +- llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h | 4 +- .../Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp | 12 +- llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp | 911 +- llvm/lib/Target/ARM/MVETailPredication.cpp | 592 +- llvm/lib/Target/ARM/MVEVPTBlockPass.cpp | 286 +- llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp | 464 + llvm/lib/Target/ARM/Thumb1FrameLowering.cpp | 54 +- llvm/lib/Target/ARM/Thumb1FrameLowering.h | 11 +- llvm/lib/Target/ARM/Thumb1InstrInfo.cpp | 8 +- llvm/lib/Target/ARM/Thumb1InstrInfo.h | 4 +- llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp | 6 +- llvm/lib/Target/ARM/Thumb2InstrInfo.cpp | 58 +- llvm/lib/Target/ARM/Thumb2InstrInfo.h | 19 +- llvm/lib/Target/ARM/Thumb2SizeReduction.cpp | 26 +- llvm/lib/Target/ARM/ThumbRegisterInfo.cpp | 31 +- llvm/lib/Target/ARM/ThumbRegisterInfo.h | 8 +- llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp | 31 + llvm/lib/Target/ARM/Utils/ARMBaseInfo.h | 66 +- llvm/lib/Target/AVR/AVRAsmPrinter.cpp | 4 +- llvm/lib/Target/AVR/AVRCallingConv.td | 18 +- llvm/lib/Target/AVR/AVRDevices.td | 18 +- llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp | 276 +- llvm/lib/Target/AVR/AVRFrameLowering.cpp | 119 +- llvm/lib/Target/AVR/AVRFrameLowering.h | 4 +- llvm/lib/Target/AVR/AVRISelDAGToDAG.cpp | 4 +- llvm/lib/Target/AVR/AVRISelLowering.cpp | 411 +- llvm/lib/Target/AVR/AVRISelLowering.h | 6 +- llvm/lib/Target/AVR/AVRInstrFormats.td | 20 +- llvm/lib/Target/AVR/AVRInstrInfo.cpp | 12 +- llvm/lib/Target/AVR/AVRInstrInfo.h | 4 +- llvm/lib/Target/AVR/AVRInstrInfo.td | 70 +- llvm/lib/Target/AVR/AVRMachineFunctionInfo.h | 20 +- llvm/lib/Target/AVR/AVRRegisterInfo.cpp | 27 +- llvm/lib/Target/AVR/AVRRegisterInfo.h | 6 +- llvm/lib/Target/AVR/AVRRegisterInfo.td | 27 + llvm/lib/Target/AVR/AVRSubtarget.cpp | 11 +- llvm/lib/Target/AVR/AVRSubtarget.h | 19 +- llvm/lib/Target/AVR/AVRTargetMachine.cpp | 2 +- llvm/lib/Target/AVR/AVRTargetObjectFile.cpp | 2 +- llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp | 50 +- .../Target/AVR/Disassembler/AVRDisassembler.cpp | 159 +- llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | 96 +- llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h | 6 - llvm/lib/Target/AVR/MCTargetDesc/AVRFixupKinds.h | 2 +- .../lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp | 33 +- llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h | 11 +- llvm/lib/Target/AVR/MCTargetDesc/AVRMCAsmInfo.cpp | 2 +- .../Target/AVR/MCTargetDesc/AVRMCELFStreamer.cpp | 4 +- .../lib/Target/AVR/MCTargetDesc/AVRMCELFStreamer.h | 2 +- llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.h | 3 - .../Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp | 4 +- llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp | 16 +- llvm/lib/Target/BPF/BPF.h | 2 + llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp | 63 +- llvm/lib/Target/BPF/BPFAsmPrinter.cpp | 4 +- llvm/lib/Target/BPF/BPFCORE.h | 18 +- llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp | 2 +- llvm/lib/Target/BPF/BPFISelLowering.cpp | 40 + llvm/lib/Target/BPF/BPFISelLowering.h | 28 +- llvm/lib/Target/BPF/BPFInstrInfo.cpp | 4 +- llvm/lib/Target/BPF/BPFInstrInfo.h | 4 +- llvm/lib/Target/BPF/BPFInstrInfo.td | 5 +- llvm/lib/Target/BPF/BPFMCInstLower.h | 2 - llvm/lib/Target/BPF/BPFMIPeephole.cpp | 69 +- llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp | 107 +- llvm/lib/Target/BPF/BPFPreserveDIType.cpp | 131 + llvm/lib/Target/BPF/BPFSelectionDAGInfo.cpp | 6 +- llvm/lib/Target/BPF/BPFSelectionDAGInfo.h | 4 +- llvm/lib/Target/BPF/BPFTargetMachine.cpp | 8 +- llvm/lib/Target/BPF/BTFDebug.cpp | 282 +- llvm/lib/Target/BPF/BTFDebug.h | 68 +- .../Target/BPF/Disassembler/BPFDisassembler.cpp | 3 + llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp | 3 - llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h | 3 +- llvm/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h | 4 - .../Target/Hexagon/AsmParser/HexagonAsmParser.cpp | 148 +- llvm/lib/Target/Hexagon/BitTracker.cpp | 3 + .../Hexagon/Disassembler/HexagonDisassembler.cpp | 29 +- llvm/lib/Target/Hexagon/Hexagon.td | 99 +- llvm/lib/Target/Hexagon/HexagonArch.h | 37 + llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp | 20 +- llvm/lib/Target/Hexagon/HexagonAsmPrinter.h | 2 +- llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp | 12 +- llvm/lib/Target/Hexagon/HexagonBitTracker.cpp | 2 +- .../lib/Target/Hexagon/HexagonBranchRelaxation.cpp | 2 +- llvm/lib/Target/Hexagon/HexagonCallingConv.td | 32 +- llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp | 15 +- llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp | 38 +- .../lib/Target/Hexagon/HexagonConstPropagation.cpp | 17 +- llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp | 14 +- llvm/lib/Target/Hexagon/HexagonDepArch.h | 39 +- llvm/lib/Target/Hexagon/HexagonDepArch.td | 26 +- llvm/lib/Target/Hexagon/HexagonDepDecoders.inc | 40 +- llvm/lib/Target/Hexagon/HexagonDepIICHVX.td | 493 +- llvm/lib/Target/Hexagon/HexagonDepIICScalar.td | 8257 +++-- llvm/lib/Target/Hexagon/HexagonDepITypes.h | 87 +- llvm/lib/Target/Hexagon/HexagonDepITypes.td | 87 +- llvm/lib/Target/Hexagon/HexagonDepInstrFormats.td | 6145 ++-- llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td | 6032 ++-- llvm/lib/Target/Hexagon/HexagonDepMapAsm2Intrin.td | 6124 ++-- llvm/lib/Target/Hexagon/HexagonDepMappings.td | 11 +- llvm/lib/Target/Hexagon/HexagonDepMask.h | 2821 ++ llvm/lib/Target/Hexagon/HexagonDepOperands.td | 182 +- llvm/lib/Target/Hexagon/HexagonDepTimingClasses.h | 200 +- llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp | 6 +- llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp | 4 +- llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 275 +- llvm/lib/Target/Hexagon/HexagonFrameLowering.h | 19 +- llvm/lib/Target/Hexagon/HexagonGenExtract.cpp | 5 +- llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp | 12 +- llvm/lib/Target/Hexagon/HexagonIICScalar.td | 2 +- llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 81 +- llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.h | 8 +- llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp | 26 +- llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | 330 +- llvm/lib/Target/Hexagon/HexagonISelLowering.h | 37 +- llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp | 224 +- llvm/lib/Target/Hexagon/HexagonInstrFormats.td | 103 +- llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td | 86 - llvm/lib/Target/Hexagon/HexagonInstrFormatsV65.td | 4 +- llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp | 260 +- llvm/lib/Target/Hexagon/HexagonInstrInfo.h | 43 +- llvm/lib/Target/Hexagon/HexagonIntrinsics.td | 76 +- llvm/lib/Target/Hexagon/HexagonIntrinsicsV60.td | 64 +- .../Target/Hexagon/HexagonLoopIdiomRecognition.cpp | 2 +- llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp | 2 +- .../Target/Hexagon/HexagonMachineFunctionInfo.h | 12 + llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp | 2 +- llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp | 17 +- llvm/lib/Target/Hexagon/HexagonPatterns.td | 70 +- llvm/lib/Target/Hexagon/HexagonPeephole.cpp | 2 +- llvm/lib/Target/Hexagon/HexagonPseudo.td | 18 +- llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp | 6 +- llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp | 9 +- llvm/lib/Target/Hexagon/HexagonRegisterInfo.h | 4 - llvm/lib/Target/Hexagon/HexagonRegisterInfo.td | 82 +- llvm/lib/Target/Hexagon/HexagonSchedule.td | 26 +- llvm/lib/Target/Hexagon/HexagonScheduleV67.td | 39 + llvm/lib/Target/Hexagon/HexagonScheduleV67T.td | 61 + .../lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp | 4 +- llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.h | 4 +- llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp | 9 +- llvm/lib/Target/Hexagon/HexagonStoreWidening.cpp | 7 +- llvm/lib/Target/Hexagon/HexagonSubtarget.cpp | 51 +- llvm/lib/Target/Hexagon/HexagonSubtarget.h | 55 +- llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp | 8 + .../lib/Target/Hexagon/HexagonTargetObjectFile.cpp | 6 +- llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h | 1 + llvm/lib/Target/Hexagon/HexagonTargetStreamer.h | 6 +- .../Target/Hexagon/HexagonTargetTransformInfo.cpp | 117 +- .../Target/Hexagon/HexagonTargetTransformInfo.h | 52 +- llvm/lib/Target/Hexagon/HexagonVExtract.cpp | 18 +- llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | 74 +- llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h | 8 + llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp | 7 +- .../Hexagon/MCTargetDesc/HexagonAsmBackend.cpp | 23 +- .../Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h | 8 +- .../MCTargetDesc/HexagonELFObjectWriter.cpp | 2 +- .../Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp | 1 + .../Hexagon/MCTargetDesc/HexagonMCChecker.cpp | 31 +- .../Target/Hexagon/MCTargetDesc/HexagonMCChecker.h | 5 + .../Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp | 24 +- .../Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp | 6 +- .../Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp | 10 +- .../Hexagon/MCTargetDesc/HexagonMCELFStreamer.h | 2 +- .../Target/Hexagon/MCTargetDesc/HexagonMCExpr.h | 1 - .../Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp | 167 +- .../Hexagon/MCTargetDesc/HexagonMCInstrInfo.h | 43 +- .../Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp | 165 +- .../Hexagon/MCTargetDesc/HexagonMCTargetDesc.h | 10 +- .../Hexagon/MCTargetDesc/HexagonShuffler.cpp | 730 +- .../Target/Hexagon/MCTargetDesc/HexagonShuffler.h | 83 +- llvm/lib/Target/Hexagon/RDFCopy.cpp | 6 +- llvm/lib/Target/Hexagon/RDFCopy.h | 6 +- llvm/lib/Target/Hexagon/RDFDeadCode.cpp | 4 +- llvm/lib/Target/Hexagon/RDFDeadCode.h | 4 +- llvm/lib/Target/Hexagon/RDFGraph.cpp | 1835 -- llvm/lib/Target/Hexagon/RDFGraph.h | 968 - llvm/lib/Target/Hexagon/RDFLiveness.cpp | 1118 - llvm/lib/Target/Hexagon/RDFLiveness.h | 151 - llvm/lib/Target/Hexagon/RDFRegisters.cpp | 380 - llvm/lib/Target/Hexagon/RDFRegisters.h | 240 - llvm/lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp | 36 +- llvm/lib/Target/Lanai/Lanai.h | 3 - llvm/lib/Target/Lanai/LanaiAsmPrinter.cpp | 16 +- llvm/lib/Target/Lanai/LanaiFrameLowering.cpp | 4 +- llvm/lib/Target/Lanai/LanaiISelLowering.cpp | 14 +- llvm/lib/Target/Lanai/LanaiInstrInfo.cpp | 32 +- llvm/lib/Target/Lanai/LanaiInstrInfo.h | 21 +- llvm/lib/Target/Lanai/LanaiMCInstLower.h | 2 - llvm/lib/Target/Lanai/LanaiMachineFunctionInfo.cpp | 9 - llvm/lib/Target/Lanai/LanaiMachineFunctionInfo.h | 14 +- llvm/lib/Target/Lanai/LanaiRegisterInfo.cpp | 5 - llvm/lib/Target/Lanai/LanaiRegisterInfo.h | 2 - llvm/lib/Target/Lanai/LanaiSelectionDAGInfo.cpp | 2 +- llvm/lib/Target/Lanai/LanaiSelectionDAGInfo.h | 4 +- llvm/lib/Target/Lanai/LanaiSubtarget.cpp | 2 +- llvm/lib/Target/Lanai/LanaiTargetMachine.h | 1 - llvm/lib/Target/Lanai/LanaiTargetObjectFile.cpp | 11 +- llvm/lib/Target/Lanai/LanaiTargetObjectFile.h | 3 +- llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h | 18 +- .../Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp | 4 - .../Target/Lanai/MCTargetDesc/LanaiInstPrinter.cpp | 2 +- .../Target/Lanai/MCTargetDesc/LanaiInstPrinter.h | 7 +- .../Target/Lanai/MCTargetDesc/LanaiMCAsmInfo.cpp | 3 - .../Lanai/MCTargetDesc/LanaiMCTargetDesc.cpp | 2 +- .../Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.h | 5 - .../Target/MSP430/AsmParser/MSP430AsmParser.cpp | 51 +- .../MSP430/Disassembler/MSP430Disassembler.cpp | 4 +- .../MSP430/MCTargetDesc/MSP430AsmBackend.cpp | 3 - .../MSP430/MCTargetDesc/MSP430ELFStreamer.cpp | 24 +- .../MSP430/MCTargetDesc/MSP430InstPrinter.cpp | 2 +- .../Target/MSP430/MCTargetDesc/MSP430InstPrinter.h | 7 +- .../Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp | 3 +- llvm/lib/Target/MSP430/MSP430.h | 1 - llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp | 8 +- llvm/lib/Target/MSP430/MSP430FrameLowering.cpp | 30 +- llvm/lib/Target/MSP430/MSP430FrameLowering.h | 11 +- llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 12 +- llvm/lib/Target/MSP430/MSP430ISelLowering.cpp | 16 +- llvm/lib/Target/MSP430/MSP430ISelLowering.h | 4 + llvm/lib/Target/MSP430/MSP430InstrInfo.cpp | 20 +- llvm/lib/Target/MSP430/MSP430InstrInfo.h | 5 +- llvm/lib/Target/MSP430/MSP430MCInstLower.h | 1 - llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.h | 6 +- llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp | 12 +- llvm/lib/Target/MSP430/MSP430RegisterInfo.td | 10 +- llvm/lib/Target/MSP430/MSP430Subtarget.cpp | 2 +- llvm/lib/Target/MSP430/MSP430TargetMachine.cpp | 2 +- llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 307 +- .../Mips/MCTargetDesc/MipsABIFlagsSection.cpp | 22 +- llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h | 1 - llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h | 13 - .../Mips/MCTargetDesc/MipsELFObjectWriter.cpp | 61 +- .../Target/Mips/MCTargetDesc/MipsELFStreamer.cpp | 28 +- .../lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h | 14 +- .../Target/Mips/MCTargetDesc/MipsInstPrinter.cpp | 2 +- .../lib/Target/Mips/MCTargetDesc/MipsInstPrinter.h | 11 +- .../lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp | 1 - .../Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp | 25 +- .../Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h | 2 +- .../Target/Mips/MCTargetDesc/MipsMCTargetDesc.h | 2 - .../Mips/MCTargetDesc/MipsNaClELFStreamer.cpp | 28 +- .../Target/Mips/MCTargetDesc/MipsOptionRecord.cpp | 34 +- .../Mips/MCTargetDesc/MipsTargetStreamer.cpp | 72 +- llvm/lib/Target/Mips/MicroMipsInstrFormats.td | 2 +- llvm/lib/Target/Mips/MicroMipsInstrInfo.td | 2 +- llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp | 12 +- llvm/lib/Target/Mips/Mips.td | 35 +- llvm/lib/Target/Mips/Mips16FrameLowering.cpp | 19 +- llvm/lib/Target/Mips/Mips16FrameLowering.h | 11 +- llvm/lib/Target/Mips/Mips16HardFloat.cpp | 10 +- llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp | 2 +- llvm/lib/Target/Mips/Mips16ISelLowering.cpp | 2 +- llvm/lib/Target/Mips/Mips16InstrInfo.cpp | 6 +- llvm/lib/Target/Mips/Mips16InstrInfo.h | 4 +- llvm/lib/Target/Mips/Mips16InstrInfo.td | 2 +- llvm/lib/Target/Mips/Mips16RegisterInfo.cpp | 12 +- llvm/lib/Target/Mips/Mips16RegisterInfo.h | 9 +- llvm/lib/Target/Mips/Mips64InstrInfo.td | 14 + llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 76 +- llvm/lib/Target/Mips/MipsAsmPrinter.h | 20 +- llvm/lib/Target/Mips/MipsBranchExpansion.cpp | 21 +- llvm/lib/Target/Mips/MipsCCState.cpp | 6 +- llvm/lib/Target/Mips/MipsCallLowering.cpp | 114 +- llvm/lib/Target/Mips/MipsConstantIslandPass.cpp | 17 +- llvm/lib/Target/Mips/MipsDSPInstrFormats.td | 6 +- llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | 2 +- llvm/lib/Target/Mips/MipsFastISel.cpp | 12 +- llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp | 4 +- llvm/lib/Target/Mips/MipsISelLowering.cpp | 362 +- llvm/lib/Target/Mips/MipsISelLowering.h | 17 +- llvm/lib/Target/Mips/MipsInstrFPU.td | 34 +- llvm/lib/Target/Mips/MipsInstrFormats.td | 47 - llvm/lib/Target/Mips/MipsInstrInfo.cpp | 58 +- llvm/lib/Target/Mips/MipsInstrInfo.h | 18 +- llvm/lib/Target/Mips/MipsInstrInfo.td | 145 +- llvm/lib/Target/Mips/MipsInstructionSelector.cpp | 125 +- llvm/lib/Target/Mips/MipsLegalizerInfo.cpp | 221 +- llvm/lib/Target/Mips/MipsLegalizerInfo.h | 8 +- llvm/lib/Target/Mips/MipsMSAInstrInfo.td | 20 + llvm/lib/Target/Mips/MipsMachineFunction.cpp | 36 +- llvm/lib/Target/Mips/MipsMachineFunction.h | 26 +- llvm/lib/Target/Mips/MipsOptimizePICCall.cpp | 3 +- llvm/lib/Target/Mips/MipsPreLegalizerCombiner.cpp | 15 +- llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp | 142 +- llvm/lib/Target/Mips/MipsRegisterBankInfo.h | 60 +- llvm/lib/Target/Mips/MipsRegisterInfo.cpp | 7 +- llvm/lib/Target/Mips/MipsRegisterInfo.h | 2 - llvm/lib/Target/Mips/MipsRegisterInfo.td | 16 +- llvm/lib/Target/Mips/MipsSEFrameLowering.cpp | 34 +- llvm/lib/Target/Mips/MipsSEFrameLowering.h | 4 +- llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp | 79 +- llvm/lib/Target/Mips/MipsSEISelLowering.cpp | 5 +- llvm/lib/Target/Mips/MipsSEInstrInfo.cpp | 18 +- llvm/lib/Target/Mips/MipsSEInstrInfo.h | 6 +- llvm/lib/Target/Mips/MipsSERegisterInfo.h | 1 - llvm/lib/Target/Mips/MipsSchedule.td | 2 + llvm/lib/Target/Mips/MipsScheduleGeneric.td | 8 +- llvm/lib/Target/Mips/MipsScheduleP5600.td | 5 +- llvm/lib/Target/Mips/MipsSubtarget.cpp | 2 +- llvm/lib/Target/Mips/MipsSubtarget.h | 4 + llvm/lib/Target/Mips/MipsTargetMachine.cpp | 3 + llvm/lib/Target/Mips/MipsTargetObjectFile.cpp | 6 +- llvm/lib/Target/Mips/MipsTargetObjectFile.h | 2 +- llvm/lib/Target/Mips/MipsTargetStreamer.h | 9 +- .../Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp | 2 + .../lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h | 1 - .../Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.h | 5 - .../NVPTX/MCTargetDesc/NVPTXTargetStreamer.cpp | 6 +- llvm/lib/Target/NVPTX/NVPTX.h | 1 - llvm/lib/Target/NVPTX/NVPTX.td | 7 + llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 96 +- llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h | 13 +- llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp | 7 +- llvm/lib/Target/NVPTX/NVPTXFrameLowering.h | 5 +- llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp | 2 +- llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp | 164 +- llvm/lib/Target/NVPTX/NVPTXISelLowering.h | 7 +- llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp | 2 +- llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp | 4 +- llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp | 6 +- llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp | 35 +- llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp | 2 +- llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp | 10 +- llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp | 9 +- llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h | 2 +- llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | 14 +- llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h | 11 +- llvm/lib/Target/NVPTX/NVPTXUtilities.cpp | 6 +- llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp | 83 +- .../PowerPC/Disassembler/PPCDisassembler.cpp | 76 +- .../Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp | 79 +- .../PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp | 23 +- .../Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp | 112 + .../Target/PowerPC/MCTargetDesc/PPCELFStreamer.h | 54 + .../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h | 7 + .../Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp | 75 +- .../Target/PowerPC/MCTargetDesc/PPCInstPrinter.h | 13 +- .../Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp | 11 +- .../lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h | 2 +- .../PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp | 124 +- .../Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.h | 14 +- llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp | 63 +- llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h | 26 +- .../PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | 84 +- .../Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h | 3 - .../PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp | 380 - .../PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp | 49 +- llvm/lib/Target/PowerPC/P9InstrResources.td | 1 + llvm/lib/Target/PowerPC/PPC.h | 37 +- llvm/lib/Target/PowerPC/PPC.td | 95 +- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 593 +- llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp | 2 +- llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp | 5 + llvm/lib/Target/PowerPC/PPCBranchSelector.cpp | 35 +- llvm/lib/Target/PowerPC/PPCCTRLoops.cpp | 2 +- llvm/lib/Target/PowerPC/PPCCallingConv.td | 44 +- llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp | 6 +- llvm/lib/Target/PowerPC/PPCExpandISEL.cpp | 57 +- llvm/lib/Target/PowerPC/PPCFastISel.cpp | 91 +- llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 942 +- llvm/lib/Target/PowerPC/PPCFrameLowering.h | 21 +- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 510 +- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2861 +- llvm/lib/Target/PowerPC/PPCISelLowering.h | 181 +- llvm/lib/Target/PowerPC/PPCInstr64Bit.td | 132 +- llvm/lib/Target/PowerPC/PPCInstrAltivec.td | 59 +- llvm/lib/Target/PowerPC/PPCInstrFormats.td | 6 +- llvm/lib/Target/PowerPC/PPCInstrHTM.td | 7 +- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 1401 +- llvm/lib/Target/PowerPC/PPCInstrInfo.h | 185 +- llvm/lib/Target/PowerPC/PPCInstrInfo.td | 495 +- llvm/lib/Target/PowerPC/PPCInstrPrefix.td | 1035 + llvm/lib/Target/PowerPC/PPCInstrQPX.td | 31 +- llvm/lib/Target/PowerPC/PPCInstrSPE.td | 16 +- llvm/lib/Target/PowerPC/PPCInstrVSX.td | 6384 ++-- llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp | 12 +- llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | 34 +- llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 78 +- llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | 47 +- llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | 23 +- llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h | 41 +- llvm/lib/Target/PowerPC/PPCMachineScheduler.cpp | 52 +- llvm/lib/Target/PowerPC/PPCMachineScheduler.h | 3 + llvm/lib/Target/PowerPC/PPCMacroFusion.cpp | 203 + llvm/lib/Target/PowerPC/PPCMacroFusion.def | 45 + llvm/lib/Target/PowerPC/PPCMacroFusion.h | 22 + llvm/lib/Target/PowerPC/PPCPreEmitPeephole.cpp | 10 + llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp | 288 +- llvm/lib/Target/PowerPC/PPCRegisterInfo.h | 22 +- llvm/lib/Target/PowerPC/PPCRegisterInfo.td | 20 +- llvm/lib/Target/PowerPC/PPCScheduleP9.td | 10 +- llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 38 +- llvm/lib/Target/PowerPC/PPCSubtarget.h | 95 +- llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp | 4 +- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 21 +- llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp | 2 +- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 167 +- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h | 44 +- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 584 +- .../RISCV/Disassembler/RISCVDisassembler.cpp | 49 +- .../Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp | 172 +- .../Target/RISCV/MCTargetDesc/RISCVAsmBackend.h | 51 +- .../RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp | 2 + .../Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp | 103 +- .../Target/RISCV/MCTargetDesc/RISCVELFStreamer.h | 90 +- .../Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp | 35 +- .../Target/RISCV/MCTargetDesc/RISCVInstPrinter.h | 15 +- .../RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 51 +- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp | 69 +- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h | 9 +- .../RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp | 52 +- .../Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h | 4 - .../RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | 70 + .../RISCV/MCTargetDesc/RISCVTargetStreamer.h | 33 +- llvm/lib/Target/RISCV/RISCV.h | 3 + llvm/lib/Target/RISCV/RISCV.td | 142 +- llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | 61 +- .../Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp | 618 + llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp | 523 +- llvm/lib/Target/RISCV/RISCVFrameLowering.cpp | 364 +- llvm/lib/Target/RISCV/RISCVFrameLowering.h | 14 +- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 107 +- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h | 56 + llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 152 +- llvm/lib/Target/RISCV/RISCVISelLowering.h | 61 +- llvm/lib/Target/RISCV/RISCVInstrFormats.td | 21 +- llvm/lib/Target/RISCV/RISCVInstrFormatsV.td | 300 + llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 44 +- llvm/lib/Target/RISCV/RISCVInstrInfo.h | 25 +- llvm/lib/Target/RISCV/RISCVInstrInfo.td | 171 +- llvm/lib/Target/RISCV/RISCVInstrInfoA.td | 72 +- llvm/lib/Target/RISCV/RISCVInstrInfoB.td | 634 + llvm/lib/Target/RISCV/RISCVInstrInfoC.td | 156 +- llvm/lib/Target/RISCV/RISCVInstrInfoD.td | 104 +- llvm/lib/Target/RISCV/RISCVInstrInfoF.td | 106 +- llvm/lib/Target/RISCV/RISCVInstrInfoM.td | 39 +- llvm/lib/Target/RISCV/RISCVInstrInfoV.td | 873 + llvm/lib/Target/RISCV/RISCVInstructionSelector.cpp | 1 + llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h | 21 +- llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp | 49 +- llvm/lib/Target/RISCV/RISCVRegisterInfo.h | 11 +- llvm/lib/Target/RISCV/RISCVRegisterInfo.td | 99 + llvm/lib/Target/RISCV/RISCVSchedRocket32.td | 227 + llvm/lib/Target/RISCV/RISCVSchedRocket64.td | 228 + llvm/lib/Target/RISCV/RISCVSchedule.td | 147 + llvm/lib/Target/RISCV/RISCVSubtarget.cpp | 2 +- llvm/lib/Target/RISCV/RISCVSubtarget.h | 28 +- llvm/lib/Target/RISCV/RISCVSystemOperands.td | 27 +- llvm/lib/Target/RISCV/RISCVTargetMachine.cpp | 20 +- llvm/lib/Target/RISCV/RISCVTargetObjectFile.cpp | 6 +- llvm/lib/Target/RISCV/RISCVTargetObjectFile.h | 3 +- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | 10 +- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h | 9 +- llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp | 24 +- llvm/lib/Target/RISCV/Utils/RISCVBaseInfo.h | 5 +- llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp | 19 +- llvm/lib/Target/Sparc/LeonFeatures.td | 16 +- .../Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp | 5 +- .../Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp | 3 +- .../Target/Sparc/MCTargetDesc/SparcInstPrinter.h | 8 +- .../Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp | 2 - .../Sparc/MCTargetDesc/SparcMCTargetDesc.cpp | 4 +- .../Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h | 4 - llvm/lib/Target/Sparc/Sparc.h | 1 - llvm/lib/Target/Sparc/Sparc.td | 6 +- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 21 +- llvm/lib/Target/Sparc/SparcCallingConv.td | 2 +- llvm/lib/Target/Sparc/SparcFrameLowering.cpp | 17 +- llvm/lib/Target/Sparc/SparcFrameLowering.h | 2 +- llvm/lib/Target/Sparc/SparcISelLowering.cpp | 102 +- llvm/lib/Target/Sparc/SparcISelLowering.h | 4 +- llvm/lib/Target/Sparc/SparcInstrAliases.td | 4 +- llvm/lib/Target/Sparc/SparcInstrFormats.td | 2 +- llvm/lib/Target/Sparc/SparcInstrInfo.cpp | 15 +- llvm/lib/Target/Sparc/SparcInstrInfo.h | 6 +- llvm/lib/Target/Sparc/SparcInstrInfo.td | 46 +- llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h | 12 +- llvm/lib/Target/Sparc/SparcRegisterInfo.cpp | 2 +- llvm/lib/Target/Sparc/SparcRegisterInfo.td | 4 +- llvm/lib/Target/Sparc/SparcSchedule.td | 2 +- llvm/lib/Target/Sparc/SparcSubtarget.cpp | 2 +- llvm/lib/Target/Sparc/SparcTargetMachine.cpp | 3 +- llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp | 2 +- .../Target/SystemZ/AsmParser/SystemZAsmParser.cpp | 386 +- .../SystemZ/MCTargetDesc/SystemZInstPrinter.cpp | 3 +- .../SystemZ/MCTargetDesc/SystemZInstPrinter.h | 11 +- .../SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp | 4 - .../SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp | 2 - .../SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp | 7 +- llvm/lib/Target/SystemZ/SystemZ.h | 1 + llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp | 48 +- llvm/lib/Target/SystemZ/SystemZAsmPrinter.h | 6 +- llvm/lib/Target/SystemZ/SystemZCallingConv.h | 2 +- .../Target/SystemZ/SystemZConstantPoolValue.cpp | 7 +- llvm/lib/Target/SystemZ/SystemZConstantPoolValue.h | 2 +- llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp | 120 + llvm/lib/Target/SystemZ/SystemZFeatures.td | 87 +- llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp | 323 +- llvm/lib/Target/SystemZ/SystemZFrameLowering.h | 25 +- llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 3 +- llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 655 +- llvm/lib/Target/SystemZ/SystemZISelLowering.h | 35 +- llvm/lib/Target/SystemZ/SystemZInstrBuilder.h | 3 +- llvm/lib/Target/SystemZ/SystemZInstrFP.td | 24 +- llvm/lib/Target/SystemZ/SystemZInstrFormats.td | 198 +- llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | 318 +- llvm/lib/Target/SystemZ/SystemZInstrInfo.h | 41 +- llvm/lib/Target/SystemZ/SystemZInstrInfo.td | 21 +- llvm/lib/Target/SystemZ/SystemZInstrVector.td | 418 +- .../Target/SystemZ/SystemZMachineFunctionInfo.h | 16 +- llvm/lib/Target/SystemZ/SystemZOperands.td | 60 +- llvm/lib/Target/SystemZ/SystemZOperators.td | 8 +- llvm/lib/Target/SystemZ/SystemZPatterns.td | 6 +- llvm/lib/Target/SystemZ/SystemZProcessors.td | 2 +- llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp | 21 +- llvm/lib/Target/SystemZ/SystemZRegisterInfo.h | 9 +- llvm/lib/Target/SystemZ/SystemZRegisterInfo.td | 6 +- .../lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp | 16 +- llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h | 7 +- llvm/lib/Target/SystemZ/SystemZShortenInst.cpp | 45 +- llvm/lib/Target/SystemZ/SystemZSubtarget.cpp | 19 +- llvm/lib/Target/SystemZ/SystemZSubtarget.h | 4 + llvm/lib/Target/SystemZ/SystemZTDC.cpp | 14 + llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp | 52 +- llvm/lib/Target/SystemZ/SystemZTargetMachine.h | 13 +- .../Target/SystemZ/SystemZTargetTransformInfo.cpp | 421 +- .../Target/SystemZ/SystemZTargetTransformInfo.h | 51 +- llvm/lib/Target/Target.cpp | 8 +- llvm/lib/Target/TargetLoweringObjectFile.cpp | 38 +- llvm/lib/Target/TargetMachine.cpp | 32 +- llvm/lib/Target/TargetMachineC.cpp | 4 +- llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp | 1454 + llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp | 560 + llvm/lib/Target/VE/InstPrinter/VEInstPrinter.cpp | 118 - llvm/lib/Target/VE/InstPrinter/VEInstPrinter.h | 49 - llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp | 224 + .../Target/VE/MCTargetDesc/VEELFObjectWriter.cpp | 135 + llvm/lib/Target/VE/MCTargetDesc/VEFixupKinds.h | 61 + llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp | 227 + llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.h | 62 + llvm/lib/Target/VE/MCTargetDesc/VEMCAsmInfo.cpp | 1 + .../lib/Target/VE/MCTargetDesc/VEMCCodeEmitter.cpp | 165 + llvm/lib/Target/VE/MCTargetDesc/VEMCExpr.cpp | 225 + llvm/lib/Target/VE/MCTargetDesc/VEMCExpr.h | 95 + llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.cpp | 11 +- llvm/lib/Target/VE/MCTargetDesc/VEMCTargetDesc.h | 10 +- .../Target/VE/MCTargetDesc/VETargetStreamer.cpp | 2 +- llvm/lib/Target/VE/TargetInfo/VETargetInfo.cpp | 3 +- llvm/lib/Target/VE/TargetInfo/VETargetInfo.h | 20 + llvm/lib/Target/VE/VE.h | 293 +- llvm/lib/Target/VE/VE.td | 8 + llvm/lib/Target/VE/VEAsmPrinter.cpp | 283 +- llvm/lib/Target/VE/VECallingConv.td | 70 + llvm/lib/Target/VE/VEFrameLowering.cpp | 185 +- llvm/lib/Target/VE/VEFrameLowering.h | 24 +- llvm/lib/Target/VE/VEISelDAGToDAG.cpp | 269 + llvm/lib/Target/VE/VEISelLowering.cpp | 863 +- llvm/lib/Target/VE/VEISelLowering.h | 49 +- llvm/lib/Target/VE/VEInstrFormats.td | 176 +- llvm/lib/Target/VE/VEInstrInfo.cpp | 494 +- llvm/lib/Target/VE/VEInstrInfo.h | 43 +- llvm/lib/Target/VE/VEInstrInfo.td | 1991 +- llvm/lib/Target/VE/VEMCInstLower.cpp | 17 +- llvm/lib/Target/VE/VEMachineFunctionInfo.cpp | 13 + llvm/lib/Target/VE/VEMachineFunctionInfo.h | 48 + llvm/lib/Target/VE/VERegisterInfo.cpp | 62 +- llvm/lib/Target/VE/VERegisterInfo.h | 2 +- llvm/lib/Target/VE/VERegisterInfo.td | 131 +- llvm/lib/Target/VE/VESubtarget.cpp | 2 +- llvm/lib/Target/VE/VESubtarget.h | 2 +- llvm/lib/Target/VE/VETargetMachine.cpp | 8 +- llvm/lib/Target/VE/VETargetMachine.h | 2 + .../WebAssembly/AsmParser/WebAssemblyAsmParser.cpp | 45 +- .../Disassembler/WebAssemblyDisassembler.cpp | 20 +- .../MCTargetDesc/WebAssemblyAsmBackend.cpp | 4 +- .../MCTargetDesc/WebAssemblyFixupKinds.h | 1 + .../MCTargetDesc/WebAssemblyInstPrinter.cpp | 36 +- .../MCTargetDesc/WebAssemblyInstPrinter.h | 3 +- .../MCTargetDesc/WebAssemblyMCCodeEmitter.cpp | 4 + .../MCTargetDesc/WebAssemblyMCTargetDesc.h | 434 +- .../MCTargetDesc/WebAssemblyTargetStreamer.cpp | 6 +- .../MCTargetDesc/WebAssemblyTargetStreamer.h | 1 - .../MCTargetDesc/WebAssemblyWasmObjectWriter.cpp | 14 +- .../TargetInfo/WebAssemblyTargetInfo.cpp | 6 + .../WebAssembly/TargetInfo/WebAssemblyTargetInfo.h | 7 + llvm/lib/Target/WebAssembly/WebAssembly.h | 17 +- llvm/lib/Target/WebAssembly/WebAssembly.td | 7 +- .../WebAssemblyAddMissingPrototypes.cpp | 2 +- .../Target/WebAssembly/WebAssemblyAsmPrinter.cpp | 67 +- .../lib/Target/WebAssembly/WebAssemblyAsmPrinter.h | 19 +- llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp | 32 +- .../Target/WebAssembly/WebAssemblyCFGStackify.cpp | 155 +- .../WebAssembly/WebAssemblyCallIndirectFixup.cpp | 150 - .../Target/WebAssembly/WebAssemblyDebugFixup.cpp | 138 + .../WebAssembly/WebAssemblyDebugValueManager.cpp | 8 +- .../WebAssembly/WebAssemblyExceptionInfo.cpp | 23 +- .../Target/WebAssembly/WebAssemblyExceptionInfo.h | 19 +- .../WebAssembly/WebAssemblyExplicitLocals.cpp | 89 +- .../lib/Target/WebAssembly/WebAssemblyFastISel.cpp | 72 +- .../WebAssembly/WebAssemblyFixBrTableDefaults.cpp | 155 + .../WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | 13 +- .../WebAssemblyFixIrreducibleControlFlow.cpp | 58 +- .../WebAssembly/WebAssemblyFrameLowering.cpp | 128 +- .../Target/WebAssembly/WebAssemblyFrameLowering.h | 11 +- llvm/lib/Target/WebAssembly/WebAssemblyISD.def | 3 +- .../Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp | 76 +- .../Target/WebAssembly/WebAssemblyISelLowering.cpp | 564 +- .../Target/WebAssembly/WebAssemblyISelLowering.h | 6 +- .../Target/WebAssembly/WebAssemblyInstrAtomics.td | 837 +- .../WebAssembly/WebAssemblyInstrBulkMemory.td | 30 +- .../lib/Target/WebAssembly/WebAssemblyInstrCall.td | 167 +- .../Target/WebAssembly/WebAssemblyInstrControl.td | 33 +- .../Target/WebAssembly/WebAssemblyInstrFormats.td | 16 +- .../Target/WebAssembly/WebAssemblyInstrInfo.cpp | 7 +- .../lib/Target/WebAssembly/WebAssemblyInstrInfo.td | 49 +- .../Target/WebAssembly/WebAssemblyInstrMemory.td | 480 +- llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td | 2 +- .../lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | 544 +- .../WebAssembly/WebAssemblyLateEHPrepare.cpp | 34 +- .../WebAssembly/WebAssemblyLowerBrUnless.cpp | 2 +- .../WebAssemblyLowerEmscriptenEHSjLj.cpp | 178 +- .../WebAssembly/WebAssemblyLowerGlobalDtors.cpp | 30 +- .../Target/WebAssembly/WebAssemblyMCInstLower.cpp | 29 +- .../WebAssembly/WebAssemblyMachineFunctionInfo.cpp | 34 +- .../WebAssembly/WebAssemblyMachineFunctionInfo.h | 36 +- .../WebAssembly/WebAssemblyMemIntrinsicResults.cpp | 3 +- .../WebAssemblyOptimizeLiveIntervals.cpp | 15 +- .../WebAssembly/WebAssemblyOptimizeReturned.cpp | 15 +- .../lib/Target/WebAssembly/WebAssemblyPeephole.cpp | 7 +- .../Target/WebAssembly/WebAssemblyRegColoring.cpp | 3 + .../Target/WebAssembly/WebAssemblyRegNumbering.cpp | 2 +- .../Target/WebAssembly/WebAssemblyRegStackify.cpp | 179 +- .../Target/WebAssembly/WebAssemblyRegisterInfo.cpp | 21 +- .../WebAssembly/WebAssemblyReplacePhysRegs.cpp | 14 +- .../WebAssemblyRuntimeLibcallSignatures.cpp | 12 +- .../WebAssembly/WebAssemblySelectionDAGInfo.cpp | 28 +- .../WebAssembly/WebAssemblySelectionDAGInfo.h | 15 +- .../WebAssembly/WebAssemblySetP2AlignOperands.cpp | 2 +- .../Target/WebAssembly/WebAssemblySubtarget.cpp | 17 +- llvm/lib/Target/WebAssembly/WebAssemblySubtarget.h | 10 +- .../WebAssembly/WebAssemblyTargetMachine.cpp | 55 +- .../Target/WebAssembly/WebAssemblyTargetMachine.h | 2 +- .../WebAssembly/WebAssemblyTargetTransformInfo.cpp | 14 +- .../WebAssembly/WebAssemblyTargetTransformInfo.h | 1 + .../Target/WebAssembly/WebAssemblyUtilities.cpp | 19 +- llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h | 4 + .../Target/WebAssembly/known_gcc_test_failures.txt | 1 - llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 616 +- llvm/lib/Target/X86/AsmParser/X86Operand.h | 36 +- .../Target/X86/Disassembler/X86Disassembler.cpp | 33 +- .../X86/Disassembler/X86DisassemblerDecoder.h | 15 +- llvm/lib/Target/X86/ImmutableGraph.h | 445 + .../Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp | 5 +- .../Target/X86/MCTargetDesc/X86ATTInstPrinter.h | 14 +- llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 971 +- llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h | 107 +- .../Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp | 4 +- .../Target/X86/MCTargetDesc/X86InstComments.cpp | 195 +- .../X86/MCTargetDesc/X86InstPrinterCommon.cpp | 26 +- .../Target/X86/MCTargetDesc/X86InstPrinterCommon.h | 4 +- .../X86/MCTargetDesc/X86IntelInstPrinter.cpp | 3 +- .../Target/X86/MCTargetDesc/X86IntelInstPrinter.h | 15 +- llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp | 18 +- llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h | 8 +- .../Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp | 696 +- .../Target/X86/MCTargetDesc/X86MCTargetDesc.cpp | 25 +- llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | 13 +- .../Target/X86/MCTargetDesc/X86ShuffleDecode.cpp | 571 + .../lib/Target/X86/MCTargetDesc/X86ShuffleDecode.h | 166 + .../Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp | 8 +- .../X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp | 24 +- llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp | 588 - llvm/lib/Target/X86/Utils/X86ShuffleDecode.h | 176 - llvm/lib/Target/X86/X86.h | 22 +- llvm/lib/Target/X86/X86.td | 73 +- llvm/lib/Target/X86/X86AsmPrinter.cpp | 99 +- llvm/lib/Target/X86/X86AsmPrinter.h | 21 +- .../Target/X86/X86AvoidStoreForwardingBlocks.cpp | 47 +- llvm/lib/Target/X86/X86AvoidTrailingCall.cpp | 97 +- llvm/lib/Target/X86/X86CallFrameOptimization.cpp | 15 +- llvm/lib/Target/X86/X86CallLowering.cpp | 34 +- llvm/lib/Target/X86/X86CallLowering.h | 2 +- llvm/lib/Target/X86/X86CallingConv.cpp | 10 +- llvm/lib/Target/X86/X86CallingConv.td | 5 +- llvm/lib/Target/X86/X86CmovConversion.cpp | 13 +- llvm/lib/Target/X86/X86DiscriminateMemOps.cpp | 2 +- llvm/lib/Target/X86/X86DomainReassignment.cpp | 30 +- llvm/lib/Target/X86/X86EvexToVex.cpp | 6 +- llvm/lib/Target/X86/X86ExpandPseudo.cpp | 89 +- llvm/lib/Target/X86/X86FastISel.cpp | 273 +- llvm/lib/Target/X86/X86FixupBWInsts.cpp | 2 +- llvm/lib/Target/X86/X86FixupLEAs.cpp | 19 +- llvm/lib/Target/X86/X86FixupSetCC.cpp | 8 +- llvm/lib/Target/X86/X86FlagsCopyLowering.cpp | 155 +- llvm/lib/Target/X86/X86FloatingPoint.cpp | 3 + llvm/lib/Target/X86/X86FrameLowering.cpp | 448 +- llvm/lib/Target/X86/X86FrameLowering.h | 68 +- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 1219 +- llvm/lib/Target/X86/X86ISelLowering.cpp | 10153 +++--- llvm/lib/Target/X86/X86ISelLowering.h | 1728 +- llvm/lib/Target/X86/X86IndirectBranchTracking.cpp | 59 +- llvm/lib/Target/X86/X86IndirectThunks.cpp | 270 + llvm/lib/Target/X86/X86InsertPrefetch.cpp | 2 +- llvm/lib/Target/X86/X86InsertWait.cpp | 151 + llvm/lib/Target/X86/X86InstrAMX.td | 119 + llvm/lib/Target/X86/X86InstrAVX512.td | 2614 +- llvm/lib/Target/X86/X86InstrArithmetic.td | 179 +- llvm/lib/Target/X86/X86InstrBuilder.h | 2 +- llvm/lib/Target/X86/X86InstrCompiler.td | 173 +- llvm/lib/Target/X86/X86InstrControl.td | 53 +- llvm/lib/Target/X86/X86InstrFMA.td | 70 +- llvm/lib/Target/X86/X86InstrFMA3Info.cpp | 7 +- llvm/lib/Target/X86/X86InstrFMA3Info.h | 4 - llvm/lib/Target/X86/X86InstrFPStack.td | 97 +- llvm/lib/Target/X86/X86InstrFoldTables.cpp | 206 +- llvm/lib/Target/X86/X86InstrFoldTables.h | 2 +- llvm/lib/Target/X86/X86InstrFormats.td | 47 +- llvm/lib/Target/X86/X86InstrFragmentsSIMD.td | 199 +- llvm/lib/Target/X86/X86InstrInfo.cpp | 1104 +- llvm/lib/Target/X86/X86InstrInfo.h | 72 +- llvm/lib/Target/X86/X86InstrInfo.td | 198 +- llvm/lib/Target/X86/X86InstrMMX.td | 76 +- llvm/lib/Target/X86/X86InstrSGX.td | 6 +- llvm/lib/Target/X86/X86InstrSSE.td | 444 +- llvm/lib/Target/X86/X86InstrShiftRotate.td | 104 +- llvm/lib/Target/X86/X86InstrSystem.td | 73 +- llvm/lib/Target/X86/X86InstrTSX.td | 8 +- llvm/lib/Target/X86/X86InstrVMX.td | 2 +- llvm/lib/Target/X86/X86InstrXOP.td | 22 +- llvm/lib/Target/X86/X86InstructionSelector.cpp | 24 +- llvm/lib/Target/X86/X86InterleavedAccess.cpp | 159 +- llvm/lib/Target/X86/X86IntrinsicsInfo.h | 26 +- llvm/lib/Target/X86/X86LegalizerInfo.cpp | 8 +- llvm/lib/Target/X86/X86LegalizerInfo.h | 4 +- .../X86/X86LoadValueInjectionLoadHardening.cpp | 824 + .../X86/X86LoadValueInjectionRetHardening.cpp | 143 + llvm/lib/Target/X86/X86MCInstLower.cpp | 969 +- llvm/lib/Target/X86/X86MachineFunctionInfo.h | 52 +- llvm/lib/Target/X86/X86MacroFusion.cpp | 2 +- llvm/lib/Target/X86/X86MacroFusion.h | 4 +- llvm/lib/Target/X86/X86OptimizeLEAs.cpp | 2 +- llvm/lib/Target/X86/X86PadShortFunction.cpp | 1 + llvm/lib/Target/X86/X86PartialReduction.cpp | 490 + llvm/lib/Target/X86/X86PfmCounters.td | 10 + llvm/lib/Target/X86/X86RegisterInfo.cpp | 38 +- llvm/lib/Target/X86/X86RegisterInfo.h | 6 +- llvm/lib/Target/X86/X86RegisterInfo.td | 17 +- llvm/lib/Target/X86/X86RetpolineThunks.cpp | 286 - llvm/lib/Target/X86/X86SchedBroadwell.td | 57 +- llvm/lib/Target/X86/X86SchedHaswell.td | 87 +- llvm/lib/Target/X86/X86SchedSandyBridge.td | 21 +- llvm/lib/Target/X86/X86SchedSkylakeClient.td | 65 +- llvm/lib/Target/X86/X86SchedSkylakeServer.td | 336 +- llvm/lib/Target/X86/X86Schedule.td | 17 +- llvm/lib/Target/X86/X86ScheduleAtom.td | 7 +- llvm/lib/Target/X86/X86ScheduleBdVer2.td | 43 +- llvm/lib/Target/X86/X86ScheduleBtVer2.td | 7 +- llvm/lib/Target/X86/X86ScheduleSLM.td | 82 +- llvm/lib/Target/X86/X86ScheduleZnver1.td | 7 +- llvm/lib/Target/X86/X86ScheduleZnver2.td | 96 +- llvm/lib/Target/X86/X86SelectionDAGInfo.cpp | 51 +- llvm/lib/Target/X86/X86SelectionDAGInfo.h | 12 +- .../Target/X86/X86ShuffleDecodeConstantPool.cpp | 19 +- llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h | 9 +- ...86SpeculativeExecutionSideEffectSuppression.cpp | 181 + .../lib/Target/X86/X86SpeculativeLoadHardening.cpp | 443 +- llvm/lib/Target/X86/X86Subtarget.cpp | 17 +- llvm/lib/Target/X86/X86Subtarget.h | 76 +- llvm/lib/Target/X86/X86TargetMachine.cpp | 60 +- llvm/lib/Target/X86/X86TargetMachine.h | 6 +- llvm/lib/Target/X86/X86TargetObjectFile.cpp | 28 +- llvm/lib/Target/X86/X86TargetObjectFile.h | 24 - llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 1766 +- llvm/lib/Target/X86/X86TargetTransformInfo.h | 119 +- llvm/lib/Target/X86/X86VZeroUpper.cpp | 8 + llvm/lib/Target/X86/X86WinAllocaExpander.cpp | 1 + llvm/lib/Target/X86/X86WinEHState.cpp | 99 +- .../Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp | 2 + .../XCore/MCTargetDesc/XCoreMCTargetDesc.cpp | 2 +- .../Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h | 6 - llvm/lib/Target/XCore/XCore.h | 1 - llvm/lib/Target/XCore/XCoreAsmPrinter.cpp | 49 +- llvm/lib/Target/XCore/XCoreFrameLowering.cpp | 45 +- llvm/lib/Target/XCore/XCoreFrameLowering.h | 18 +- llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp | 2 +- llvm/lib/Target/XCore/XCoreISelLowering.cpp | 40 +- llvm/lib/Target/XCore/XCoreISelLowering.h | 8 +- llvm/lib/Target/XCore/XCoreInstrInfo.cpp | 12 +- llvm/lib/Target/XCore/XCoreInstrInfo.h | 4 +- llvm/lib/Target/XCore/XCoreInstrInfo.td | 13 +- llvm/lib/Target/XCore/XCoreMCInstLower.h | 3 +- llvm/lib/Target/XCore/XCoreMachineFunctionInfo.cpp | 12 +- llvm/lib/Target/XCore/XCoreRegisterInfo.cpp | 5 - llvm/lib/Target/XCore/XCoreRegisterInfo.h | 4 - llvm/lib/Target/XCore/XCoreRegisterInfo.td | 10 +- llvm/lib/Target/XCore/XCoreSelectionDAGInfo.cpp | 4 +- llvm/lib/Target/XCore/XCoreSelectionDAGInfo.h | 4 +- llvm/lib/Target/XCore/XCoreTargetMachine.cpp | 2 +- llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp | 7 +- llvm/lib/Target/XCore/XCoreTargetObjectFile.h | 2 +- llvm/lib/TextAPI/MachO/Architecture.cpp | 25 +- llvm/lib/TextAPI/MachO/ArchitectureSet.cpp | 3 +- llvm/lib/TextAPI/MachO/InterfaceFile.cpp | 28 +- llvm/lib/TextAPI/MachO/TextAPIContext.h | 1 - llvm/lib/TextAPI/MachO/TextStub.cpp | 31 +- llvm/lib/TextAPI/MachO/TextStubCommon.cpp | 14 +- llvm/lib/TextAPI/MachO/TextStubCommon.h | 1 - .../lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp | 2 +- llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp | 32 +- llvm/lib/ToolDrivers/llvm-lib/Options.td | 3 + .../AggressiveInstCombine.cpp | 10 + .../AggressiveInstCombineInternal.h | 15 +- .../AggressiveInstCombine/TruncInstCombine.cpp | 40 +- llvm/lib/Transforms/CFGuard/CFGuard.cpp | 13 +- llvm/lib/Transforms/Coroutines/CoroCleanup.cpp | 28 +- llvm/lib/Transforms/Coroutines/CoroEarly.cpp | 67 +- llvm/lib/Transforms/Coroutines/CoroElide.cpp | 211 +- llvm/lib/Transforms/Coroutines/CoroFrame.cpp | 515 +- llvm/lib/Transforms/Coroutines/CoroInstr.h | 17 +- llvm/lib/Transforms/Coroutines/CoroInternal.h | 42 +- llvm/lib/Transforms/Coroutines/CoroSplit.cpp | 318 +- llvm/lib/Transforms/Coroutines/Coroutines.cpp | 7 +- llvm/lib/Transforms/IPO/AlwaysInliner.cpp | 33 +- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 136 +- llvm/lib/Transforms/IPO/Attributor.cpp | 6860 +--- llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 7225 ++++ llvm/lib/Transforms/IPO/BlockExtractor.cpp | 3 +- llvm/lib/Transforms/IPO/CalledValuePropagation.cpp | 31 +- llvm/lib/Transforms/IPO/ConstantMerge.cpp | 12 +- .../lib/Transforms/IPO/DeadArgumentElimination.cpp | 262 +- llvm/lib/Transforms/IPO/ExtractGV.cpp | 13 +- llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 87 +- llvm/lib/Transforms/IPO/FunctionImport.cpp | 133 +- llvm/lib/Transforms/IPO/GlobalDCE.cpp | 9 + llvm/lib/Transforms/IPO/GlobalOpt.cpp | 271 +- llvm/lib/Transforms/IPO/GlobalSplit.cpp | 3 + llvm/lib/Transforms/IPO/HotColdSplitting.cpp | 12 +- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp | 37 +- llvm/lib/Transforms/IPO/IPO.cpp | 2 + llvm/lib/Transforms/IPO/InlineSimple.cpp | 15 +- llvm/lib/Transforms/IPO/Inliner.cpp | 617 +- llvm/lib/Transforms/IPO/LoopExtractor.cpp | 192 +- llvm/lib/Transforms/IPO/LowerTypeTests.cpp | 107 +- llvm/lib/Transforms/IPO/MergeFunctions.cpp | 7 +- llvm/lib/Transforms/IPO/OpenMPOpt.cpp | 1501 + llvm/lib/Transforms/IPO/PartialInlining.cpp | 165 +- llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 166 +- llvm/lib/Transforms/IPO/PruneEH.cpp | 4 +- llvm/lib/Transforms/IPO/SampleProfile.cpp | 186 +- llvm/lib/Transforms/IPO/StripSymbols.cpp | 8 +- .../Transforms/IPO/SyntheticCountsPropagation.cpp | 8 +- llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 422 +- .../Transforms/InstCombine/InstCombineAddSub.cpp | 332 +- .../Transforms/InstCombine/InstCombineAndOrXor.cpp | 231 +- .../InstCombine/InstCombineAtomicRMW.cpp | 14 +- .../Transforms/InstCombine/InstCombineCalls.cpp | 983 +- .../Transforms/InstCombine/InstCombineCasts.cpp | 484 +- .../Transforms/InstCombine/InstCombineCompares.cpp | 498 +- .../Transforms/InstCombine/InstCombineInternal.h | 137 +- .../InstCombine/InstCombineLoadStoreAlloca.cpp | 268 +- .../InstCombine/InstCombineMulDivRem.cpp | 155 +- .../Transforms/InstCombine/InstCombineNegator.cpp | 474 + llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp | 36 +- .../Transforms/InstCombine/InstCombineSelect.cpp | 414 +- .../Transforms/InstCombine/InstCombineShifts.cpp | 43 +- .../InstCombine/InstCombineSimplifyDemanded.cpp | 312 +- .../InstCombine/InstCombineVectorOps.cpp | 559 +- .../InstCombine/InstructionCombining.cpp | 708 +- .../Instrumentation/AddressSanitizer.cpp | 646 +- .../Transforms/Instrumentation/BoundsChecking.cpp | 23 +- llvm/lib/Transforms/Instrumentation/CFGMST.h | 16 +- llvm/lib/Transforms/Instrumentation/CGProfile.cpp | 120 +- .../Instrumentation/ControlHeightReduction.cpp | 143 +- .../Instrumentation/DataFlowSanitizer.cpp | 307 +- .../Transforms/Instrumentation/GCOVProfiling.cpp | 466 +- .../Instrumentation/HWAddressSanitizer.cpp | 207 +- .../Instrumentation/IndirectCallPromotion.cpp | 64 +- .../Transforms/Instrumentation/InstrOrderFile.cpp | 1 - .../Transforms/Instrumentation/InstrProfiling.cpp | 102 +- .../Transforms/Instrumentation/Instrumentation.cpp | 7 +- .../Transforms/Instrumentation/MemorySanitizer.cpp | 865 +- .../Instrumentation/PGOInstrumentation.cpp | 111 +- .../Transforms/Instrumentation/PGOMemOPSizeOpt.cpp | 192 +- .../Transforms/Instrumentation/PoisonChecking.cpp | 73 +- .../Instrumentation/SanitizerCoverage.cpp | 124 +- .../Transforms/Instrumentation/ThreadSanitizer.cpp | 82 +- .../Instrumentation/ValueProfileCollector.cpp | 10 +- .../Instrumentation/ValueProfileCollector.h | 3 +- .../Instrumentation/ValueProfilePlugins.inc | 30 +- .../lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h | 6 +- llvm/lib/Transforms/ObjCARC/DependencyAnalysis.cpp | 5 +- llvm/lib/Transforms/ObjCARC/ObjCARC.h | 12 - llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp | 15 +- llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp | 40 +- llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp | 2 - llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp | 73 +- llvm/lib/Transforms/Scalar/ADCE.cpp | 22 +- .../Transforms/Scalar/AlignmentFromAssumptions.cpp | 247 +- llvm/lib/Transforms/Scalar/BDCE.cpp | 26 +- llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp | 156 +- llvm/lib/Transforms/Scalar/ConstantHoisting.cpp | 20 +- .../Scalar/CorrelatedValuePropagation.cpp | 47 +- llvm/lib/Transforms/Scalar/DCE.cpp | 2 + .../lib/Transforms/Scalar/DeadStoreElimination.cpp | 1230 +- llvm/lib/Transforms/Scalar/DivRemPairs.cpp | 27 + llvm/lib/Transforms/Scalar/EarlyCSE.cpp | 244 +- llvm/lib/Transforms/Scalar/Float2Int.cpp | 11 +- llvm/lib/Transforms/Scalar/GVN.cpp | 101 +- llvm/lib/Transforms/Scalar/GVNHoist.cpp | 14 +- llvm/lib/Transforms/Scalar/GVNSink.cpp | 15 +- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 595 +- .../Scalar/InductiveRangeCheckElimination.cpp | 120 +- llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp | 206 +- llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp | 2 +- llvm/lib/Transforms/Scalar/JumpThreading.cpp | 451 +- llvm/lib/Transforms/Scalar/LICM.cpp | 273 +- llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp | 209 +- llvm/lib/Transforms/Scalar/LoopDeletion.cpp | 44 +- llvm/lib/Transforms/Scalar/LoopDistribute.cpp | 21 +- llvm/lib/Transforms/Scalar/LoopFuse.cpp | 109 +- llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 139 +- llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp | 2 +- llvm/lib/Transforms/Scalar/LoopInterchange.cpp | 65 +- llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | 29 +- llvm/lib/Transforms/Scalar/LoopPassManager.cpp | 13 +- llvm/lib/Transforms/Scalar/LoopPredication.cpp | 57 +- llvm/lib/Transforms/Scalar/LoopRerollPass.cpp | 10 +- llvm/lib/Transforms/Scalar/LoopRotation.cpp | 13 +- llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp | 10 +- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 206 +- .../lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp | 96 +- llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp | 181 +- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 328 +- llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp | 1 - llvm/lib/Transforms/Scalar/LowerAtomic.cpp | 13 +- .../Transforms/Scalar/LowerConstantIntrinsics.cpp | 16 +- .../lib/Transforms/Scalar/LowerExpectIntrinsic.cpp | 77 +- .../Transforms/Scalar/LowerMatrixIntrinsics.cpp | 1531 +- llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp | 136 +- .../Transforms/Scalar/MergedLoadStoreMotion.cpp | 10 +- llvm/lib/Transforms/Scalar/NaryReassociate.cpp | 2 +- llvm/lib/Transforms/Scalar/NewGVN.cpp | 18 +- llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | 5 +- llvm/lib/Transforms/Scalar/Reassociate.cpp | 40 +- .../Transforms/Scalar/RewriteStatepointsForGC.cpp | 193 +- llvm/lib/Transforms/Scalar/SCCP.cpp | 1367 +- llvm/lib/Transforms/Scalar/SROA.cpp | 562 +- llvm/lib/Transforms/Scalar/Scalarizer.cpp | 250 +- .../Scalar/SeparateConstOffsetFromGEP.cpp | 62 +- llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 58 +- llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp | 23 + llvm/lib/Transforms/Scalar/Sink.cpp | 4 +- llvm/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp | 18 +- .../lib/Transforms/Scalar/SpeculativeExecution.cpp | 40 +- llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | 246 +- .../Transforms/Scalar/TailRecursionElimination.cpp | 585 +- .../lib/Transforms/Scalar/WarnMissedTransforms.cpp | 1 + llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp | 246 + llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp | 618 + llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 295 +- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp | 90 +- llvm/lib/Transforms/Utils/BuildLibCalls.cpp | 201 +- llvm/lib/Transforms/Utils/BypassSlowDivision.cpp | 12 +- llvm/lib/Transforms/Utils/CallGraphUpdater.cpp | 167 + llvm/lib/Transforms/Utils/CallPromotionUtils.cpp | 231 +- .../Transforms/Utils/CanonicalizeFreezeInLoops.cpp | 250 + llvm/lib/Transforms/Utils/CloneFunction.cpp | 29 +- llvm/lib/Transforms/Utils/CodeExtractor.cpp | 227 +- llvm/lib/Transforms/Utils/CodeMoverUtils.cpp | 281 +- llvm/lib/Transforms/Utils/Debugify.cpp | 135 +- .../lib/Transforms/Utils/EntryExitInstrumenter.cpp | 1 + llvm/lib/Transforms/Utils/EscapeEnumerator.cpp | 5 +- llvm/lib/Transforms/Utils/Evaluator.cpp | 49 +- llvm/lib/Transforms/Utils/FixIrreducible.cpp | 337 + llvm/lib/Transforms/Utils/FlattenCFG.cpp | 128 +- llvm/lib/Transforms/Utils/FunctionComparator.cpp | 107 +- llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 25 +- llvm/lib/Transforms/Utils/GlobalStatus.cpp | 5 +- llvm/lib/Transforms/Utils/InjectTLIMappings.cpp | 52 +- llvm/lib/Transforms/Utils/InlineFunction.cpp | 432 +- llvm/lib/Transforms/Utils/InstructionNamer.cpp | 2 +- llvm/lib/Transforms/Utils/LCSSA.cpp | 14 +- llvm/lib/Transforms/Utils/Local.cpp | 307 +- llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | 649 +- llvm/lib/Transforms/Utils/LoopSimplify.cpp | 28 +- llvm/lib/Transforms/Utils/LoopUnroll.cpp | 312 +- llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp | 533 +- llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp | 47 +- llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 21 +- llvm/lib/Transforms/Utils/LoopUtils.cpp | 773 +- llvm/lib/Transforms/Utils/LoopVersioning.cpp | 15 +- llvm/lib/Transforms/Utils/LowerInvoke.cpp | 2 +- llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp | 166 +- llvm/lib/Transforms/Utils/LowerSwitch.cpp | 7 - llvm/lib/Transforms/Utils/ModuleUtils.cpp | 25 +- llvm/lib/Transforms/Utils/NameAnonGlobals.cpp | 2 +- llvm/lib/Transforms/Utils/PredicateInfo.cpp | 171 +- .../Transforms/Utils/PromoteMemoryToRegister.cpp | 5 - llvm/lib/Transforms/Utils/SSAUpdater.cpp | 7 +- .../Transforms/Utils/ScalarEvolutionExpander.cpp | 2569 ++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 361 +- llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 34 +- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp | 422 +- llvm/lib/Transforms/Utils/SizeOpts.cpp | 33 +- llvm/lib/Transforms/Utils/StripGCRelocates.cpp | 2 +- llvm/lib/Transforms/Utils/SymbolRewriter.cpp | 30 +- llvm/lib/Transforms/Utils/UnifyLoopExits.cpp | 220 + .../Utils/UniqueInternalLinkageNames.cpp | 97 + llvm/lib/Transforms/Utils/Utils.cpp | 6 + llvm/lib/Transforms/Utils/VNCoercion.cpp | 205 +- llvm/lib/Transforms/Utils/ValueMapper.cpp | 16 +- .../Transforms/Vectorize/LoadStoreVectorizer.cpp | 144 +- .../Vectorize/LoopVectorizationLegality.cpp | 74 +- .../Vectorize/LoopVectorizationPlanner.h | 23 +- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 1305 +- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 730 +- llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h | 95 +- llvm/lib/Transforms/Vectorize/VPlan.cpp | 301 +- llvm/lib/Transforms/Vectorize/VPlan.h | 372 +- llvm/lib/Transforms/Vectorize/VPlanDominatorTree.h | 3 +- llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 31 +- llvm/lib/Transforms/Vectorize/VPlanTransforms.h | 6 +- llvm/lib/Transforms/Vectorize/VPlanValue.h | 55 +- llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp | 1 + llvm/lib/Transforms/Vectorize/VPlanVerifier.h | 8 +- llvm/lib/Transforms/Vectorize/VectorCombine.cpp | 699 + llvm/lib/Transforms/Vectorize/Vectorize.cpp | 4 +- llvm/lib/XRay/FDRTraceExpander.cpp | 6 +- llvm/lib/XRay/FDRTraceWriter.cpp | 14 +- llvm/lib/XRay/InstrumentationMap.cpp | 76 +- llvm/lib/XRay/Trace.cpp | 1 + llvm/tools/bugpoint/CrashDebugger.cpp | 13 +- llvm/tools/bugpoint/ExecutionDriver.cpp | 4 +- llvm/tools/bugpoint/Miscompilation.cpp | 30 +- llvm/tools/bugpoint/OptimizerDriver.cpp | 2 +- llvm/tools/bugpoint/ToolRunner.cpp | 4 +- llvm/tools/bugpoint/ToolRunner.h | 2 +- llvm/tools/bugpoint/bugpoint.cpp | 4 +- llvm/tools/llc/llc.cpp | 192 +- llvm/tools/lli/lli.cpp | 255 +- llvm/tools/llvm-ar/llvm-ar.cpp | 187 +- llvm/tools/llvm-as/llvm-as.cpp | 25 +- llvm/tools/llvm-cov/CodeCoverage.cpp | 36 +- llvm/tools/llvm-cov/CoverageExporterJson.cpp | 19 +- llvm/tools/llvm-cov/CoverageExporterLcov.cpp | 14 +- llvm/tools/llvm-cov/CoverageFilters.cpp | 1 + llvm/tools/llvm-cov/CoverageFilters.h | 10 +- llvm/tools/llvm-cov/CoverageReport.cpp | 16 +- llvm/tools/llvm-cov/CoverageSummaryInfo.cpp | 2 +- llvm/tools/llvm-cov/SourceCoverageView.cpp | 4 +- llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | 11 +- llvm/tools/llvm-cov/gcov.cpp | 28 +- llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp | 4 +- llvm/tools/llvm-diff/DiffConsumer.cpp | 12 +- llvm/tools/llvm-diff/DifferenceEngine.cpp | 30 +- llvm/tools/llvm-dwarfdump/SectionSizes.cpp | 124 + llvm/tools/llvm-dwarfdump/Statistics.cpp | 407 +- llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 136 +- llvm/tools/llvm-dwarfdump/llvm-dwarfdump.h | 43 + llvm/tools/llvm-dwp/DWPError.cpp | 3 + llvm/tools/llvm-dwp/DWPError.h | 23 + llvm/tools/llvm-dwp/DWPStringPool.h | 56 + llvm/tools/llvm-dwp/llvm-dwp.cpp | 795 + llvm/tools/llvm-extract/llvm-extract.cpp | 56 +- llvm/tools/llvm-link/llvm-link.cpp | 83 +- llvm/tools/llvm-lto/llvm-lto.cpp | 65 +- llvm/tools/llvm-lto2/llvm-lto2.cpp | 53 +- llvm/tools/llvm-mc/Disassembler.cpp | 2 +- llvm/tools/llvm-mc/llvm-mc.cpp | 36 +- llvm/tools/llvm-mca/CodeRegion.h | 2 + llvm/tools/llvm-mca/CodeRegionGenerator.cpp | 12 +- llvm/tools/llvm-mca/llvm-mca.cpp | 10 +- llvm/tools/llvm-nm/llvm-nm.cpp | 156 +- llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp | 53 +- llvm/tools/llvm-objcopy/COFF/Reader.cpp | 19 +- llvm/tools/llvm-objcopy/COFF/Writer.cpp | 25 +- llvm/tools/llvm-objcopy/COFF/Writer.h | 1 + llvm/tools/llvm-objcopy/CopyConfig.cpp | 114 +- llvm/tools/llvm-objcopy/CopyConfig.h | 11 +- llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp | 55 +- llvm/tools/llvm-objcopy/ELF/Object.cpp | 173 +- llvm/tools/llvm-objcopy/ELF/Object.h | 7 + llvm/tools/llvm-objcopy/InstallNameToolOpts.td | 12 + .../llvm-objcopy/MachO/MachOLayoutBuilder.cpp | 103 +- llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp | 248 +- llvm/tools/llvm-objcopy/MachO/MachOReader.cpp | 120 +- llvm/tools/llvm-objcopy/MachO/MachOReader.h | 3 + llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp | 100 +- llvm/tools/llvm-objcopy/MachO/MachOWriter.h | 2 + llvm/tools/llvm-objcopy/MachO/Object.cpp | 94 +- llvm/tools/llvm-objcopy/MachO/Object.h | 56 +- llvm/tools/llvm-objcopy/StripOpts.td | 3 + llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 31 +- llvm/tools/llvm-objcopy/wasm/Object.cpp | 36 + llvm/tools/llvm-objcopy/wasm/Object.h | 47 + llvm/tools/llvm-objcopy/wasm/Reader.cpp | 33 + llvm/tools/llvm-objcopy/wasm/Reader.h | 31 + llvm/tools/llvm-objcopy/wasm/WasmObjcopy.cpp | 114 + llvm/tools/llvm-objcopy/wasm/WasmObjcopy.h | 31 + llvm/tools/llvm-objcopy/wasm/Writer.cpp | 78 + llvm/tools/llvm-objcopy/wasm/Writer.h | 50 + llvm/tools/llvm-objdump/COFFDump.cpp | 72 +- llvm/tools/llvm-objdump/COFFDump.h | 37 + llvm/tools/llvm-objdump/ELFDump.cpp | 68 +- llvm/tools/llvm-objdump/ELFDump.h | 39 + llvm/tools/llvm-objdump/MachODump.cpp | 234 +- llvm/tools/llvm-objdump/MachODump.h | 66 + llvm/tools/llvm-objdump/WasmDump.cpp | 13 +- llvm/tools/llvm-objdump/WasmDump.h | 35 + llvm/tools/llvm-objdump/XCOFFDump.cpp | 88 + llvm/tools/llvm-objdump/XCOFFDump.h | 33 + llvm/tools/llvm-objdump/llvm-objdump.cpp | 1505 +- llvm/tools/llvm-objdump/llvm-objdump.h | 78 +- llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp | 15 +- llvm/tools/llvm-pdbutil/FormatUtil.cpp | 12 +- llvm/tools/llvm-pdbutil/FormatUtil.h | 3 +- llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp | 4 +- llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp | 5 +- llvm/tools/llvm-pdbutil/StreamUtil.cpp | 6 +- llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp | 6 +- llvm/tools/llvm-pdbutil/llvm-pdbutil.h | 1 + llvm/tools/llvm-profdata/llvm-profdata.cpp | 274 +- llvm/tools/llvm-readobj/COFFDumper.cpp | 265 +- llvm/tools/llvm-readobj/DwarfCFIEHPrinter.h | 171 +- llvm/tools/llvm-readobj/ELFDumper.cpp | 2020 +- llvm/tools/llvm-readobj/ObjDumper.cpp | 4 +- llvm/tools/llvm-readobj/ObjDumper.h | 4 +- llvm/tools/llvm-readobj/WasmDumper.cpp | 26 +- llvm/tools/llvm-readobj/XCOFFDumper.cpp | 13 +- llvm/tools/llvm-readobj/llvm-readobj.cpp | 38 +- llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp | 6 +- llvm/tools/llvm-size/llvm-size.cpp | 910 + llvm/tools/llvm-stress/llvm-stress.cpp | 13 +- llvm/tools/llvm-strings/llvm-strings.cpp | 120 + llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp | 72 +- llvm/tools/llvm-xray/trie-node.h | 2 +- llvm/tools/llvm-xray/xray-color-helper.cpp | 4 +- llvm/tools/llvm-xray/xray-extract.cpp | 16 +- llvm/tools/llvm-xray/xray-graph-diff.cpp | 12 +- llvm/tools/llvm-xray/xray-graph.cpp | 29 +- llvm/tools/llvm-xray/xray-stacks.cpp | 9 +- llvm/tools/opt/AnalysisWrappers.cpp | 9 +- llvm/tools/opt/NewPMDriver.cpp | 135 +- llvm/tools/opt/NewPMDriver.h | 8 +- llvm/tools/opt/PassPrinters.cpp | 82 +- llvm/tools/opt/PassPrinters.h | 17 +- llvm/tools/opt/PrintSCC.cpp | 11 +- llvm/tools/opt/opt.cpp | 170 +- llvm/utils/TableGen/AsmMatcherEmitter.cpp | 41 +- llvm/utils/TableGen/AsmWriterEmitter.cpp | 123 +- llvm/utils/TableGen/AsmWriterInst.cpp | 6 +- llvm/utils/TableGen/AsmWriterInst.h | 10 +- llvm/utils/TableGen/Attributes.cpp | 124 +- llvm/utils/TableGen/CallingConvEmitter.cpp | 15 +- llvm/utils/TableGen/CodeEmitterGen.cpp | 4 +- llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 45 +- llvm/utils/TableGen/CodeGenDAGPatterns.h | 7 +- llvm/utils/TableGen/CodeGenHwModes.cpp | 2 +- llvm/utils/TableGen/CodeGenHwModes.h | 1 + llvm/utils/TableGen/CodeGenInstruction.cpp | 62 +- llvm/utils/TableGen/CodeGenInstruction.h | 1 + llvm/utils/TableGen/CodeGenIntrinsics.h | 27 +- llvm/utils/TableGen/CodeGenMapTable.cpp | 2 +- llvm/utils/TableGen/CodeGenRegisters.cpp | 68 +- llvm/utils/TableGen/CodeGenRegisters.h | 17 +- llvm/utils/TableGen/CodeGenSchedule.cpp | 40 +- llvm/utils/TableGen/CodeGenSchedule.h | 2 +- llvm/utils/TableGen/CodeGenTarget.cpp | 70 +- llvm/utils/TableGen/DAGISelMatcherEmitter.cpp | 35 +- llvm/utils/TableGen/DAGISelMatcherGen.cpp | 30 +- llvm/utils/TableGen/DFAEmitter.cpp | 21 +- llvm/utils/TableGen/DFAEmitter.h | 10 +- llvm/utils/TableGen/DFAPacketizerEmitter.cpp | 17 +- llvm/utils/TableGen/DirectiveEmitter.cpp | 524 + llvm/utils/TableGen/DisassemblerEmitter.cpp | 8 +- llvm/utils/TableGen/ExegesisEmitter.cpp | 2 +- llvm/utils/TableGen/FastISelEmitter.cpp | 28 +- llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | 101 +- llvm/utils/TableGen/GICombinerEmitter.cpp | 124 +- llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp | 29 +- llvm/utils/TableGen/GlobalISelEmitter.cpp | 250 +- llvm/utils/TableGen/InstrDocsEmitter.cpp | 2 +- llvm/utils/TableGen/InstrInfoEmitter.cpp | 108 +- llvm/utils/TableGen/IntrinsicEmitter.cpp | 70 +- llvm/utils/TableGen/OptParserEmitter.cpp | 269 +- llvm/utils/TableGen/OptRSTEmitter.cpp | 1 + llvm/utils/TableGen/RISCVCompressInstEmitter.cpp | 87 +- llvm/utils/TableGen/RegisterBankEmitter.cpp | 31 +- llvm/utils/TableGen/RegisterInfoEmitter.cpp | 42 +- llvm/utils/TableGen/SearchableTableEmitter.cpp | 39 +- llvm/utils/TableGen/SequenceToOffsetTable.h | 100 +- llvm/utils/TableGen/SubtargetEmitter.cpp | 13 +- llvm/utils/TableGen/SubtargetFeatureInfo.cpp | 54 +- llvm/utils/TableGen/TableGen.cpp | 26 +- llvm/utils/TableGen/TableGenBackends.h | 3 + llvm/utils/TableGen/X86DisassemblerTables.cpp | 33 +- llvm/utils/TableGen/X86ModRMFilters.cpp | 2 + llvm/utils/TableGen/X86ModRMFilters.h | 23 + llvm/utils/TableGen/X86RecognizableInstr.cpp | 50 +- llvm/utils/TableGen/X86RecognizableInstr.h | 38 +- 3105 files changed, 332024 insertions(+), 142785 deletions(-) create mode 100644 llvm/include/llvm-c/Orc.h create mode 100644 llvm/include/llvm/ADT/Bitfields.h create mode 100644 llvm/include/llvm/ADT/CoalescingBitVector.h create mode 100644 llvm/include/llvm/ADT/StringMapEntry.h create mode 100644 llvm/include/llvm/ADT/TypeSwitch.h create mode 100644 llvm/include/llvm/ADT/Waymarking.h create mode 100644 llvm/include/llvm/Analysis/AssumeBundleQueries.h create mode 100644 llvm/include/llvm/Analysis/HeatUtils.h create mode 100644 llvm/include/llvm/Analysis/InlineAdvisor.h create mode 100644 llvm/include/llvm/Analysis/InlineFeaturesAnalysis.h create mode 100644 llvm/include/llvm/Analysis/InlineModelFeatureMaps.h create mode 100644 llvm/include/llvm/Analysis/InlineSizeEstimatorAnalysis.h create mode 100644 llvm/include/llvm/Analysis/LoopNestAnalysis.h create mode 100644 llvm/include/llvm/Analysis/MLInlineAdvisor.h create mode 100644 llvm/include/llvm/Analysis/MLModelRunner.h delete mode 100644 llvm/include/llvm/Analysis/OrderedBasicBlock.h delete mode 100644 llvm/include/llvm/Analysis/OrderedInstructions.h create mode 100644 llvm/include/llvm/Analysis/ScalarEvolutionDivision.h delete mode 100644 llvm/include/llvm/Analysis/ScalarEvolutionExpander.h create mode 100644 llvm/include/llvm/Analysis/StackLifetime.h create mode 100644 llvm/include/llvm/Analysis/Utils/TFUtils.h create mode 100644 llvm/include/llvm/BinaryFormat/ELFRelocs/VE.def create mode 100644 llvm/include/llvm/CodeGen/AntiDepBreaker.h create mode 100644 llvm/include/llvm/CodeGen/CommandFlags.h delete mode 100644 llvm/include/llvm/CodeGen/CommandFlags.inc create mode 100644 llvm/include/llvm/CodeGen/GlobalISel/InlineAsmLowering.h create mode 100644 llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h delete mode 100644 llvm/include/llvm/CodeGen/GlobalISel/Types.h create mode 100644 llvm/include/llvm/CodeGen/IndirectThunks.h create mode 100644 llvm/include/llvm/CodeGen/LiveIntervalCalc.h create mode 100644 llvm/include/llvm/CodeGen/MBFIWrapper.h create mode 100644 llvm/include/llvm/CodeGen/RDFGraph.h create mode 100644 llvm/include/llvm/CodeGen/RDFLiveness.h create mode 100644 llvm/include/llvm/CodeGen/RDFRegisters.h create mode 100644 llvm/include/llvm/CodeGen/Spiller.h create mode 100644 llvm/include/llvm/DWARFLinker/DWARFStreamer.h create mode 100644 llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h create mode 100644 llvm/include/llvm/DebugInfo/GSYM/ObjectFileTransformer.h create mode 100644 llvm/include/llvm/DebugInfo/PDB/Native/NativeEnumLineNumbers.h create mode 100644 llvm/include/llvm/DebugInfo/PDB/Native/NativeFunctionSymbol.h create mode 100644 llvm/include/llvm/DebugInfo/PDB/Native/NativeLineNumber.h create mode 100644 llvm/include/llvm/DebugInfo/PDB/Native/NativePublicSymbol.h create mode 100644 llvm/include/llvm/DebugInfo/PDB/Native/NativeSourceFile.h create mode 100644 llvm/include/llvm/ExecutionEngine/JITLink/ELF.h create mode 100644 llvm/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h create mode 100644 llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h create mode 100644 llvm/include/llvm/ExecutionEngine/Orc/Mangling.h create mode 100644 llvm/include/llvm/Frontend/Directive/DirectiveBase.td create mode 100644 llvm/include/llvm/Frontend/OpenACC/ACC.td create mode 100644 llvm/include/llvm/Frontend/OpenMP/OMP.td create mode 100644 llvm/include/llvm/Frontend/OpenMP/OMPContext.h create mode 100644 llvm/include/llvm/Frontend/OpenMP/OMPGridValues.h create mode 100644 llvm/include/llvm/IR/AbstractCallSite.h delete mode 100644 llvm/include/llvm/IR/CFGDiff.h delete mode 100644 llvm/include/llvm/IR/CallSite.h create mode 100644 llvm/include/llvm/IR/IRBuilderFolder.h create mode 100644 llvm/include/llvm/IR/IntrinsicsHexagonDep.td create mode 100644 llvm/include/llvm/IR/LLVMRemarkStreamer.h create mode 100644 llvm/include/llvm/IR/MatrixBuilder.h create mode 100644 llvm/include/llvm/IR/PassManagerImpl.h delete mode 100644 llvm/include/llvm/IR/RemarkStreamer.h create mode 100644 llvm/include/llvm/IR/VPIntrinsics.def create mode 100644 llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h delete mode 100644 llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc create mode 100644 llvm/include/llvm/Remarks/RemarkStreamer.h create mode 100644 llvm/include/llvm/Support/AllocatorBase.h create mode 100644 llvm/include/llvm/Support/Base64.h create mode 100644 llvm/include/llvm/Support/CFGDiff.h create mode 100644 llvm/include/llvm/Support/ELFAttributeParser.h create mode 100644 llvm/include/llvm/Support/ELFAttributes.h create mode 100644 llvm/include/llvm/Support/ExtensibleRTTI.h create mode 100644 llvm/include/llvm/Support/OptimizedStructLayout.h create mode 100644 llvm/include/llvm/Support/RISCVAttributeParser.h create mode 100644 llvm/include/llvm/Support/RISCVAttributes.h delete mode 100644 llvm/include/llvm/Support/StringPool.h create mode 100644 llvm/include/llvm/Support/SuffixTree.h create mode 100644 llvm/include/llvm/Support/Windows/WindowsSupport.h create mode 100644 llvm/include/llvm/Support/X86TargetParser.h create mode 100644 llvm/include/llvm/Transforms/Coroutines/CoroCleanup.h create mode 100644 llvm/include/llvm/Transforms/Coroutines/CoroEarly.h create mode 100644 llvm/include/llvm/Transforms/Coroutines/CoroElide.h create mode 100644 llvm/include/llvm/Transforms/Coroutines/CoroSplit.h create mode 100644 llvm/include/llvm/Transforms/IPO/OpenMPOpt.h create mode 100644 llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h create mode 100644 llvm/include/llvm/Transforms/Utils/AMDGPUEmitPrintf.h create mode 100644 llvm/include/llvm/Transforms/Utils/AssumeBundleBuilder.h create mode 100644 llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h create mode 100644 llvm/include/llvm/Transforms/Utils/CanonicalizeFreezeInLoops.h create mode 100644 llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h create mode 100644 llvm/include/llvm/Transforms/Utils/UniqueInternalLinkageNames.h create mode 100644 llvm/include/llvm/Transforms/Vectorize/VectorCombine.h create mode 100644 llvm/lib/Analysis/AssumeBundleQueries.cpp create mode 100644 llvm/lib/Analysis/HeatUtils.cpp create mode 100644 llvm/lib/Analysis/InlineAdvisor.cpp create mode 100644 llvm/lib/Analysis/InlineFeaturesAnalysis.cpp create mode 100644 llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp create mode 100644 llvm/lib/Analysis/LoopNestAnalysis.cpp create mode 100644 llvm/lib/Analysis/MLInlineAdvisor.cpp delete mode 100644 llvm/lib/Analysis/OrderedBasicBlock.cpp delete mode 100644 llvm/lib/Analysis/OrderedInstructions.cpp create mode 100644 llvm/lib/Analysis/ReleaseModeModelRunner.cpp create mode 100644 llvm/lib/Analysis/ScalarEvolutionDivision.cpp delete mode 100644 llvm/lib/Analysis/ScalarEvolutionExpander.cpp create mode 100644 llvm/lib/Analysis/StackLifetime.cpp create mode 100644 llvm/lib/Analysis/TFUtils.cpp create mode 100644 llvm/lib/Analysis/models/inliner/saved_model.pbtxt create mode 100644 llvm/lib/Analysis/models/inliner/variables/variables.data-00000-of-00001 create mode 100644 llvm/lib/Analysis/models/inliner/variables/variables.index create mode 100644 llvm/lib/BinaryFormat/MachO.cpp delete mode 100644 llvm/lib/CodeGen/AntiDepBreaker.h create mode 100644 llvm/lib/CodeGen/BBSectionsPrepare.cpp create mode 100644 llvm/lib/CodeGen/CommandFlags.cpp create mode 100644 llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp create mode 100644 llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp create mode 100644 llvm/lib/CodeGen/GlobalISel/LostDebugLocObserver.cpp create mode 100644 llvm/lib/CodeGen/LiveIntervalCalc.cpp create mode 100644 llvm/lib/CodeGen/MBFIWrapper.cpp create mode 100644 llvm/lib/CodeGen/MachineDebugify.cpp create mode 100644 llvm/lib/CodeGen/MachineStripDebug.cpp create mode 100644 llvm/lib/CodeGen/RDFGraph.cpp create mode 100644 llvm/lib/CodeGen/RDFLiveness.cpp create mode 100644 llvm/lib/CodeGen/RDFRegisters.cpp delete mode 100644 llvm/lib/CodeGen/SafeStackColoring.cpp delete mode 100644 llvm/lib/CodeGen/SafeStackColoring.h delete mode 100644 llvm/lib/CodeGen/Spiller.h create mode 100644 llvm/lib/DWARFLinker/DWARFStreamer.cpp create mode 100644 llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp create mode 100644 llvm/lib/DebugInfo/GSYM/ObjectFileTransformer.cpp create mode 100644 llvm/lib/DebugInfo/PDB/Native/NativeEnumLineNumbers.cpp create mode 100644 llvm/lib/DebugInfo/PDB/Native/NativeFunctionSymbol.cpp create mode 100644 llvm/lib/DebugInfo/PDB/Native/NativeLineNumber.cpp create mode 100644 llvm/lib/DebugInfo/PDB/Native/NativePublicSymbol.cpp create mode 100644 llvm/lib/DebugInfo/PDB/Native/NativeSourceFile.cpp create mode 100644 llvm/lib/ExecutionEngine/JITLink/ELF.cpp create mode 100644 llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp create mode 100644 llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp create mode 100644 llvm/lib/ExecutionEngine/Orc/Mangling.cpp create mode 100644 llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp delete mode 100644 llvm/lib/Frontend/OpenMP/OMPConstants.cpp create mode 100644 llvm/lib/Frontend/OpenMP/OMPContext.cpp delete mode 100644 llvm/lib/IR/AttributesCompatFunc.td create mode 100644 llvm/lib/IR/LLVMRemarkStreamer.cpp delete mode 100644 llvm/lib/IR/RemarkStreamer.cpp create mode 100644 llvm/lib/MC/MCInstrInfo.cpp create mode 100644 llvm/lib/MC/MCParser/COFFMasmParser.cpp create mode 100644 llvm/lib/MC/MCParser/MasmParser.cpp create mode 100644 llvm/lib/MC/MCSymbolXCOFF.cpp create mode 100644 llvm/lib/MC/MCTargetOptionsCommandFlags.cpp create mode 100644 llvm/lib/Remarks/RemarkStreamer.cpp create mode 100644 llvm/lib/Support/ELFAttributeParser.cpp create mode 100644 llvm/lib/Support/ELFAttributes.cpp create mode 100644 llvm/lib/Support/ExtensibleRTTI.cpp create mode 100644 llvm/lib/Support/MemAlloc.cpp create mode 100644 llvm/lib/Support/OptimizedStructLayout.cpp create mode 100644 llvm/lib/Support/RISCVAttributeParser.cpp create mode 100644 llvm/lib/Support/RISCVAttributes.cpp delete mode 100644 llvm/lib/Support/StringPool.cpp create mode 100644 llvm/lib/Support/SuffixTree.cpp delete mode 100644 llvm/lib/Support/Windows/WindowsSupport.h create mode 100644 llvm/lib/Support/X86TargetParser.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64CallLowering.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64CallLowering.h create mode 100644 llvm/lib/Target/AArch64/AArch64InstrGISel.td delete mode 100644 llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64LegalizerInfo.h create mode 100644 llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp delete mode 100644 llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h create mode 100644 llvm/lib/Target/AArch64/AArch64SLSHardening.cpp create mode 100644 llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64CallLowering.h create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp create mode 100644 llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.h create mode 100644 llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp create mode 100644 llvm/lib/Target/AMDGPU/AMDGPUCombine.td create mode 100644 llvm/lib/Target/AMDGPU/AMDGPUExportClustering.cpp create mode 100644 llvm/lib/Target/AMDGPU/AMDGPUExportClustering.h create mode 100644 llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp create mode 100644 llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp create mode 100644 llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp delete mode 100644 llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp delete mode 100644 llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h delete mode 100644 llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td create mode 100644 llvm/lib/Target/AMDGPU/SIInsertHardClauses.cpp create mode 100644 llvm/lib/Target/AMDGPU/SIPostRABundler.cpp create mode 100644 llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp delete mode 100644 llvm/lib/Target/AMDGPU/VIInstructions.td create mode 100644 llvm/lib/Target/ARM/ARMInstrCDE.td create mode 100644 llvm/lib/Target/ARM/MVEVPTOptimisationsPass.cpp create mode 100644 llvm/lib/Target/BPF/BPFPreserveDIType.cpp create mode 100644 llvm/lib/Target/Hexagon/HexagonArch.h create mode 100644 llvm/lib/Target/Hexagon/HexagonDepMask.h delete mode 100644 llvm/lib/Target/Hexagon/HexagonInstrFormatsV5.td create mode 100644 llvm/lib/Target/Hexagon/HexagonScheduleV67.td create mode 100644 llvm/lib/Target/Hexagon/HexagonScheduleV67T.td delete mode 100644 llvm/lib/Target/Hexagon/RDFGraph.cpp delete mode 100644 llvm/lib/Target/Hexagon/RDFGraph.h delete mode 100644 llvm/lib/Target/Hexagon/RDFLiveness.cpp delete mode 100644 llvm/lib/Target/Hexagon/RDFLiveness.h delete mode 100644 llvm/lib/Target/Hexagon/RDFRegisters.cpp delete mode 100644 llvm/lib/Target/Hexagon/RDFRegisters.h create mode 100644 llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp create mode 100644 llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.h delete mode 100644 llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp create mode 100644 llvm/lib/Target/PowerPC/PPCInstrPrefix.td create mode 100644 llvm/lib/Target/PowerPC/PPCMacroFusion.cpp create mode 100644 llvm/lib/Target/PowerPC/PPCMacroFusion.def create mode 100644 llvm/lib/Target/PowerPC/PPCMacroFusion.h create mode 100644 llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp create mode 100644 llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h create mode 100644 llvm/lib/Target/RISCV/RISCVInstrFormatsV.td create mode 100644 llvm/lib/Target/RISCV/RISCVInstrInfoB.td create mode 100644 llvm/lib/Target/RISCV/RISCVInstrInfoV.td create mode 100644 llvm/lib/Target/RISCV/RISCVSchedRocket32.td create mode 100644 llvm/lib/Target/RISCV/RISCVSchedRocket64.td create mode 100644 llvm/lib/Target/RISCV/RISCVSchedule.td create mode 100644 llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp create mode 100644 llvm/lib/Target/VE/AsmParser/VEAsmParser.cpp create mode 100644 llvm/lib/Target/VE/Disassembler/VEDisassembler.cpp delete mode 100644 llvm/lib/Target/VE/InstPrinter/VEInstPrinter.cpp delete mode 100644 llvm/lib/Target/VE/InstPrinter/VEInstPrinter.h create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEELFObjectWriter.cpp create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEFixupKinds.h create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.cpp create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEInstPrinter.h create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEMCCodeEmitter.cpp create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEMCExpr.cpp create mode 100644 llvm/lib/Target/VE/MCTargetDesc/VEMCExpr.h create mode 100644 llvm/lib/Target/VE/TargetInfo/VETargetInfo.h create mode 100644 llvm/lib/Target/VE/VEMachineFunctionInfo.cpp create mode 100644 llvm/lib/Target/VE/VEMachineFunctionInfo.h delete mode 100644 llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp create mode 100644 llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp create mode 100644 llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp create mode 100644 llvm/lib/Target/X86/ImmutableGraph.h create mode 100644 llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.cpp create mode 100644 llvm/lib/Target/X86/MCTargetDesc/X86ShuffleDecode.h delete mode 100644 llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp delete mode 100644 llvm/lib/Target/X86/Utils/X86ShuffleDecode.h create mode 100644 llvm/lib/Target/X86/X86IndirectThunks.cpp create mode 100644 llvm/lib/Target/X86/X86InsertWait.cpp create mode 100644 llvm/lib/Target/X86/X86InstrAMX.td create mode 100644 llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp create mode 100644 llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp create mode 100644 llvm/lib/Target/X86/X86PartialReduction.cpp delete mode 100644 llvm/lib/Target/X86/X86RetpolineThunks.cpp create mode 100644 llvm/lib/Target/X86/X86SpeculativeExecutionSideEffectSuppression.cpp create mode 100644 llvm/lib/Transforms/IPO/AttributorAttributes.cpp create mode 100644 llvm/lib/Transforms/IPO/OpenMPOpt.cpp create mode 100644 llvm/lib/Transforms/InstCombine/InstCombineNegator.cpp create mode 100644 llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp create mode 100644 llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp create mode 100644 llvm/lib/Transforms/Utils/CallGraphUpdater.cpp create mode 100644 llvm/lib/Transforms/Utils/CanonicalizeFreezeInLoops.cpp create mode 100644 llvm/lib/Transforms/Utils/FixIrreducible.cpp create mode 100644 llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp create mode 100644 llvm/lib/Transforms/Utils/UnifyLoopExits.cpp create mode 100644 llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp create mode 100644 llvm/lib/Transforms/Vectorize/VectorCombine.cpp create mode 100644 llvm/tools/llvm-dwarfdump/SectionSizes.cpp create mode 100644 llvm/tools/llvm-dwarfdump/llvm-dwarfdump.h create mode 100644 llvm/tools/llvm-dwp/DWPError.cpp create mode 100644 llvm/tools/llvm-dwp/DWPError.h create mode 100644 llvm/tools/llvm-dwp/DWPStringPool.h create mode 100644 llvm/tools/llvm-dwp/llvm-dwp.cpp create mode 100644 llvm/tools/llvm-objcopy/wasm/Object.cpp create mode 100644 llvm/tools/llvm-objcopy/wasm/Object.h create mode 100644 llvm/tools/llvm-objcopy/wasm/Reader.cpp create mode 100644 llvm/tools/llvm-objcopy/wasm/Reader.h create mode 100644 llvm/tools/llvm-objcopy/wasm/WasmObjcopy.cpp create mode 100644 llvm/tools/llvm-objcopy/wasm/WasmObjcopy.h create mode 100644 llvm/tools/llvm-objcopy/wasm/Writer.cpp create mode 100644 llvm/tools/llvm-objcopy/wasm/Writer.h create mode 100644 llvm/tools/llvm-objdump/COFFDump.h create mode 100644 llvm/tools/llvm-objdump/ELFDump.h create mode 100644 llvm/tools/llvm-objdump/MachODump.h create mode 100644 llvm/tools/llvm-objdump/WasmDump.h create mode 100644 llvm/tools/llvm-objdump/XCOFFDump.cpp create mode 100644 llvm/tools/llvm-objdump/XCOFFDump.h create mode 100644 llvm/tools/llvm-size/llvm-size.cpp create mode 100644 llvm/tools/llvm-strings/llvm-strings.cpp create mode 100644 llvm/utils/TableGen/DirectiveEmitter.cpp (limited to 'llvm') diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 7a39731d3e0c9..2c7b4c6eff107 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -144,23 +144,25 @@ typedef enum { } LLVMOpcode; typedef enum { - LLVMVoidTypeKind, /**< type with no size */ - LLVMHalfTypeKind, /**< 16 bit floating point type */ - LLVMFloatTypeKind, /**< 32 bit floating point type */ - LLVMDoubleTypeKind, /**< 64 bit floating point type */ - LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */ - LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/ - LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */ - LLVMLabelTypeKind, /**< Labels */ - LLVMIntegerTypeKind, /**< Arbitrary bit width integers */ - LLVMFunctionTypeKind, /**< Functions */ - LLVMStructTypeKind, /**< Structures */ - LLVMArrayTypeKind, /**< Arrays */ - LLVMPointerTypeKind, /**< Pointers */ - LLVMVectorTypeKind, /**< SIMD 'packed' format, or other vector type */ - LLVMMetadataTypeKind, /**< Metadata */ - LLVMX86_MMXTypeKind, /**< X86 MMX */ - LLVMTokenTypeKind /**< Tokens */ + LLVMVoidTypeKind, /**< type with no size */ + LLVMHalfTypeKind, /**< 16 bit floating point type */ + LLVMFloatTypeKind, /**< 32 bit floating point type */ + LLVMDoubleTypeKind, /**< 64 bit floating point type */ + LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */ + LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/ + LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */ + LLVMLabelTypeKind, /**< Labels */ + LLVMIntegerTypeKind, /**< Arbitrary bit width integers */ + LLVMFunctionTypeKind, /**< Functions */ + LLVMStructTypeKind, /**< Structures */ + LLVMArrayTypeKind, /**< Arrays */ + LLVMPointerTypeKind, /**< Pointers */ + LLVMVectorTypeKind, /**< Fixed width SIMD vector type */ + LLVMMetadataTypeKind, /**< Metadata */ + LLVMX86_MMXTypeKind, /**< X86 MMX */ + LLVMTokenTypeKind, /**< Tokens */ + LLVMScalableVectorTypeKind, /**< Scalable SIMD vector type */ + LLVMBFloatTypeKind /**< 16 bit brain floating point type */ } LLVMTypeKind; typedef enum { @@ -1162,6 +1164,11 @@ unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy); */ LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C); +/** + * Obtain a 16-bit brain floating point type from a context. + */ +LLVMTypeRef LLVMBFloatTypeInContext(LLVMContextRef C); + /** * Obtain a 32-bit floating point type from a context. */ @@ -1194,6 +1201,7 @@ LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C); * These map to the functions in this group of the same name. */ LLVMTypeRef LLVMHalfType(void); +LLVMTypeRef LLVMBFloatType(void); LLVMTypeRef LLVMFloatType(void); LLVMTypeRef LLVMDoubleType(void); LLVMTypeRef LLVMX86FP80Type(void); @@ -2690,7 +2698,7 @@ LLVMValueRef LLVMGetNextGlobalIFunc(LLVMValueRef IFunc); * no previous global aliases. */ LLVMValueRef LLVMGetPreviousGlobalIFunc(LLVMValueRef IFunc); - + /** * Retrieves the resolver function associated with this indirect function, or * NULL if it doesn't not exist. @@ -2944,7 +2952,7 @@ void LLVMInsertExistingBasicBlockAfterInsertBlock(LLVMBuilderRef Builder, */ void LLVMAppendExistingBasicBlock(LLVMValueRef Fn, LLVMBasicBlockRef BB); - + /** * Create a new basic block without inserting it into a function. * @@ -3251,8 +3259,8 @@ LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef C); * This expects an LLVMValueRef that corresponds to a llvm::CallInst or * llvm::InvokeInst. * - * @see llvm::CallInst::getCalledValue() - * @see llvm::InvokeInst::getCalledValue() + * @see llvm::CallInst::getCalledOperand() + * @see llvm::InvokeInst::getCalledOperand() */ LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr); @@ -3755,7 +3763,7 @@ LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name); /** - * Creates and inserts a memset to the specified pointer and the + * Creates and inserts a memset to the specified pointer and the * specified value. * * @see llvm::IRRBuilder::CreateMemSet() @@ -3768,7 +3776,7 @@ LLVMValueRef LLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr, * * @see llvm::IRRBuilder::CreateMemCpy() */ -LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B, +LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size); @@ -3777,7 +3785,7 @@ LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B, * * @see llvm::IRRBuilder::CreateMemMove() */ -LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B, +LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size); diff --git a/llvm/include/llvm-c/DataTypes.h b/llvm/include/llvm-c/DataTypes.h index 893b22b49ffca..0f27ba81865e0 100644 --- a/llvm/include/llvm-c/DataTypes.h +++ b/llvm/include/llvm-c/DataTypes.h @@ -24,12 +24,6 @@ #ifndef LLVM_C_DATATYPES_H #define LLVM_C_DATATYPES_H -#ifdef __cplusplus -#include -#else -#include -#endif - #include #include diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h index e933fe4b3f929..cdf5f5a0cca86 100644 --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -250,6 +250,10 @@ void LLVMDIBuilderFinalize(LLVMDIBuilderRef Builder); * \param SplitDebugInlining Whether to emit inline debug info. * \param DebugInfoForProfiling Whether to emit extra debug info for * profile collection. + * \param SysRoot The Clang system root (value of -isysroot). + * \param SysRootLen The length of the C string passed to \c SysRoot. + * \param SDK The SDK. On Darwin, the last component of the sysroot. + * \param SDKLen The length of the C string passed to \c SDK. */ LLVMMetadataRef LLVMDIBuilderCreateCompileUnit( LLVMDIBuilderRef Builder, LLVMDWARFSourceLanguage Lang, @@ -257,7 +261,8 @@ LLVMMetadataRef LLVMDIBuilderCreateCompileUnit( LLVMBool isOptimized, const char *Flags, size_t FlagsLen, unsigned RuntimeVer, const char *SplitName, size_t SplitNameLen, LLVMDWARFEmissionKind Kind, unsigned DWOId, LLVMBool SplitDebugInlining, - LLVMBool DebugInfoForProfiling); + LLVMBool DebugInfoForProfiling, const char *SysRoot, size_t SysRootLen, + const char *SDK, size_t SDKLen); /** * Create a file descriptor to hold debugging information for a file. @@ -283,15 +288,15 @@ LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, const char *Filename, * \param ConfigMacrosLen The length of the C string passed to \c ConfigMacros. * \param IncludePath The path to the module map file. * \param IncludePathLen The length of the C string passed to \c IncludePath. - * \param SysRoot The Clang system root (value of -isysroot). - * \param SysRootLen The length of the C string passed to \c SysRoot. + * \param APINotesFile The path to an API notes file for the module. + * \param APINotesFileLen The length of the C string passed to \c APINotestFile. */ LLVMMetadataRef LLVMDIBuilderCreateModule(LLVMDIBuilderRef Builder, LLVMMetadataRef ParentScope, const char *Name, size_t NameLen, const char *ConfigMacros, size_t ConfigMacrosLen, const char *IncludePath, size_t IncludePathLen, - const char *SysRoot, size_t SysRootLen); + const char *APINotesFile, size_t APINotesFileLen); /** * Creates a new descriptor for a namespace with the specified parent scope. diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h index f31b97ad7623a..c5fc9bdb4d07f 100644 --- a/llvm/include/llvm-c/ExecutionEngine.h +++ b/llvm/include/llvm-c/ExecutionEngine.h @@ -149,6 +149,11 @@ uint64_t LLVMGetGlobalValueAddress(LLVMExecutionEngineRef EE, const char *Name); uint64_t LLVMGetFunctionAddress(LLVMExecutionEngineRef EE, const char *Name); +/// Returns true on error, false on success. If true is returned then the error +/// message is copied to OutStr and cleared in the ExecutionEngine instance. +LLVMBool LLVMExecutionEngineGetErrMsg(LLVMExecutionEngineRef EE, + char **OutError); + /*===-- Operations on memory managers -------------------------------------===*/ typedef uint8_t *(*LLVMMemoryManagerAllocateCodeSectionCallback)( diff --git a/llvm/include/llvm-c/Orc.h b/llvm/include/llvm-c/Orc.h new file mode 100644 index 0000000000000..09a058846108a --- /dev/null +++ b/llvm/include/llvm-c/Orc.h @@ -0,0 +1,335 @@ +/*===---------------- llvm-c/Orc.h - OrcV2 C bindings -----------*- 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 header declares the C interface to libLLVMOrcJIT.a, which implements *| +|* JIT compilation of LLVM IR. Minimal documentation of C API specific issues *| +|* (especially memory ownership rules) is provided. Core Orc concepts are *| +|* documented in llvm/docs/ORCv2.rst and APIs are documented in the C++ *| +|* headers *| +|* *| +|* Many exotic languages can interoperate with C code but have a harder time *| +|* with C++ due to name mangling. So in addition to C, this interface enables *| +|* tools written in such languages. *| +|* *| +|* Note: This interface is experimental. It is *NOT* stable, and may be *| +|* changed without warning. Only C API usage documentation is *| +|* provided. See the C++ documentation for all higher level ORC API *| +|* details. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_ORC_H +#define LLVM_C_ORC_H + +#include "llvm-c/Error.h" +#include "llvm-c/TargetMachine.h" +#include "llvm-c/Types.h" + +LLVM_C_EXTERN_C_BEGIN + +/** + * Represents an address in the target process. + */ +typedef uint64_t LLVMOrcJITTargetAddress; + +/** + * A reference to an orc::ExecutionSession instance. + */ +typedef struct LLVMOrcOpaqueExecutionSession *LLVMOrcExecutionSessionRef; + +/** + * A reference to an orc::SymbolStringPool table entry. + */ +typedef struct LLVMOrcQuaqueSymbolStringPoolEntryPtr + *LLVMOrcSymbolStringPoolEntryRef; + +/** + * A reference to an orc::JITDylib instance. + */ +typedef struct LLVMOrcOpaqueJITDylib *LLVMOrcJITDylibRef; + +/** + * A reference to an orc::JITDylib::DefinitionGenerator. + */ +typedef struct LLVMOrcOpaqueJITDylibDefinitionGenerator + *LLVMOrcJITDylibDefinitionGeneratorRef; + +/** + * Predicate function for SymbolStringPoolEntries. + */ +typedef int (*LLVMOrcSymbolPredicate)(LLVMOrcSymbolStringPoolEntryRef Sym, + void *Ctx); + +/** + * A reference to an orc::ThreadSafeContext instance. + */ +typedef struct LLVMOrcOpaqueThreadSafeContext *LLVMOrcThreadSafeContextRef; + +/** + * A reference to an orc::ThreadSafeModule instance. + */ +typedef struct LLVMOrcOpaqueThreadSafeModule *LLVMOrcThreadSafeModuleRef; + +/** + * A reference to an orc::JITTargetMachineBuilder instance. + */ +typedef struct LLVMOrcOpaqueJITTargetMachineBuilder + *LLVMOrcJITTargetMachineBuilderRef; + +/** + * A reference to an orc::LLJITBuilder instance. + */ +typedef struct LLVMOrcOpaqueLLJITBuilder *LLVMOrcLLJITBuilderRef; + +/** + * A reference to an orc::LLJIT instance. + */ +typedef struct LLVMOrcOpaqueLLJIT *LLVMOrcLLJITRef; + +/** + * Intern a string in the ExecutionSession's SymbolStringPool and return a + * reference to it. This increments the ref-count of the pool entry, and the + * returned value should be released once the client is done with it by + * calling LLVMOrReleaseSymbolStringPoolEntry. + * + * Since strings are uniqued within the SymbolStringPool + * LLVMOrcSymbolStringPoolEntryRefs can be compared by value to test string + * equality. + * + * Note that this function does not perform linker-mangling on the string. + */ +LLVMOrcSymbolStringPoolEntryRef +LLVMOrcExecutionSessionIntern(LLVMOrcExecutionSessionRef ES, const char *Name); + +/** + * Reduces the ref-count for of a SymbolStringPool entry. + */ +void LLVMOrcReleaseSymbolStringPoolEntry(LLVMOrcSymbolStringPoolEntryRef S); + +/** + * Dispose of a JITDylib::DefinitionGenerator. This should only be called if + * ownership has not been passed to a JITDylib (e.g. because some error + * prevented the client from calling LLVMOrcJITDylibAddGenerator). + */ +void LLVMOrcDisposeJITDylibDefinitionGenerator( + LLVMOrcJITDylibDefinitionGeneratorRef DG); + +/** + * Add a JITDylib::DefinitionGenerator to the given JITDylib. + * + * The JITDylib will take ownership of the given generator: The client is no + * longer responsible for managing its memory. + */ +void LLVMOrcJITDylibAddGenerator(LLVMOrcJITDylibRef JD, + LLVMOrcJITDylibDefinitionGeneratorRef DG); + +/** + * Get a DynamicLibrarySearchGenerator that will reflect process symbols into + * the JITDylib. On success the resulting generator is owned by the client. + * Ownership is typically transferred by adding the instance to a JITDylib + * using LLVMOrcJITDylibAddGenerator, + * + * The GlobalPrefix argument specifies the character that appears on the front + * of linker-mangled symbols for the target platform (e.g. '_' on MachO). + * If non-null, this character will be stripped from the start of all symbol + * strings before passing the remaining substring to dlsym. + * + * The optional Filter and Ctx arguments can be used to supply a symbol name + * filter: Only symbols for which the filter returns true will be visible to + * JIT'd code. If the Filter argument is null then all process symbols will + * be visible to JIT'd code. Note that the symbol name passed to the Filter + * function is the full mangled symbol: The client is responsible for stripping + * the global prefix if present. + */ +LLVMErrorRef LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess( + LLVMOrcJITDylibDefinitionGeneratorRef *Result, char GlobalPrefx, + LLVMOrcSymbolPredicate Filter, void *FilterCtx); + +/** + * Create a ThreadSafeContext containing a new LLVMContext. + * + * Ownership of the underlying ThreadSafeContext data is shared: Clients + * can and should dispose of their ThreadSafeContext as soon as they no longer + * need to refer to it directly. Other references (e.g. from ThreadSafeModules + * will keep the data alive as long as it is needed. + */ +LLVMOrcThreadSafeContextRef LLVMOrcCreateNewThreadSafeContext(void); + +/** + * Get a reference to the wrapped LLVMContext. + */ +LLVMContextRef +LLVMOrcThreadSafeContextGetContext(LLVMOrcThreadSafeContextRef TSCtx); + +/** + * Dispose of a ThreadSafeContext. + */ +void LLVMOrcDisposeThreadSafeContext(LLVMOrcThreadSafeContextRef TSCtx); + +/** + * Create a ThreadSafeModule wrapper around the given LLVM module. This takes + * ownership of the M argument which should not be disposed of or referenced + * after this function returns. + * + * Ownership of the ThreadSafeModule is unique: If it is transferred to the JIT + * (e.g. by LLVMOrcLLJITAddLLVMIRModule), in which case the client is no longer + * responsible for it. If it is not transferred to the JIT then the client + * should call LLVMOrcDisposeThreadSafeModule to dispose of it. + */ +LLVMOrcThreadSafeModuleRef +LLVMOrcCreateNewThreadSafeModule(LLVMModuleRef M, + LLVMOrcThreadSafeContextRef TSCtx); + +/** + * Dispose of a ThreadSafeModule. This should only be called if ownership has + * not been passed to LLJIT (e.g. because some error prevented the client from + * adding this to the JIT). + */ +void LLVMOrcDisposeThreadSafeModule(LLVMOrcThreadSafeModuleRef TSM); + +/** + * Create a JITTargetMachineBuilder by detecting the host. + * + * On success the client owns the resulting JITTargetMachineBuilder. It must be + * passed to a consuming operation (e.g. LLVMOrcCreateLLJITBuilder) or disposed + * of by calling LLVMOrcDisposeJITTargetMachineBuilder. + */ +LLVMErrorRef LLVMOrcJITTargetMachineBuilderDetectHost( + LLVMOrcJITTargetMachineBuilderRef *Result); + +/** + * Create a JITTargetMachineBuilder from the given TargetMachine template. + * + * This operation takes ownership of the given TargetMachine and destroys it + * before returing. The resulting JITTargetMachineBuilder is owned by the client + * and must be passed to a consuming operation (e.g. LLVMOrcCreateLLJITBuilder) + * or disposed of by calling LLVMOrcDisposeJITTargetMachineBuilder. + */ +LLVMOrcJITTargetMachineBuilderRef +LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(LLVMTargetMachineRef TM); + +/** + * Dispose of a JITTargetMachineBuilder. + */ +void LLVMOrcDisposeJITTargetMachineBuilder( + LLVMOrcJITTargetMachineBuilderRef JTMB); + +/** + * Create an LLJITTargetMachineBuilder. + * + * The client owns the resulting LLJITBuilder and should dispose of it using + * LLVMOrcDisposeLLJITBuilder once they are done with it. + */ +LLVMOrcLLJITBuilderRef LLVMOrcCreateLLJITBuilder(void); + +/** + * Dispose of an LLVMOrcLLJITBuilderRef. This should only be called if ownership + * has not been passed to LLVMOrcCreateLLJIT (e.g. because some error prevented + * that function from being called). + */ +void LLVMOrcDisposeLLJITBuilder(LLVMOrcLLJITBuilderRef Builder); + +/** + * Set the JITTargetMachineBuilder to be used when constructing the LLJIT + * instance. Calling this function is optional: if it is not called then the + * LLJITBuilder will use JITTargeTMachineBuilder::detectHost to construct a + * JITTargetMachineBuilder. + */ +void LLVMOrcLLJITBuilderSetJITTargetMachineBuilder( + LLVMOrcLLJITBuilderRef Builder, LLVMOrcJITTargetMachineBuilderRef JTMB); + +/** + * Create an LLJIT instance from an LLJITBuilder. + * + * This operation takes ownership of the Builder argument: clients should not + * dispose of the builder after calling this function (even if the function + * returns an error). If a null Builder argument is provided then a + * default-constructed LLJITBuilder will be used. + * + * On success the resulting LLJIT instance is uniquely owned by the client and + * automatically manages the memory of all JIT'd code and all modules that are + * transferred to it (e.g. via LLVMOrcLLJITAddLLVMIRModule). Disposing of the + * LLJIT instance will free all memory managed by the JIT, including JIT'd code + * and not-yet compiled modules. + */ +LLVMErrorRef LLVMOrcCreateLLJIT(LLVMOrcLLJITRef *Result, + LLVMOrcLLJITBuilderRef Builder); + +/** + * Dispose of an LLJIT instance. + */ +LLVMErrorRef LLVMOrcDisposeLLJIT(LLVMOrcLLJITRef J); + +/** + * Get a reference to the ExecutionSession for this LLJIT instance. + * + * The ExecutionSession is owned by the LLJIT instance. The client is not + * responsible for managing its memory. + */ +LLVMOrcExecutionSessionRef LLVMOrcLLJITGetExecutionSession(LLVMOrcLLJITRef J); + +/** + * Return a reference to the Main JITDylib. + * + * The JITDylib is owned by the LLJIT instance. The client is not responsible + * for managing its memory. + */ +LLVMOrcJITDylibRef LLVMOrcLLJITGetMainJITDylib(LLVMOrcLLJITRef J); + +/** + * Return the target triple for this LLJIT instance. This string is owned by + * the LLJIT instance and should not be freed by the client. + */ +const char *LLVMOrcLLJITGetTripleString(LLVMOrcLLJITRef J); + +/** + * Returns the global prefix character according to the LLJIT's DataLayout. + */ +char LLVMOrcLLJITGetGlobalPrefix(LLVMOrcLLJITRef J); + +/** + * Mangles the given string according to the LLJIT instance's DataLayout, then + * interns the result in the SymbolStringPool and returns a reference to the + * pool entry. Clients should call LLVMOrcReleaseSymbolStringPoolEntry to + * decrement the ref-count on the pool entry once they are finished with this + * value. + */ +LLVMOrcSymbolStringPoolEntryRef +LLVMOrcLLJITMangleAndIntern(LLVMOrcLLJITRef J, const char *UnmangledName); + +/** + * Add a buffer representing an object file to the given JITDylib in the given + * LLJIT instance. This operation transfers ownership of the buffer to the + * LLJIT instance. The buffer should not be disposed of or referenced once this + * function returns. + */ +LLVMErrorRef LLVMOrcLLJITAddObjectFile(LLVMOrcLLJITRef J, LLVMOrcJITDylibRef JD, + LLVMMemoryBufferRef ObjBuffer); + +/** + * Add an IR module to the given JITDylib of the given LLJIT instance. This + * operation transfers ownership of the TSM argument to the LLJIT instance. + * The TSM argument should not be 3disposed of or referenced once this + * function returns. + */ +LLVMErrorRef LLVMOrcLLJITAddLLVMIRModule(LLVMOrcLLJITRef J, + LLVMOrcJITDylibRef JD, + LLVMOrcThreadSafeModuleRef TSM); +/** + * Look up the given symbol in the main JITDylib of the given LLJIT instance. + * + * This operation does not take ownership of the Name argument. + */ +LLVMErrorRef LLVMOrcLLJITLookup(LLVMOrcLLJITRef J, + LLVMOrcJITTargetAddress *Result, + const char *Name); + +LLVM_C_EXTERN_C_END + +#endif /* LLVM_C_ORC_H */ diff --git a/llvm/include/llvm-c/Transforms/Coroutines.h b/llvm/include/llvm-c/Transforms/Coroutines.h index 15798af7d661b..03b6822033c92 100644 --- a/llvm/include/llvm-c/Transforms/Coroutines.h +++ b/llvm/include/llvm-c/Transforms/Coroutines.h @@ -21,6 +21,7 @@ #include "llvm-c/ExternC.h" #include "llvm-c/Types.h" +#include "llvm-c/Transforms/PassManagerBuilder.h" LLVM_C_EXTERN_C_BEGIN @@ -43,6 +44,9 @@ void LLVMAddCoroElidePass(LLVMPassManagerRef PM); /** See llvm::createCoroCleanupLegacyPass function. */ void LLVMAddCoroCleanupPass(LLVMPassManagerRef PM); +/** See llvm::addCoroutinePassesToExtensionPoints. */ +void LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB); + /** * @} */ diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h index 97a8f48233202..4dbc77f294c67 100644 --- a/llvm/include/llvm-c/lto.h +++ b/llvm/include/llvm-c/lto.h @@ -46,7 +46,7 @@ typedef bool lto_bool_t; * @{ */ -#define LTO_API_VERSION 26 +#define LTO_API_VERSION 27 /** * \since prior to LTO_API_VERSION=3 @@ -297,6 +297,21 @@ lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index); extern const char* lto_module_get_linkeropts(lto_module_t mod); +/** + * If targeting mach-o on darwin, this function gets the CPU type and subtype + * that will end up being encoded in the mach-o header. These are the values + * that can be found in mach/machine.h. + * + * \p out_cputype and \p out_cpusubtype must be non-NULL. + * + * Returns true on error (check lto_get_error_message() for details). + * + * \since LTO_API_VERSION=27 + */ +extern lto_bool_t lto_module_get_macho_cputype(lto_module_t mod, + unsigned int *out_cputype, + unsigned int *out_cpusubtype); + /** * Diagnostic severity. * diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h index ed25b2cd89f13..876e52c150a05 100644 --- a/llvm/include/llvm/ADT/APFloat.h +++ b/llvm/include/llvm/ADT/APFloat.h @@ -18,6 +18,7 @@ #include "llvm/ADT/APInt.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/FloatingPointMode.h" #include "llvm/Support/ErrorHandling.h" #include @@ -141,7 +142,7 @@ enum lostFraction { // Example of truncated bits: // members. struct APFloatBase { typedef APInt::WordType integerPart; - static const unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; + static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD; /// A signed type to represent a floating point numbers unbiased exponent. typedef int32_t ExponentType; @@ -150,6 +151,7 @@ struct APFloatBase { /// @{ enum Semantics { S_IEEEhalf, + S_BFloat, S_IEEEsingle, S_IEEEdouble, S_x87DoubleExtended, @@ -161,6 +163,7 @@ struct APFloatBase { static Semantics SemanticsToEnum(const llvm::fltSemantics &Sem); static const fltSemantics &IEEEhalf() LLVM_READNONE; + static const fltSemantics &BFloat() LLVM_READNONE; static const fltSemantics &IEEEsingle() LLVM_READNONE; static const fltSemantics &IEEEdouble() LLVM_READNONE; static const fltSemantics &IEEEquad() LLVM_READNONE; @@ -182,13 +185,15 @@ struct APFloatBase { }; /// IEEE-754R 4.3: Rounding-direction attributes. - enum roundingMode { - rmNearestTiesToEven, - rmTowardPositive, - rmTowardNegative, - rmTowardZero, - rmNearestTiesToAway - }; + using roundingMode = llvm::RoundingMode; + + static constexpr roundingMode rmNearestTiesToEven = + RoundingMode::NearestTiesToEven; + static constexpr roundingMode rmTowardPositive = RoundingMode::TowardPositive; + static constexpr roundingMode rmTowardNegative = RoundingMode::TowardNegative; + static constexpr roundingMode rmTowardZero = RoundingMode::TowardZero; + static constexpr roundingMode rmNearestTiesToAway = + RoundingMode::NearestTiesToAway; /// IEEE-754R 7: Default exception handling. /// @@ -511,6 +516,7 @@ private: opStatus divideSpecials(const IEEEFloat &); opStatus multiplySpecials(const IEEEFloat &); opStatus modSpecials(const IEEEFloat &); + opStatus remainderSpecials(const IEEEFloat&); /// @} @@ -537,6 +543,7 @@ private: /// @} APInt convertHalfAPFloatToAPInt() const; + APInt convertBFloatAPFloatToAPInt() const; APInt convertFloatAPFloatToAPInt() const; APInt convertDoubleAPFloatToAPInt() const; APInt convertQuadrupleAPFloatToAPInt() const; @@ -544,6 +551,7 @@ private: APInt convertPPCDoubleDoubleAPFloatToAPInt() const; void initFromAPInt(const fltSemantics *Sem, const APInt &api); void initFromHalfAPInt(const APInt &api); + void initFromBFloatAPInt(const APInt &api); void initFromFloatAPInt(const APInt &api); void initFromDoubleAPInt(const APInt &api); void initFromQuadrupleAPInt(const APInt &api); @@ -585,7 +593,7 @@ IEEEFloat scalbn(IEEEFloat X, int Exp, IEEEFloat::roundingMode); IEEEFloat frexp(const IEEEFloat &Val, int &Exp, IEEEFloat::roundingMode RM); // This mode implements more precise float in terms of two APFloats. -// The interface and layout is designed for arbitray underlying semantics, +// The interface and layout is designed for arbitrary underlying semantics, // though currently only PPCDoubleDouble semantics are supported, whose // corresponding underlying semantics are IEEEdouble. class DoubleAPFloat final : public APFloatBase { @@ -853,8 +861,8 @@ public: APFloat(const fltSemantics &Semantics) : U(Semantics) {} APFloat(const fltSemantics &Semantics, StringRef S); APFloat(const fltSemantics &Semantics, integerPart I) : U(Semantics, I) {} - template ::value>::type> + template ::value>> APFloat(const fltSemantics &Semantics, T V) = delete; // TODO: Remove this constructor. This isn't faster than the first one. APFloat(const fltSemantics &Semantics, uninitializedTag) @@ -950,9 +958,10 @@ public: /// Returns a float which is bitcasted from an all one value int. /// + /// \param Semantics - type float semantics /// \param BitWidth - Select float type - /// \param isIEEE - If 128 bit number, select between PPC and IEEE - static APFloat getAllOnesValue(unsigned BitWidth, bool isIEEE = false); + static APFloat getAllOnesValue(const fltSemantics &Semantics, + unsigned BitWidth); /// Used to insert APFloat objects, or objects that contain APFloat objects, /// into FoldingSets. @@ -1035,6 +1044,13 @@ public: APFLOAT_DISPATCH_ON_SEMANTICS(next(nextDown)); } + /// Negate an APFloat. + APFloat operator-() const { + APFloat Result(*this); + Result.changeSign(); + return Result; + } + /// Add two APFloats, rounding ties to the nearest even. /// No error checking. APFloat operator+(const APFloat &RHS) const { @@ -1117,7 +1133,27 @@ public: double convertToDouble() const { return getIEEE().convertToDouble(); } float convertToFloat() const { return getIEEE().convertToFloat(); } - bool operator==(const APFloat &) const = delete; + bool operator==(const APFloat &RHS) const { return compare(RHS) == cmpEqual; } + + bool operator!=(const APFloat &RHS) const { return compare(RHS) != cmpEqual; } + + bool operator<(const APFloat &RHS) const { + return compare(RHS) == cmpLessThan; + } + + bool operator>(const APFloat &RHS) const { + return compare(RHS) == cmpGreaterThan; + } + + bool operator<=(const APFloat &RHS) const { + cmpResult Res = compare(RHS); + return Res == cmpLessThan || Res == cmpEqual; + } + + bool operator>=(const APFloat &RHS) const { + cmpResult Res = compare(RHS); + return Res == cmpGreaterThan || Res == cmpEqual; + } cmpResult compare(const APFloat &RHS) const { assert(&getSemantics() == &RHS.getSemantics() && @@ -1249,7 +1285,7 @@ inline APFloat minnum(const APFloat &A, const APFloat &B) { return B; if (B.isNaN()) return A; - return (B.compare(A) == APFloat::cmpLessThan) ? B : A; + return B < A ? B : A; } /// Implements IEEE maxNum semantics. Returns the larger of the 2 arguments if @@ -1260,7 +1296,7 @@ inline APFloat maxnum(const APFloat &A, const APFloat &B) { return B; if (B.isNaN()) return A; - return (A.compare(B) == APFloat::cmpLessThan) ? B : A; + return A < B ? B : A; } /// Implements IEEE 754-2018 minimum semantics. Returns the smaller of 2 @@ -1273,7 +1309,7 @@ inline APFloat minimum(const APFloat &A, const APFloat &B) { return B; if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative())) return A.isNegative() ? A : B; - return (B.compare(A) == APFloat::cmpLessThan) ? B : A; + return B < A ? B : A; } /// Implements IEEE 754-2018 maximum semantics. Returns the larger of 2 @@ -1286,7 +1322,7 @@ inline APFloat maximum(const APFloat &A, const APFloat &B) { return B; if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative())) return A.isNegative() ? B : A; - return (A.compare(B) == APFloat::cmpLessThan) ? B : A; + return A < B ? B : A; } } // namespace llvm diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h index 0791a6d686a3f..f7df648d27ed6 100644 --- a/llvm/include/llvm/ADT/APInt.h +++ b/llvm/include/llvm/ADT/APInt.h @@ -84,7 +84,7 @@ public: UP, }; - static const WordType WORDTYPE_MAX = ~WordType(0); + static constexpr WordType WORDTYPE_MAX = ~WordType(0); private: /// This union is used to store the integer value. When the @@ -616,9 +616,11 @@ public: } /// Wrap version of getBitsSet. - /// If \p hiBit is no less than \p loBit, this is same with getBitsSet. - /// If \p hiBit is less than \p loBit, the set bits "wrap". For example, with - /// parameters (32, 28, 4), you would get 0xF000000F. + /// If \p hiBit is bigger than \p loBit, this is same with getBitsSet. + /// If \p hiBit is not bigger than \p loBit, the set bits "wrap". For example, + /// with parameters (32, 28, 4), you would get 0xF000000F. + /// If \p hiBit is equal to \p loBit, you would get a result with all bits + /// set. static APInt getBitsSetWithWrap(unsigned numBits, unsigned loBit, unsigned hiBit) { APInt Res(numBits, 0); @@ -1448,12 +1450,13 @@ public: } /// Set the bits from loBit (inclusive) to hiBit (exclusive) to 1. - /// This function handles "wrap" case when \p loBit > \p hiBit, and calls - /// setBits when \p loBit <= \p hiBit. + /// This function handles "wrap" case when \p loBit >= \p hiBit, and calls + /// setBits when \p loBit < \p hiBit. + /// For \p loBit == \p hiBit wrap case, set every bit to 1. void setBitsWithWrap(unsigned loBit, unsigned hiBit) { assert(hiBit <= BitWidth && "hiBit out of range"); assert(loBit <= BitWidth && "loBit out of range"); - if (loBit <= hiBit) { + if (loBit < hiBit) { setBits(loBit, hiBit); return; } @@ -2283,7 +2286,7 @@ void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, unsigned StoreBytes); /// LoadIntFromMemory - Loads the integer stored in the LoadBytes bytes starting /// from Src into IntVal, which is assumed to be wide enough and to hold zero. -void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes); +void LoadIntFromMemory(APInt &IntVal, const uint8_t *Src, unsigned LoadBytes); } // namespace llvm diff --git a/llvm/include/llvm/ADT/AllocatorList.h b/llvm/include/llvm/ADT/AllocatorList.h index 405a2e4264dfb..447d7a7538db6 100644 --- a/llvm/include/llvm/ADT/AllocatorList.h +++ b/llvm/include/llvm/ADT/AllocatorList.h @@ -110,8 +110,8 @@ private: template IteratorImpl(const IteratorImpl &X, - typename std::enable_if::value>::type * = nullptr) + std::enable_if_t::value> * = nullptr) : base_type(X.wrapped()) {} ~IteratorImpl() = default; diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h index 49657e02a9911..0aded628cda4a 100644 --- a/llvm/include/llvm/ADT/Any.h +++ b/llvm/include/llvm/ADT/Any.h @@ -59,26 +59,26 @@ public: // When T is Any or T is not copy-constructible we need to explicitly disable // the forwarding constructor so that the copy constructor gets selected // instead. - template < - typename T, - typename std::enable_if< - llvm::conjunction< - llvm::negation::type, Any>>, - // We also disable this overload when an `Any` object can be - // converted to the parameter type because in that case, this - // constructor may combine with that conversion during overload - // resolution for determining copy constructibility, and then - // when we try to determine copy constructibility below we may - // infinitely recurse. This is being evaluated by the standards - // committee as a potential DR in `std::any` as well, but we're - // going ahead and adopting it to work-around usage of `Any` with - // types that need to be implicitly convertible from an `Any`. - llvm::negation::type>>, - std::is_copy_constructible::type>>::value, - int>::type = 0> + template , Any>>, + // We also disable this overload when an `Any` object can be + // converted to the parameter type because in that case, + // this constructor may combine with that conversion during + // overload resolution for determining copy + // constructibility, and then when we try to determine copy + // constructibility below we may infinitely recurse. This is + // being evaluated by the standards committee as a potential + // DR in `std::any` as well, but we're going ahead and + // adopting it to work-around usage of `Any` with types that + // need to be implicitly convertible from an `Any`. + llvm::negation>>, + std::is_copy_constructible>>::value, + int> = 0> Any(T &&Value) { - using U = typename std::decay::type; - Storage = std::make_unique>(std::forward(Value)); + Storage = + std::make_unique>>(std::forward(Value)); } Any(Any &&Other) : Storage(std::move(Other.Storage)) {} @@ -114,32 +114,27 @@ template const char Any::TypeId::Id = 0; template bool any_isa(const Any &Value) { if (!Value.Storage) return false; - using U = - typename std::remove_cv::type>::type; - return Value.Storage->id() == &Any::TypeId::Id; + return Value.Storage->id() == + &Any::TypeId>>::Id; } template T any_cast(const Any &Value) { - using U = - typename std::remove_cv::type>::type; - return static_cast(*any_cast(&Value)); + return static_cast( + *any_cast>>(&Value)); } template T any_cast(Any &Value) { - using U = - typename std::remove_cv::type>::type; - return static_cast(*any_cast(&Value)); + return static_cast( + *any_cast>>(&Value)); } template T any_cast(Any &&Value) { - using U = - typename std::remove_cv::type>::type; - return static_cast(std::move(*any_cast(&Value))); + return static_cast(std::move( + *any_cast>>(&Value))); } template const T *any_cast(const Any *Value) { - using U = - typename std::remove_cv::type>::type; + using U = std::remove_cv_t>; assert(Value && any_isa(*Value) && "Bad any cast!"); if (!Value || !any_isa(*Value)) return nullptr; @@ -147,7 +142,7 @@ template const T *any_cast(const Any *Value) { } template T *any_cast(Any *Value) { - using U = typename std::decay::type; + using U = std::decay_t; assert(Value && any_isa(*Value) && "Bad any cast!"); if (!Value || !any_isa(*Value)) return nullptr; diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h index 3d22442918cdc..5ed4d0766c34d 100644 --- a/llvm/include/llvm/ADT/ArrayRef.h +++ b/llvm/include/llvm/ADT/ArrayRef.h @@ -38,7 +38,7 @@ namespace llvm { /// This is intended to be trivially copyable, so it should be passed by /// value. template - class LLVM_NODISCARD ArrayRef { + class LLVM_GSL_POINTER LLVM_NODISCARD ArrayRef { public: using iterator = const T *; using const_iterator = const T *; @@ -114,30 +114,28 @@ namespace llvm { /// Construct an ArrayRef from ArrayRef. This uses SFINAE to /// ensure that only ArrayRefs of pointers can be converted. template - ArrayRef( - const ArrayRef &A, - typename std::enable_if< - std::is_convertible::value>::type * = nullptr) - : Data(A.data()), Length(A.size()) {} + ArrayRef(const ArrayRef &A, + std::enable_if_t::value> + * = nullptr) + : Data(A.data()), Length(A.size()) {} /// Construct an ArrayRef from a SmallVector. This is /// templated in order to avoid instantiating SmallVectorTemplateCommon /// whenever we copy-construct an ArrayRef. - template + template /*implicit*/ ArrayRef( - const SmallVectorTemplateCommon &Vec, - typename std::enable_if< - std::is_convertible::value>::type * = nullptr) - : Data(Vec.data()), Length(Vec.size()) { - } + const SmallVectorTemplateCommon &Vec, + std::enable_if_t::value> * = + nullptr) + : Data(Vec.data()), Length(Vec.size()) {} /// Construct an ArrayRef from std::vector. This uses SFINAE /// to ensure that only vectors of pointers can be converted. - template + template ArrayRef(const std::vector &Vec, - typename std::enable_if< - std::is_convertible::value>::type* = 0) - : Data(Vec.data()), Length(Vec.size()) {} + std::enable_if_t::value> + * = 0) + : Data(Vec.data()), Length(Vec.size()) {} /// @} /// @name Simple Operations @@ -256,7 +254,7 @@ namespace llvm { /// The declaration here is extra complicated so that "arrayRef = {}" /// continues to select the move assignment operator. template - typename std::enable_if::value, ArrayRef>::type & + std::enable_if_t::value, ArrayRef> & operator=(U &&Temporary) = delete; /// Disallow accidental assignment from a temporary. @@ -264,7 +262,7 @@ namespace llvm { /// The declaration here is extra complicated so that "arrayRef = {}" /// continues to select the move assignment operator. template - typename std::enable_if::value, ArrayRef>::type & + std::enable_if_t::value, ArrayRef> & operator=(std::initializer_list) = delete; /// @} @@ -308,17 +306,17 @@ namespace llvm { /// Construct an empty MutableArrayRef from None. /*implicit*/ MutableArrayRef(NoneType) : ArrayRef() {} - /// Construct an MutableArrayRef from a single element. + /// Construct a MutableArrayRef from a single element. /*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef(OneElt) {} - /// Construct an MutableArrayRef from a pointer and length. + /// Construct a MutableArrayRef from a pointer and length. /*implicit*/ MutableArrayRef(T *data, size_t length) : ArrayRef(data, length) {} - /// Construct an MutableArrayRef from a range. + /// Construct a MutableArrayRef from a range. MutableArrayRef(T *begin, T *end) : ArrayRef(begin, end) {} - /// Construct an MutableArrayRef from a SmallVector. + /// Construct a MutableArrayRef from a SmallVector. /*implicit*/ MutableArrayRef(SmallVectorImpl &Vec) : ArrayRef(Vec) {} @@ -326,12 +324,12 @@ namespace llvm { /*implicit*/ MutableArrayRef(std::vector &Vec) : ArrayRef(Vec) {} - /// Construct an ArrayRef from a std::array + /// Construct a MutableArrayRef from a std::array template /*implicit*/ constexpr MutableArrayRef(std::array &Arr) : ArrayRef(Arr) {} - /// Construct an MutableArrayRef from a C array. + /// Construct a MutableArrayRef from a C array. template /*implicit*/ constexpr MutableArrayRef(T (&Arr)[N]) : ArrayRef(Arr) {} @@ -534,11 +532,21 @@ namespace llvm { return LHS.equals(RHS); } - template + template + inline bool operator==(SmallVectorImpl &LHS, ArrayRef RHS) { + return ArrayRef(LHS).equals(RHS); + } + + template inline bool operator!=(ArrayRef LHS, ArrayRef RHS) { return !(LHS == RHS); } + template + inline bool operator!=(SmallVectorImpl &LHS, ArrayRef RHS) { + return !(LHS == RHS); + } + /// @} template hash_code hash_value(ArrayRef S) { diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h index 5284be8c4a027..a8d0f07af94a2 100644 --- a/llvm/include/llvm/ADT/BitVector.h +++ b/llvm/include/llvm/ADT/BitVector.h @@ -14,6 +14,7 @@ #define LLVM_ADT_BITVECTOR_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Support/MathExtras.h" #include @@ -531,24 +532,10 @@ public: // Comparison operators. bool operator==(const BitVector &RHS) const { - unsigned ThisWords = NumBitWords(size()); - unsigned RHSWords = NumBitWords(RHS.size()); - unsigned i; - for (i = 0; i != std::min(ThisWords, RHSWords); ++i) - if (Bits[i] != RHS.Bits[i]) - return false; - - // Verify that any extra words are all zeros. - if (i != ThisWords) { - for (; i != ThisWords; ++i) - if (Bits[i]) - return false; - } else if (i != RHSWords) { - for (; i != RHSWords; ++i) - if (RHS.Bits[i]) - return false; - } - return true; + if (size() != RHS.size()) + return false; + unsigned NumWords = NumBitWords(size()); + return Bits.take_front(NumWords) == RHS.Bits.take_front(NumWords); } bool operator!=(const BitVector &RHS) const { @@ -719,6 +706,14 @@ public: if (this == &RHS) return *this; Size = RHS.size(); + + // Handle tombstone when the BitVector is a key of a DenseHash. + if (RHS.isInvalid()) { + std::free(Bits.data()); + Bits = None; + return *this; + } + unsigned RHSWords = NumBitWords(Size); if (Size <= getBitCapacity()) { if (Size) @@ -758,6 +753,16 @@ public: std::swap(Size, RHS.Size); } + void invalid() { + assert(!Size && Bits.empty()); + Size = (unsigned)-1; + } + bool isInvalid() const { return Size == (unsigned)-1; } + + ArrayRef getData() const { + return Bits.take_front(NumBitWords(size())); + } + //===--------------------------------------------------------------------===// // Portable bit mask operations. //===--------------------------------------------------------------------===// @@ -932,6 +937,23 @@ inline size_t capacity_in_bytes(const BitVector &X) { return X.getMemorySize(); } +template <> struct DenseMapInfo { + static inline BitVector getEmptyKey() { return BitVector(); } + static inline BitVector getTombstoneKey() { + BitVector V; + V.invalid(); + return V; + } + static unsigned getHashValue(const BitVector &V) { + return DenseMapInfo>>::getHashValue( + std::make_pair(V.size(), V.getData())); + } + static bool isEqual(const BitVector &LHS, const BitVector &RHS) { + if (LHS.isInvalid() || RHS.isInvalid()) + return LHS.isInvalid() == RHS.isInvalid(); + return LHS == RHS; + } +}; } // end namespace llvm namespace std { diff --git a/llvm/include/llvm/ADT/Bitfields.h b/llvm/include/llvm/ADT/Bitfields.h new file mode 100644 index 0000000000000..d93f6483fa527 --- /dev/null +++ b/llvm/include/llvm/ADT/Bitfields.h @@ -0,0 +1,289 @@ +//===-- llvm/ADT/Bitfield.h - Get and Set bits in an integer ---*- 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 +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// This file implements methods to test, set and extract typed bits from packed +/// unsigned integers. +/// +/// Why not C++ bitfields? +/// ---------------------- +/// C++ bitfields do not offer control over the bit layout nor consistent +/// behavior when it comes to out of range values. +/// For instance, the layout is implementation defined and adjacent bits may be +/// packed together but are not required to. This is problematic when storage is +/// sparse and data must be stored in a particular integer type. +/// +/// The methods provided in this file ensure precise control over the +/// layout/storage as well as protection against out of range values. +/// +/// Usage example +/// ------------- +/// \code{.cpp} +/// uint8_t Storage = 0; +/// +/// // Store and retrieve a single bit as bool. +/// using Bool = Bitfield::Element; +/// Bitfield::set(Storage, true); +/// EXPECT_EQ(Storage, 0b00000001); +/// // ^ +/// EXPECT_EQ(Bitfield::get(Storage), true); +/// +/// // Store and retrieve a 2 bit typed enum. +/// // Note: enum underlying type must be unsigned. +/// enum class SuitEnum : uint8_t { CLUBS, DIAMONDS, HEARTS, SPADES }; +/// // Note: enum maximum value needs to be passed in as last parameter. +/// using Suit = Bitfield::Element; +/// Bitfield::set(Storage, SuitEnum::HEARTS); +/// EXPECT_EQ(Storage, 0b00000101); +/// // ^^ +/// EXPECT_EQ(Bitfield::get(Storage), SuitEnum::HEARTS); +/// +/// // Store and retrieve a 5 bit value as unsigned. +/// using Value = Bitfield::Element; +/// Bitfield::set(Storage, 10); +/// EXPECT_EQ(Storage, 0b01010101); +/// // ^^^^^ +/// EXPECT_EQ(Bitfield::get(Storage), 10U); +/// +/// // Interpret the same 5 bit value as signed. +/// using SignedValue = Bitfield::Element; +/// Bitfield::set(Storage, -2); +/// EXPECT_EQ(Storage, 0b11110101); +/// // ^^^^^ +/// EXPECT_EQ(Bitfield::get(Storage), -2); +/// +/// // Ability to efficiently test if a field is non zero. +/// EXPECT_TRUE(Bitfield::test(Storage)); +/// +/// // Alter Storage changes value. +/// Storage = 0; +/// EXPECT_EQ(Bitfield::get(Storage), false); +/// EXPECT_EQ(Bitfield::get(Storage), SuitEnum::CLUBS); +/// EXPECT_EQ(Bitfield::get(Storage), 0U); +/// EXPECT_EQ(Bitfield::get(Storage), 0); +/// +/// Storage = 255; +/// EXPECT_EQ(Bitfield::get(Storage), true); +/// EXPECT_EQ(Bitfield::get(Storage), SuitEnum::SPADES); +/// EXPECT_EQ(Bitfield::get(Storage), 31U); +/// EXPECT_EQ(Bitfield::get(Storage), -1); +/// \endcode +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ADT_BITFIELDS_H +#define LLVM_ADT_BITFIELDS_H + +#include +#include // CHAR_BIT +#include // size_t +#include // uintXX_t +#include // numeric_limits +#include + +namespace llvm { + +namespace bitfields_details { + +/// A struct defining useful bit patterns for n-bits integer types. +template struct BitPatterns { + /// Bit patterns are forged using the equivalent `Unsigned` type because of + /// undefined operations over signed types (e.g. Bitwise shift operators). + /// Moreover same size casting from unsigned to signed is well defined but not + /// the other way around. + using Unsigned = typename std::make_unsigned::type; + static_assert(sizeof(Unsigned) == sizeof(T), "Types must have same size"); + + static constexpr unsigned TypeBits = sizeof(Unsigned) * CHAR_BIT; + static_assert(TypeBits >= Bits, "n-bit must fit in T"); + + /// e.g. with TypeBits == 8 and Bits == 6. + static constexpr Unsigned AllZeros = Unsigned(0); // 00000000 + static constexpr Unsigned AllOnes = ~Unsigned(0); // 11111111 + static constexpr Unsigned Umin = AllZeros; // 00000000 + static constexpr Unsigned Umax = AllOnes >> (TypeBits - Bits); // 00111111 + static constexpr Unsigned SignBitMask = Unsigned(1) << (Bits - 1); // 00100000 + static constexpr Unsigned Smax = Umax >> 1U; // 00011111 + static constexpr Unsigned Smin = ~Smax; // 11100000 + static constexpr Unsigned SignExtend = Unsigned(Smin << 1U); // 11000000 +}; + +/// `Compressor` is used to manipulate the bits of a (possibly signed) integer +/// type so it can be packed and unpacked into a `bits` sized integer, +/// `Compressor` is specialized on signed-ness so no runtime cost is incurred. +/// The `pack` method also checks that the passed in `UserValue` is valid. +template ::value> +struct Compressor { + static_assert(std::is_unsigned::value, "T is unsigned"); + using BP = BitPatterns; + + static T pack(T UserValue, T UserMaxValue) { + assert(UserValue <= UserMaxValue && "value is too big"); + assert(UserValue <= BP::Umax && "value is too big"); + return UserValue; + } + + static T unpack(T StorageValue) { return StorageValue; } +}; + +template struct Compressor { + static_assert(std::is_signed::value, "T is signed"); + using BP = BitPatterns; + + static T pack(T UserValue, T UserMaxValue) { + assert(UserValue <= UserMaxValue && "value is too big"); + assert(UserValue <= T(BP::Smax) && "value is too big"); + assert(UserValue >= T(BP::Smin) && "value is too small"); + if (UserValue < 0) + UserValue &= ~BP::SignExtend; + return UserValue; + } + + static T unpack(T StorageValue) { + if (StorageValue >= T(BP::SignBitMask)) + StorageValue |= BP::SignExtend; + return StorageValue; + } +}; + +/// Impl is where Bifield description and Storage are put together to interact +/// with values. +template struct Impl { + static_assert(std::is_unsigned::value, + "Storage must be unsigned"); + using IntegerType = typename Bitfield::IntegerType; + using C = Compressor; + using BP = BitPatterns; + + static constexpr size_t StorageBits = sizeof(StorageType) * CHAR_BIT; + static_assert(Bitfield::FirstBit <= StorageBits, "Data must fit in mask"); + static_assert(Bitfield::LastBit <= StorageBits, "Data must fit in mask"); + static constexpr StorageType Mask = BP::Umax << Bitfield::Shift; + + /// Checks `UserValue` is within bounds and packs it between `FirstBit` and + /// `LastBit` of `Packed` leaving the rest unchanged. + static void update(StorageType &Packed, IntegerType UserValue) { + const StorageType StorageValue = C::pack(UserValue, Bitfield::UserMaxValue); + Packed &= ~Mask; + Packed |= StorageValue << Bitfield::Shift; + } + + /// Interprets bits between `FirstBit` and `LastBit` of `Packed` as + /// an`IntegerType`. + static IntegerType extract(StorageType Packed) { + const StorageType StorageValue = (Packed & Mask) >> Bitfield::Shift; + return C::unpack(StorageValue); + } + + /// Interprets bits between `FirstBit` and `LastBit` of `Packed` as + /// an`IntegerType`. + static StorageType test(StorageType Packed) { return Packed & Mask; } +}; + +/// `Bitfield` deals with the following type: +/// - unsigned enums +/// - signed and unsigned integer +/// - `bool` +/// Internally though we only manipulate integer with well defined and +/// consistent semantics, this excludes typed enums and `bool` that are replaced +/// with their unsigned counterparts. The correct type is restored in the public +/// API. +template ::value> +struct ResolveUnderlyingType { + using type = typename std::underlying_type::type; +}; +template struct ResolveUnderlyingType { + using type = T; +}; +template <> struct ResolveUnderlyingType { + /// In case sizeof(bool) != 1, replace `void` by an additionnal + /// std::conditional. + using type = std::conditional::type; +}; + +} // namespace bitfields_details + +/// Holds functions to get, set or test bitfields. +struct Bitfield { + /// Describes an element of a Bitfield. This type is then used with the + /// Bitfield static member functions. + /// \tparam T The type of the field once in unpacked form. + /// \tparam Offset The position of the first bit. + /// \tparam Size The size of the field. + /// \tparam MaxValue For enums the maximum enum allowed. + template ::value + ? T(0) // coupled with static_assert below + : std::numeric_limits::max()> + struct Element { + using Type = T; + using IntegerType = + typename bitfields_details::ResolveUnderlyingType::type; + static constexpr unsigned Shift = Offset; + static constexpr unsigned Bits = Size; + static constexpr unsigned FirstBit = Offset; + static constexpr unsigned LastBit = Shift + Bits - 1; + static constexpr unsigned NextBit = Shift + Bits; + + private: + template friend struct bitfields_details::Impl; + + static_assert(Bits > 0, "Bits must be non zero"); + static constexpr size_t TypeBits = sizeof(IntegerType) * CHAR_BIT; + static_assert(Bits <= TypeBits, "Bits may not be greater than T size"); + static_assert(!std::is_enum::value || MaxValue != T(0), + "Enum Bitfields must provide a MaxValue"); + static_assert(!std::is_enum::value || + std::is_unsigned::value, + "Enum must be unsigned"); + static_assert(std::is_integral::value && + std::numeric_limits::is_integer, + "IntegerType must be an integer type"); + + static constexpr IntegerType UserMaxValue = + static_cast(MaxValue); + }; + + /// Unpacks the field from the `Packed` value. + template + static typename Bitfield::Type get(StorageType Packed) { + using I = bitfields_details::Impl; + return static_cast(I::extract(Packed)); + } + + /// Return a non-zero value if the field is non-zero. + /// It is more efficient than `getField`. + template + static StorageType test(StorageType Packed) { + using I = bitfields_details::Impl; + return I::test(Packed); + } + + /// Sets the typed value in the provided `Packed` value. + /// The method will asserts if the provided value is too big to fit in. + template + static void set(StorageType &Packed, typename Bitfield::Type Value) { + using I = bitfields_details::Impl; + I::update(Packed, static_cast(Value)); + } + + /// Returns whether the two bitfields share common bits. + template static constexpr bool isOverlapping() { + return A::LastBit >= B::FirstBit && B::LastBit >= A::FirstBit; + } + + template static constexpr bool areContiguous() { return true; } + template + static constexpr bool areContiguous() { + return A::NextBit == B::FirstBit && areContiguous(); + } +}; + +} // namespace llvm + +#endif // LLVM_ADT_BITFIELDS_H diff --git a/llvm/include/llvm/ADT/BitmaskEnum.h b/llvm/include/llvm/ADT/BitmaskEnum.h index 1a18bc721b214..89e5508e08e16 100644 --- a/llvm/include/llvm/ADT/BitmaskEnum.h +++ b/llvm/include/llvm/ADT/BitmaskEnum.h @@ -71,49 +71,49 @@ struct is_bitmask_enum : std::false_type {}; template struct is_bitmask_enum< - E, typename std::enable_if= - 0>::type> : std::true_type {}; + E, std::enable_if_t= 0>> + : std::true_type {}; namespace BitmaskEnumDetail { /// Get a bitmask with 1s in all places up to the high-order bit of E's largest /// value. -template typename std::underlying_type::type Mask() { +template std::underlying_type_t Mask() { // On overflow, NextPowerOf2 returns zero with the type uint64_t, so // subtracting 1 gives us the mask with all bits set, like we want. - return NextPowerOf2(static_cast::type>( + return NextPowerOf2(static_cast>( E::LLVM_BITMASK_LARGEST_ENUMERATOR)) - 1; } /// Check that Val is in range for E, and return Val cast to E's underlying /// type. -template typename std::underlying_type::type Underlying(E Val) { - auto U = static_cast::type>(Val); +template std::underlying_type_t Underlying(E Val) { + auto U = static_cast>(Val); assert(U >= 0 && "Negative enum values are not allowed."); assert(U <= Mask() && "Enum value too large (or largest val too small?)"); return U; } -template ::value>::type> +constexpr unsigned bitWidth(uint64_t Value) { + return Value ? 1 + bitWidth(Value >> 1) : 0; +} + +template ::value>> E operator~(E Val) { return static_cast(~Underlying(Val) & Mask()); } -template ::value>::type> +template ::value>> E operator|(E LHS, E RHS) { return static_cast(Underlying(LHS) | Underlying(RHS)); } -template ::value>::type> +template ::value>> E operator&(E LHS, E RHS) { return static_cast(Underlying(LHS) & Underlying(RHS)); } -template ::value>::type> +template ::value>> E operator^(E LHS, E RHS) { return static_cast(Underlying(LHS) ^ Underlying(RHS)); } @@ -121,22 +121,19 @@ E operator^(E LHS, E RHS) { // |=, &=, and ^= return a reference to LHS, to match the behavior of the // operators on builtin types. -template ::value>::type> +template ::value>> E &operator|=(E &LHS, E RHS) { LHS = LHS | RHS; return LHS; } -template ::value>::type> +template ::value>> E &operator&=(E &LHS, E RHS) { LHS = LHS & RHS; return LHS; } -template ::value>::type> +template ::value>> E &operator^=(E &LHS, E RHS) { LHS = LHS ^ RHS; return LHS; @@ -146,6 +143,10 @@ E &operator^=(E &LHS, E RHS) { // Enable bitmask enums in namespace ::llvm and all nested namespaces. LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); +template ::value>> +constexpr unsigned BitWidth = BitmaskEnumDetail::bitWidth(uint64_t{ + static_cast>( + E::LLVM_BITMASK_LARGEST_ENUMERATOR)}); } // namespace llvm diff --git a/llvm/include/llvm/ADT/CachedHashString.h b/llvm/include/llvm/ADT/CachedHashString.h index 80144fb87e0e4..6233d0fc08fd6 100644 --- a/llvm/include/llvm/ADT/CachedHashString.h +++ b/llvm/include/llvm/ADT/CachedHashString.h @@ -19,9 +19,8 @@ #ifndef LLVM_ADT_CACHED_HASH_STRING_H #define LLVM_ADT_CACHED_HASH_STRING_H -#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/raw_ostream.h" namespace llvm { diff --git a/llvm/include/llvm/ADT/CoalescingBitVector.h b/llvm/include/llvm/ADT/CoalescingBitVector.h new file mode 100644 index 0000000000000..f8c8fec0ec9e7 --- /dev/null +++ b/llvm/include/llvm/ADT/CoalescingBitVector.h @@ -0,0 +1,444 @@ +//===- llvm/ADT/CoalescingBitVector.h - A coalescing bitvector --*- 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 +// +//===----------------------------------------------------------------------===// +/// +/// \file A bitvector that uses an IntervalMap to coalesce adjacent elements +/// into intervals. +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ADT_COALESCINGBITVECTOR_H +#define LLVM_ADT_COALESCINGBITVECTOR_H + +#include "llvm/ADT/IntervalMap.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/iterator_range.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" + +#include +#include + +namespace llvm { + +/// A bitvector that, under the hood, relies on an IntervalMap to coalesce +/// elements into intervals. Good for representing sets which predominantly +/// contain contiguous ranges. Bad for representing sets with lots of gaps +/// between elements. +/// +/// Compared to SparseBitVector, CoalescingBitVector offers more predictable +/// performance for non-sequential find() operations. +/// +/// \tparam IndexT - The type of the index into the bitvector. +/// \tparam N - The first N coalesced intervals of set bits are stored in-place. +template class CoalescingBitVector { + static_assert(std::is_unsigned::value, + "Index must be an unsigned integer."); + + using ThisT = CoalescingBitVector; + + /// An interval map for closed integer ranges. The mapped values are unused. + using MapT = IntervalMap; + + using UnderlyingIterator = typename MapT::const_iterator; + + using IntervalT = std::pair; + +public: + using Allocator = typename MapT::Allocator; + + /// Construct by passing in a CoalescingBitVector::Allocator + /// reference. + CoalescingBitVector(Allocator &Alloc) + : Alloc(&Alloc), Intervals(Alloc) {} + + /// \name Copy/move constructors and assignment operators. + /// @{ + + CoalescingBitVector(const ThisT &Other) + : Alloc(Other.Alloc), Intervals(*Other.Alloc) { + set(Other); + } + + ThisT &operator=(const ThisT &Other) { + clear(); + set(Other); + return *this; + } + + CoalescingBitVector(ThisT &&Other) = delete; + ThisT &operator=(ThisT &&Other) = delete; + + /// @} + + /// Clear all the bits. + void clear() { Intervals.clear(); } + + /// Check whether no bits are set. + bool empty() const { return Intervals.empty(); } + + /// Count the number of set bits. + unsigned count() const { + unsigned Bits = 0; + for (auto It = Intervals.begin(), End = Intervals.end(); It != End; ++It) + Bits += 1 + It.stop() - It.start(); + return Bits; + } + + /// Set the bit at \p Index. + /// + /// This method does /not/ support setting a bit that has already been set, + /// for efficiency reasons. If possible, restructure your code to not set the + /// same bit multiple times, or use \ref test_and_set. + void set(IndexT Index) { + assert(!test(Index) && "Setting already-set bits not supported/efficient, " + "IntervalMap will assert"); + insert(Index, Index); + } + + /// Set the bits set in \p Other. + /// + /// This method does /not/ support setting already-set bits, see \ref set + /// for the rationale. For a safe set union operation, use \ref operator|=. + void set(const ThisT &Other) { + for (auto It = Other.Intervals.begin(), End = Other.Intervals.end(); + It != End; ++It) + insert(It.start(), It.stop()); + } + + /// Set the bits at \p Indices. Used for testing, primarily. + void set(std::initializer_list Indices) { + for (IndexT Index : Indices) + set(Index); + } + + /// Check whether the bit at \p Index is set. + bool test(IndexT Index) const { + const auto It = Intervals.find(Index); + if (It == Intervals.end()) + return false; + assert(It.stop() >= Index && "Interval must end after Index"); + return It.start() <= Index; + } + + /// Set the bit at \p Index. Supports setting an already-set bit. + void test_and_set(IndexT Index) { + if (!test(Index)) + set(Index); + } + + /// Reset the bit at \p Index. Supports resetting an already-unset bit. + void reset(IndexT Index) { + auto It = Intervals.find(Index); + if (It == Intervals.end()) + return; + + // Split the interval containing Index into up to two parts: one from + // [Start, Index-1] and another from [Index+1, Stop]. If Index is equal to + // either Start or Stop, we create one new interval. If Index is equal to + // both Start and Stop, we simply erase the existing interval. + IndexT Start = It.start(); + if (Index < Start) + // The index was not set. + return; + IndexT Stop = It.stop(); + assert(Index <= Stop && "Wrong interval for index"); + It.erase(); + if (Start < Index) + insert(Start, Index - 1); + if (Index < Stop) + insert(Index + 1, Stop); + } + + /// Set union. If \p RHS is guaranteed to not overlap with this, \ref set may + /// be a faster alternative. + void operator|=(const ThisT &RHS) { + // Get the overlaps between the two interval maps. + SmallVector Overlaps; + getOverlaps(RHS, Overlaps); + + // Insert the non-overlapping parts of all the intervals from RHS. + for (auto It = RHS.Intervals.begin(), End = RHS.Intervals.end(); + It != End; ++It) { + IndexT Start = It.start(); + IndexT Stop = It.stop(); + SmallVector NonOverlappingParts; + getNonOverlappingParts(Start, Stop, Overlaps, NonOverlappingParts); + for (IntervalT AdditivePortion : NonOverlappingParts) + insert(AdditivePortion.first, AdditivePortion.second); + } + } + + /// Set intersection. + void operator&=(const ThisT &RHS) { + // Get the overlaps between the two interval maps (i.e. the intersection). + SmallVector Overlaps; + getOverlaps(RHS, Overlaps); + // Rebuild the interval map, including only the overlaps. + clear(); + for (IntervalT Overlap : Overlaps) + insert(Overlap.first, Overlap.second); + } + + /// Reset all bits present in \p Other. + void intersectWithComplement(const ThisT &Other) { + SmallVector Overlaps; + if (!getOverlaps(Other, Overlaps)) { + // If there is no overlap with Other, the intersection is empty. + return; + } + + // Delete the overlapping intervals. Split up intervals that only partially + // intersect an overlap. + for (IntervalT Overlap : Overlaps) { + IndexT OlapStart, OlapStop; + std::tie(OlapStart, OlapStop) = Overlap; + + auto It = Intervals.find(OlapStart); + IndexT CurrStart = It.start(); + IndexT CurrStop = It.stop(); + assert(CurrStart <= OlapStart && OlapStop <= CurrStop && + "Expected some intersection!"); + + // Split the overlap interval into up to two parts: one from [CurrStart, + // OlapStart-1] and another from [OlapStop+1, CurrStop]. If OlapStart is + // equal to CurrStart, the first split interval is unnecessary. Ditto for + // when OlapStop is equal to CurrStop, we omit the second split interval. + It.erase(); + if (CurrStart < OlapStart) + insert(CurrStart, OlapStart - 1); + if (OlapStop < CurrStop) + insert(OlapStop + 1, CurrStop); + } + } + + bool operator==(const ThisT &RHS) const { + // We cannot just use std::equal because it checks the dereferenced values + // of an iterator pair for equality, not the iterators themselves. In our + // case that results in comparison of the (unused) IntervalMap values. + auto ItL = Intervals.begin(); + auto ItR = RHS.Intervals.begin(); + while (ItL != Intervals.end() && ItR != RHS.Intervals.end() && + ItL.start() == ItR.start() && ItL.stop() == ItR.stop()) { + ++ItL; + ++ItR; + } + return ItL == Intervals.end() && ItR == RHS.Intervals.end(); + } + + bool operator!=(const ThisT &RHS) const { return !operator==(RHS); } + + class const_iterator + : public std::iterator { + friend class CoalescingBitVector; + + // For performance reasons, make the offset at the end different than the + // one used in \ref begin, to optimize the common `It == end()` pattern. + static constexpr unsigned kIteratorAtTheEndOffset = ~0u; + + UnderlyingIterator MapIterator; + unsigned OffsetIntoMapIterator = 0; + + // Querying the start/stop of an IntervalMap iterator can be very expensive. + // Cache these values for performance reasons. + IndexT CachedStart = IndexT(); + IndexT CachedStop = IndexT(); + + void setToEnd() { + OffsetIntoMapIterator = kIteratorAtTheEndOffset; + CachedStart = IndexT(); + CachedStop = IndexT(); + } + + /// MapIterator has just changed, reset the cached state to point to the + /// start of the new underlying iterator. + void resetCache() { + if (MapIterator.valid()) { + OffsetIntoMapIterator = 0; + CachedStart = MapIterator.start(); + CachedStop = MapIterator.stop(); + } else { + setToEnd(); + } + } + + /// Advance the iterator to \p Index, if it is contained within the current + /// interval. The public-facing method which supports advancing past the + /// current interval is \ref advanceToLowerBound. + void advanceTo(IndexT Index) { + assert(Index <= CachedStop && "Cannot advance to OOB index"); + if (Index < CachedStart) + // We're already past this index. + return; + OffsetIntoMapIterator = Index - CachedStart; + } + + const_iterator(UnderlyingIterator MapIt) : MapIterator(MapIt) { + resetCache(); + } + + public: + const_iterator() { setToEnd(); } + + bool operator==(const const_iterator &RHS) const { + // Do /not/ compare MapIterator for equality, as this is very expensive. + // The cached start/stop values make that check unnecessary. + return std::tie(OffsetIntoMapIterator, CachedStart, CachedStop) == + std::tie(RHS.OffsetIntoMapIterator, RHS.CachedStart, + RHS.CachedStop); + } + + bool operator!=(const const_iterator &RHS) const { + return !operator==(RHS); + } + + IndexT operator*() const { return CachedStart + OffsetIntoMapIterator; } + + const_iterator &operator++() { // Pre-increment (++It). + if (CachedStart + OffsetIntoMapIterator < CachedStop) { + // Keep going within the current interval. + ++OffsetIntoMapIterator; + } else { + // We reached the end of the current interval: advance. + ++MapIterator; + resetCache(); + } + return *this; + } + + const_iterator operator++(int) { // Post-increment (It++). + const_iterator tmp = *this; + operator++(); + return tmp; + } + + /// Advance the iterator to the first set bit AT, OR AFTER, \p Index. If + /// no such set bit exists, advance to end(). This is like std::lower_bound. + /// This is useful if \p Index is close to the current iterator position. + /// However, unlike \ref find(), this has worst-case O(n) performance. + void advanceToLowerBound(IndexT Index) { + if (OffsetIntoMapIterator == kIteratorAtTheEndOffset) + return; + + // Advance to the first interval containing (or past) Index, or to end(). + while (Index > CachedStop) { + ++MapIterator; + resetCache(); + if (OffsetIntoMapIterator == kIteratorAtTheEndOffset) + return; + } + + advanceTo(Index); + } + }; + + const_iterator begin() const { return const_iterator(Intervals.begin()); } + + const_iterator end() const { return const_iterator(); } + + /// Return an iterator pointing to the first set bit AT, OR AFTER, \p Index. + /// If no such set bit exists, return end(). This is like std::lower_bound. + /// This has worst-case logarithmic performance (roughly O(log(gaps between + /// contiguous ranges))). + const_iterator find(IndexT Index) const { + auto UnderlyingIt = Intervals.find(Index); + if (UnderlyingIt == Intervals.end()) + return end(); + auto It = const_iterator(UnderlyingIt); + It.advanceTo(Index); + return It; + } + + /// Return a range iterator which iterates over all of the set bits in the + /// half-open range [Start, End). + iterator_range half_open_range(IndexT Start, + IndexT End) const { + assert(Start < End && "Not a valid range"); + auto StartIt = find(Start); + if (StartIt == end() || *StartIt >= End) + return {end(), end()}; + auto EndIt = StartIt; + EndIt.advanceToLowerBound(End); + return {StartIt, EndIt}; + } + + void print(raw_ostream &OS) const { + OS << "{"; + for (auto It = Intervals.begin(), End = Intervals.end(); It != End; + ++It) { + OS << "[" << It.start(); + if (It.start() != It.stop()) + OS << ", " << It.stop(); + OS << "]"; + } + OS << "}"; + } + +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) + LLVM_DUMP_METHOD void dump() const { + // LLDB swallows the first line of output after callling dump(). Add + // newlines before/after the braces to work around this. + dbgs() << "\n"; + print(dbgs()); + dbgs() << "\n"; + } +#endif + +private: + void insert(IndexT Start, IndexT End) { Intervals.insert(Start, End, 0); } + + /// Record the overlaps between \p this and \p Other in \p Overlaps. Return + /// true if there is any overlap. + bool getOverlaps(const ThisT &Other, + SmallVectorImpl &Overlaps) const { + for (IntervalMapOverlaps I(Intervals, Other.Intervals); + I.valid(); ++I) + Overlaps.emplace_back(I.start(), I.stop()); + assert(llvm::is_sorted(Overlaps, + [](IntervalT LHS, IntervalT RHS) { + return LHS.second < RHS.first; + }) && + "Overlaps must be sorted"); + return !Overlaps.empty(); + } + + /// Given the set of overlaps between this and some other bitvector, and an + /// interval [Start, Stop] from that bitvector, determine the portions of the + /// interval which do not overlap with this. + void getNonOverlappingParts(IndexT Start, IndexT Stop, + const SmallVectorImpl &Overlaps, + SmallVectorImpl &NonOverlappingParts) { + IndexT NextUncoveredBit = Start; + for (IntervalT Overlap : Overlaps) { + IndexT OlapStart, OlapStop; + std::tie(OlapStart, OlapStop) = Overlap; + + // [Start;Stop] and [OlapStart;OlapStop] overlap iff OlapStart <= Stop + // and Start <= OlapStop. + bool DoesOverlap = OlapStart <= Stop && Start <= OlapStop; + if (!DoesOverlap) + continue; + + // Cover the range [NextUncoveredBit, OlapStart). This puts the start of + // the next uncovered range at OlapStop+1. + if (NextUncoveredBit < OlapStart) + NonOverlappingParts.emplace_back(NextUncoveredBit, OlapStart - 1); + NextUncoveredBit = OlapStop + 1; + if (NextUncoveredBit > Stop) + break; + } + if (NextUncoveredBit <= Stop) + NonOverlappingParts.emplace_back(NextUncoveredBit, Stop); + } + + Allocator *Alloc; + MapT Intervals; +}; + +} // namespace llvm + +#endif // LLVM_ADT_COALESCINGBITVECTOR_H diff --git a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h index d4cdc3c86048f..c3872af2a0b4e 100644 --- a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h +++ b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h @@ -29,7 +29,7 @@ namespace llvm { /// /// P(S) => P(S union pred(S)) /// -/// The minization algorithm uses this dependency information to attempt to +/// The minimization algorithm uses this dependency information to attempt to /// eagerly prune large subsets of changes. As with \see DeltaAlgorithm, the DAG /// is not required to satisfy this property, but the algorithm will run /// substantially fewer tests with appropriate dependencies. \see DeltaAlgorithm diff --git a/llvm/include/llvm/ADT/DeltaAlgorithm.h b/llvm/include/llvm/ADT/DeltaAlgorithm.h index 114b954995302..e1743fd001968 100644 --- a/llvm/include/llvm/ADT/DeltaAlgorithm.h +++ b/llvm/include/llvm/ADT/DeltaAlgorithm.h @@ -54,7 +54,7 @@ private: /// Split - Partition a set of changes \p S into one or two subsets. void Split(const changeset_ty &S, changesetlist_ty &Res); - /// Delta - Minimize a set of \p Changes which has been partioned into + /// Delta - Minimize a set of \p Changes which has been partitioned into /// smaller sets, by attempting to remove individual subsets. changeset_ty Delta(const changeset_ty &Changes, const changesetlist_ty &Sets); diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h index 148d319c86036..34d397cc9793d 100644 --- a/llvm/include/llvm/ADT/DenseMap.h +++ b/llvm/include/llvm/ADT/DenseMap.h @@ -18,6 +18,7 @@ #include "llvm/Support/AlignOf.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/MemAlloc.h" #include "llvm/Support/ReverseIteration.h" #include "llvm/Support/type_traits.h" #include @@ -119,9 +120,8 @@ public: } const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); - if (is_trivially_copyable::value && - is_trivially_copyable::value) { - // Use a simpler loop when these are trivial types. + if (std::is_trivially_destructible::value) { + // Use a simpler loop when values don't need destruction. for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) P->getFirst() = EmptyKey; } else { @@ -150,13 +150,19 @@ public: iterator find(const_arg_type_t Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) - return makeIterator(TheBucket, getBucketsEnd(), *this, true); + return makeIterator(TheBucket, + shouldReverseIterate() ? getBuckets() + : getBucketsEnd(), + *this, true); return end(); } const_iterator find(const_arg_type_t Val) const { const BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) - return makeConstIterator(TheBucket, getBucketsEnd(), *this, true); + return makeConstIterator(TheBucket, + shouldReverseIterate() ? getBuckets() + : getBucketsEnd(), + *this, true); return end(); } @@ -169,14 +175,20 @@ public: iterator find_as(const LookupKeyT &Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) - return makeIterator(TheBucket, getBucketsEnd(), *this, true); + return makeIterator(TheBucket, + shouldReverseIterate() ? getBuckets() + : getBucketsEnd(), + *this, true); return end(); } template const_iterator find_as(const LookupKeyT &Val) const { const BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) - return makeConstIterator(TheBucket, getBucketsEnd(), *this, true); + return makeConstIterator(TheBucket, + shouldReverseIterate() ? getBuckets() + : getBucketsEnd(), + *this, true); return end(); } @@ -210,16 +222,22 @@ public: std::pair try_emplace(KeyT &&Key, Ts &&... Args) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) - return std::make_pair( - makeIterator(TheBucket, getBucketsEnd(), *this, true), - false); // Already in map. + return std::make_pair(makeIterator(TheBucket, + shouldReverseIterate() + ? getBuckets() + : getBucketsEnd(), + *this, true), + false); // Already in map. // Otherwise, insert the new element. TheBucket = InsertIntoBucket(TheBucket, std::move(Key), std::forward(Args)...); - return std::make_pair( - makeIterator(TheBucket, getBucketsEnd(), *this, true), - true); + return std::make_pair(makeIterator(TheBucket, + shouldReverseIterate() + ? getBuckets() + : getBucketsEnd(), + *this, true), + true); } // Inserts key,value pair into the map if the key isn't already in the map. @@ -229,15 +247,21 @@ public: std::pair try_emplace(const KeyT &Key, Ts &&... Args) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) - return std::make_pair( - makeIterator(TheBucket, getBucketsEnd(), *this, true), - false); // Already in map. + return std::make_pair(makeIterator(TheBucket, + shouldReverseIterate() + ? getBuckets() + : getBucketsEnd(), + *this, true), + false); // Already in map. // Otherwise, insert the new element. TheBucket = InsertIntoBucket(TheBucket, Key, std::forward(Args)...); - return std::make_pair( - makeIterator(TheBucket, getBucketsEnd(), *this, true), - true); + return std::make_pair(makeIterator(TheBucket, + shouldReverseIterate() + ? getBuckets() + : getBucketsEnd(), + *this, true), + true); } /// Alternate version of insert() which allows a different, and possibly @@ -250,16 +274,22 @@ public: const LookupKeyT &Val) { BucketT *TheBucket; if (LookupBucketFor(Val, TheBucket)) - return std::make_pair( - makeIterator(TheBucket, getBucketsEnd(), *this, true), - false); // Already in map. + return std::make_pair(makeIterator(TheBucket, + shouldReverseIterate() + ? getBuckets() + : getBucketsEnd(), + *this, true), + false); // Already in map. // Otherwise, insert the new element. TheBucket = InsertIntoBucketWithLookup(TheBucket, std::move(KV.first), std::move(KV.second), Val); - return std::make_pair( - makeIterator(TheBucket, getBucketsEnd(), *this, true), - true); + return std::make_pair(makeIterator(TheBucket, + shouldReverseIterate() + ? getBuckets() + : getBucketsEnd(), + *this, true), + true); } /// insert - Range insertion of pairs. @@ -695,7 +725,7 @@ class DenseMap : public DenseMapBase, unsigned NumBuckets; public: - /// Create a DenseMap wth an optional \p InitialReserve that guarantee that + /// Create a DenseMap with an optional \p InitialReserve that guarantee that /// this number of elements can be inserted in the map without grow() explicit DenseMap(unsigned InitialReserve = 0) { init(InitialReserve); } @@ -1194,19 +1224,21 @@ public: // for const iterator destinations so it doesn't end up as a user defined copy // constructor. template ::type> + typename = std::enable_if_t> DenseMapIterator( const DenseMapIterator &I) : DebugEpochBase::HandleBase(I), Ptr(I.Ptr), End(I.End) {} reference operator*() const { assert(isHandleInSync() && "invalid iterator access!"); + assert(Ptr != End && "dereferencing end() iterator"); if (shouldReverseIterate()) return Ptr[-1]; return *Ptr; } pointer operator->() const { assert(isHandleInSync() && "invalid iterator access!"); + assert(Ptr != End && "dereferencing end() iterator"); if (shouldReverseIterate()) return &(Ptr[-1]); return Ptr; @@ -1229,6 +1261,7 @@ public: inline DenseMapIterator& operator++() { // Preincrement assert(isHandleInSync() && "invalid iterator access!"); + assert(Ptr != End && "incrementing end() iterator"); if (shouldReverseIterate()) { --Ptr; RetreatPastEmptyBuckets(); diff --git a/llvm/include/llvm/ADT/DenseMapInfo.h b/llvm/include/llvm/ADT/DenseMapInfo.h index bd4c60c8f13ed..e465331ac6f7b 100644 --- a/llvm/include/llvm/ADT/DenseMapInfo.h +++ b/llvm/include/llvm/ADT/DenseMapInfo.h @@ -16,8 +16,6 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include "llvm/Support/TypeSize.h" #include #include #include @@ -25,6 +23,24 @@ namespace llvm { +namespace detail { + +/// Simplistic combination of 32-bit hash values into 32-bit hash values. +static inline unsigned combineHashValue(unsigned a, unsigned b) { + uint64_t key = (uint64_t)a << 32 | (uint64_t)b; + key += ~(key << 32); + key ^= (key >> 22); + key += ~(key << 13); + key ^= (key >> 8); + key += (key << 3); + key ^= (key >> 15); + key += ~(key << 27); + key ^= (key >> 31); + return (unsigned)key; +} + +} // end namespace detail + template struct DenseMapInfo { //static inline T getEmptyKey(); @@ -33,18 +49,28 @@ struct DenseMapInfo { //static bool isEqual(const T &LHS, const T &RHS); }; -// Provide DenseMapInfo for all pointers. +// Provide DenseMapInfo for all pointers. Come up with sentinel pointer values +// that are aligned to alignof(T) bytes, but try to avoid requiring T to be +// complete. This allows clients to instantiate DenseMap with forward +// declared key types. Assume that no pointer key type requires more than 4096 +// bytes of alignment. template struct DenseMapInfo { + // The following should hold, but it would require T to be complete: + // static_assert(alignof(T) <= (1 << Log2MaxAlign), + // "DenseMap does not support pointer keys requiring more than " + // "Log2MaxAlign bits of alignment"); + static constexpr uintptr_t Log2MaxAlign = 12; + static inline T* getEmptyKey() { uintptr_t Val = static_cast(-1); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; + Val <<= Log2MaxAlign; return reinterpret_cast(Val); } static inline T* getTombstoneKey() { uintptr_t Val = static_cast(-2); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; + Val <<= Log2MaxAlign; return reinterpret_cast(Val); } @@ -198,17 +224,8 @@ struct DenseMapInfo> { } static unsigned getHashValue(const Pair& PairVal) { - uint64_t key = (uint64_t)FirstInfo::getHashValue(PairVal.first) << 32 - | (uint64_t)SecondInfo::getHashValue(PairVal.second); - key += ~(key << 32); - key ^= (key >> 22); - key += ~(key << 13); - key ^= (key >> 8); - key += (key << 3); - key ^= (key >> 15); - key += ~(key << 27); - key ^= (key >> 31); - return (unsigned)key; + return detail::combineHashValue(FirstInfo::getHashValue(PairVal.first), + SecondInfo::getHashValue(PairVal.second)); } static bool isEqual(const Pair &LHS, const Pair &RHS) { @@ -217,6 +234,56 @@ struct DenseMapInfo> { } }; +// Provide DenseMapInfo for all tuples whose members have info. +template struct DenseMapInfo> { + using Tuple = std::tuple; + + static inline Tuple getEmptyKey() { + return Tuple(DenseMapInfo::getEmptyKey()...); + } + + static inline Tuple getTombstoneKey() { + return Tuple(DenseMapInfo::getTombstoneKey()...); + } + + template + static unsigned getHashValueImpl(const Tuple &values, std::false_type) { + using EltType = typename std::tuple_element::type; + std::integral_constant atEnd; + return detail::combineHashValue( + DenseMapInfo::getHashValue(std::get(values)), + getHashValueImpl(values, atEnd)); + } + + template + static unsigned getHashValueImpl(const Tuple &values, std::true_type) { + return 0; + } + + static unsigned getHashValue(const std::tuple &values) { + std::integral_constant atEnd; + return getHashValueImpl<0>(values, atEnd); + } + + template + static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::false_type) { + using EltType = typename std::tuple_element::type; + std::integral_constant atEnd; + return DenseMapInfo::isEqual(std::get(lhs), std::get(rhs)) && + isEqualImpl(lhs, rhs, atEnd); + } + + template + static bool isEqualImpl(const Tuple &lhs, const Tuple &rhs, std::true_type) { + return true; + } + + static bool isEqual(const Tuple &lhs, const Tuple &rhs) { + std::integral_constant atEnd; + return isEqualImpl<0>(lhs, rhs, atEnd); + } +}; + // Provide DenseMapInfo for StringRefs. template <> struct DenseMapInfo { static inline StringRef getEmptyKey() { @@ -280,21 +347,6 @@ template <> struct DenseMapInfo { static bool isEqual(hash_code LHS, hash_code RHS) { return LHS == RHS; } }; -template <> struct DenseMapInfo { - static inline ElementCount getEmptyKey() { return {~0U, true}; } - static inline ElementCount getTombstoneKey() { return {~0U - 1, false}; } - static unsigned getHashValue(const ElementCount& EltCnt) { - if (EltCnt.Scalable) - return (EltCnt.Min * 37U) - 1U; - - return EltCnt.Min * 37U; - } - - static bool isEqual(const ElementCount& LHS, const ElementCount& RHS) { - return LHS == RHS; - } -}; - } // end namespace llvm #endif // LLVM_ADT_DENSEMAPINFO_H diff --git a/llvm/include/llvm/ADT/DenseSet.h b/llvm/include/llvm/ADT/DenseSet.h index 9afb715ae1db5..07edc3d8e4ec7 100644 --- a/llvm/include/llvm/ADT/DenseSet.h +++ b/llvm/include/llvm/ADT/DenseSet.h @@ -66,6 +66,12 @@ public: explicit DenseSetImpl(unsigned InitialReserve = 0) : TheMap(InitialReserve) {} + template + DenseSetImpl(const InputIt &I, const InputIt &E) + : DenseSetImpl(PowerOf2Ceil(std::distance(I, E))) { + insert(I, E); + } + DenseSetImpl(std::initializer_list Elems) : DenseSetImpl(PowerOf2Ceil(Elems.size())) { insert(Elems.begin(), Elems.end()); diff --git a/llvm/include/llvm/ADT/EnumeratedArray.h b/llvm/include/llvm/ADT/EnumeratedArray.h index a9528115618cf..a66ec9d08c37e 100644 --- a/llvm/include/llvm/ADT/EnumeratedArray.h +++ b/llvm/include/llvm/ADT/EnumeratedArray.h @@ -38,6 +38,7 @@ public: static_cast &>(*this)[Index]); } + inline IndexType size() { return Size; } private: ValueType Underlying[Size]; diff --git a/llvm/include/llvm/ADT/FloatingPointMode.h b/llvm/include/llvm/ADT/FloatingPointMode.h index 670b2368da9fc..3ba8ae1b28557 100644 --- a/llvm/include/llvm/ADT/FloatingPointMode.h +++ b/llvm/include/llvm/ADT/FloatingPointMode.h @@ -14,28 +14,123 @@ #define LLVM_FLOATINGPOINTMODE_H #include "llvm/ADT/StringSwitch.h" +#include "llvm/Support/raw_ostream.h" namespace llvm { -/// Represent handled modes for denormal (aka subnormal) modes in the floating -/// point environment. -enum class DenormalMode { - Invalid = -1, +/// Rounding mode. +/// +/// Enumerates supported rounding modes, as well as some special values. The set +/// of the modes must agree with IEEE-754, 4.3.1 and 4.3.2. The constants +/// assigned to the IEEE rounding modes must agree with the values used by +/// FLT_ROUNDS (C11, 5.2.4.2.2p8). +/// +/// This value is packed into bitfield in some cases, including \c FPOptions, so +/// the rounding mode values and the special value \c Dynamic must fit into the +/// the bit field (now - 3 bits). The value \c Invalid is used only in values +/// returned by intrinsics to indicate errors, it should never be stored as +/// rounding mode value, so it does not need to fit the bit fields. +/// +enum class RoundingMode : int8_t { + // Rounding mode defined in IEEE-754. + TowardZero = 0, ///< roundTowardZero. + NearestTiesToEven = 1, ///< roundTiesToEven. + TowardPositive = 2, ///< roundTowardPositive. + TowardNegative = 3, ///< roundTowardNegative. + NearestTiesToAway = 4, ///< roundTiesToAway. - /// IEEE-754 denormal numbers preserved. - IEEE, + // Special values. + Dynamic = 7, ///< Denotes mode unknown at compile time. + Invalid = -1 ///< Denotes invalid value. +}; + +/// Represent subnormal handling kind for floating point instruction inputs and +/// outputs. +struct DenormalMode { + /// Represent handled modes for denormal (aka subnormal) modes in the floating + /// point environment. + enum DenormalModeKind : int8_t { + Invalid = -1, + + /// IEEE-754 denormal numbers preserved. + IEEE, + + /// The sign of a flushed-to-zero number is preserved in the sign of 0 + PreserveSign, + + /// Denormals are flushed to positive zero. + PositiveZero + }; - /// The sign of a flushed-to-zero number is preserved in the sign of 0 - PreserveSign, + /// Denormal flushing mode for floating point instruction results in the + /// default floating point environment. + DenormalModeKind Output = DenormalModeKind::Invalid; + + /// Denormal treatment kind for floating point instruction inputs in the + /// default floating-point environment. If this is not DenormalModeKind::IEEE, + /// floating-point instructions implicitly treat the input value as 0. + DenormalModeKind Input = DenormalModeKind::Invalid; + + constexpr DenormalMode() = default; + constexpr DenormalMode(DenormalModeKind Out, DenormalModeKind In) : + Output(Out), Input(In) {} + + + static constexpr DenormalMode getInvalid() { + return DenormalMode(DenormalModeKind::Invalid, DenormalModeKind::Invalid); + } - /// Denormals are flushed to positive zero. - PositiveZero + static constexpr DenormalMode getIEEE() { + return DenormalMode(DenormalModeKind::IEEE, DenormalModeKind::IEEE); + } + + static constexpr DenormalMode getPreserveSign() { + return DenormalMode(DenormalModeKind::PreserveSign, + DenormalModeKind::PreserveSign); + } + + static constexpr DenormalMode getPositiveZero() { + return DenormalMode(DenormalModeKind::PositiveZero, + DenormalModeKind::PositiveZero); + } + + bool operator==(DenormalMode Other) const { + return Output == Other.Output && Input == Other.Input; + } + + bool operator!=(DenormalMode Other) const { + return !(*this == Other); + } + + bool isSimple() const { + return Input == Output; + } + + bool isValid() const { + return Output != DenormalModeKind::Invalid && + Input != DenormalModeKind::Invalid; + } + + inline void print(raw_ostream &OS) const; + + inline std::string str() const { + std::string storage; + raw_string_ostream OS(storage); + print(OS); + return OS.str(); + } }; +inline raw_ostream& operator<<(raw_ostream &OS, DenormalMode Mode) { + Mode.print(OS); + return OS; +} + /// Parse the expected names from the denormal-fp-math attribute. -inline DenormalMode parseDenormalFPAttribute(StringRef Str) { +inline DenormalMode::DenormalModeKind +parseDenormalFPAttributeComponent(StringRef Str) { // Assume ieee on unspecified attribute. - return StringSwitch(Str) + return StringSwitch(Str) .Cases("", "ieee", DenormalMode::IEEE) .Case("preserve-sign", DenormalMode::PreserveSign) .Case("positive-zero", DenormalMode::PositiveZero) @@ -44,7 +139,7 @@ inline DenormalMode parseDenormalFPAttribute(StringRef Str) { /// Return the name used for the denormal handling mode used by the the /// expected names from the denormal-fp-math attribute. -inline StringRef denormalModeName(DenormalMode Mode) { +inline StringRef denormalModeKindName(DenormalMode::DenormalModeKind Mode) { switch (Mode) { case DenormalMode::IEEE: return "ieee"; @@ -57,6 +152,26 @@ inline StringRef denormalModeName(DenormalMode Mode) { } } +/// Returns the denormal mode to use for inputs and outputs. +inline DenormalMode parseDenormalFPAttribute(StringRef Str) { + StringRef OutputStr, InputStr; + std::tie(OutputStr, InputStr) = Str.split(','); + + DenormalMode Mode; + Mode.Output = parseDenormalFPAttributeComponent(OutputStr); + + // Maintain compatability with old form of the attribute which only specified + // one component. + Mode.Input = InputStr.empty() ? Mode.Output : + parseDenormalFPAttributeComponent(InputStr); + + return Mode; +} + +void DenormalMode::print(raw_ostream &OS) const { + OS << denormalModeKindName(Output) << ',' << denormalModeKindName(Input); +} + } #endif // LLVM_FLOATINGPOINTMODE_H diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h index 4968b1ea77809..fb1cb03a4b5c7 100644 --- a/llvm/include/llvm/ADT/FoldingSet.h +++ b/llvm/include/llvm/ADT/FoldingSet.h @@ -110,8 +110,6 @@ class StringRef; /// back to the bucket to facilitate node removal. /// class FoldingSetBase { - virtual void anchor(); // Out of line virtual method. - protected: /// Buckets - Array of bucket chains. void **Buckets; @@ -154,11 +152,6 @@ public: /// empty - Returns true if there are no nodes in the folding set. bool empty() const { return NumNodes == 0; } - /// reserve - Increase the number of buckets such that adding the - /// EltCount-th node won't cause a rebucket operation. reserve is permitted - /// to allocate more space than requested by EltCount. - void reserve(unsigned EltCount); - /// capacity - Returns the number of nodes permitted in the folding set /// before a rebucket operation is performed. unsigned capacity() { @@ -167,32 +160,46 @@ public: return NumBuckets * 2; } +protected: + /// Functions provided by the derived class to compute folding properties. + /// This is effectively a vtable for FoldingSetBase, except that we don't + /// actually store a pointer to it in the object. + struct FoldingSetInfo { + /// GetNodeProfile - Instantiations of the FoldingSet template implement + /// this function to gather data bits for the given node. + void (*GetNodeProfile)(const FoldingSetBase *Self, Node *N, + FoldingSetNodeID &ID); + + /// NodeEquals - Instantiations of the FoldingSet template implement + /// this function to compare the given node with the given ID. + bool (*NodeEquals)(const FoldingSetBase *Self, Node *N, + const FoldingSetNodeID &ID, unsigned IDHash, + FoldingSetNodeID &TempID); + + /// ComputeNodeHash - Instantiations of the FoldingSet template implement + /// this function to compute a hash value for the given node. + unsigned (*ComputeNodeHash)(const FoldingSetBase *Self, Node *N, + FoldingSetNodeID &TempID); + }; + private: /// GrowHashTable - Double the size of the hash table and rehash everything. - void GrowHashTable(); + void GrowHashTable(const FoldingSetInfo &Info); /// GrowBucketCount - resize the hash table and rehash everything. /// NewBucketCount must be a power of two, and must be greater than the old /// bucket count. - void GrowBucketCount(unsigned NewBucketCount); + void GrowBucketCount(unsigned NewBucketCount, const FoldingSetInfo &Info); protected: - /// GetNodeProfile - Instantiations of the FoldingSet template implement - /// this function to gather data bits for the given node. - virtual void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const = 0; - - /// NodeEquals - Instantiations of the FoldingSet template implement - /// this function to compare the given node with the given ID. - virtual bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const=0; - - /// ComputeNodeHash - Instantiations of the FoldingSet template implement - /// this function to compute a hash value for the given node. - virtual unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const = 0; - // The below methods are protected to encourage subclasses to provide a more // type-safe API. + /// reserve - Increase the number of buckets such that adding the + /// EltCount-th node won't cause a rebucket operation. reserve is permitted + /// to allocate more space than requested by EltCount. + void reserve(unsigned EltCount, const FoldingSetInfo &Info); + /// RemoveNode - Remove a node from the folding set, returning true if one /// was removed or false if the node was not in the folding set. bool RemoveNode(Node *N); @@ -200,17 +207,18 @@ protected: /// GetOrInsertNode - If there is an existing simple Node exactly /// equal to the specified node, return it. Otherwise, insert 'N' and return /// it instead. - Node *GetOrInsertNode(Node *N); + Node *GetOrInsertNode(Node *N, const FoldingSetInfo &Info); /// FindNodeOrInsertPos - Look up the node specified by ID. If it exists, /// return it. If not, return the insertion token that will make insertion /// faster. - Node *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos); + Node *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos, + const FoldingSetInfo &Info); /// InsertNode - Insert the specified node into the folding set, knowing that /// it is not already in the folding set. InsertPos must be obtained from /// FindNodeOrInsertPos. - void InsertNode(Node *N, void *InsertPos); + void InsertNode(Node *N, void *InsertPos, const FoldingSetInfo &Info); }; //===----------------------------------------------------------------------===// @@ -397,7 +405,7 @@ DefaultContextualFoldingSetTrait::ComputeHash(T &X, //===----------------------------------------------------------------------===// /// FoldingSetImpl - An implementation detail that lets us share code between /// FoldingSet and ContextualFoldingSet. -template class FoldingSetImpl : public FoldingSetBase { +template class FoldingSetImpl : public FoldingSetBase { protected: explicit FoldingSetImpl(unsigned Log2InitSize) : FoldingSetBase(Log2InitSize) {} @@ -427,29 +435,40 @@ public: return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); } + /// reserve - Increase the number of buckets such that adding the + /// EltCount-th node won't cause a rebucket operation. reserve is permitted + /// to allocate more space than requested by EltCount. + void reserve(unsigned EltCount) { + return FoldingSetBase::reserve(EltCount, Derived::getFoldingSetInfo()); + } + /// RemoveNode - Remove a node from the folding set, returning true if one /// was removed or false if the node was not in the folding set. - bool RemoveNode(T *N) { return FoldingSetBase::RemoveNode(N); } + bool RemoveNode(T *N) { + return FoldingSetBase::RemoveNode(N); + } /// GetOrInsertNode - If there is an existing simple Node exactly /// equal to the specified node, return it. Otherwise, insert 'N' and /// return it instead. T *GetOrInsertNode(T *N) { - return static_cast(FoldingSetBase::GetOrInsertNode(N)); + return static_cast( + FoldingSetBase::GetOrInsertNode(N, Derived::getFoldingSetInfo())); } /// FindNodeOrInsertPos - Look up the node specified by ID. If it exists, /// return it. If not, return the insertion token that will make insertion /// faster. T *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos) { - return static_cast(FoldingSetBase::FindNodeOrInsertPos(ID, InsertPos)); + return static_cast(FoldingSetBase::FindNodeOrInsertPos( + ID, InsertPos, Derived::getFoldingSetInfo())); } /// InsertNode - Insert the specified node into the folding set, knowing that /// it is not already in the folding set. InsertPos must be obtained from /// FindNodeOrInsertPos. void InsertNode(T *N, void *InsertPos) { - FoldingSetBase::InsertNode(N, InsertPos); + FoldingSetBase::InsertNode(N, InsertPos, Derived::getFoldingSetInfo()); } /// InsertNode - Insert the specified node into the folding set, knowing that @@ -470,32 +489,43 @@ public: /// moved-from state is not a valid state for anything other than /// move-assigning and destroying. This is primarily to enable movable APIs /// that incorporate these objects. -template class FoldingSet final : public FoldingSetImpl { - using Super = FoldingSetImpl; +template +class FoldingSet : public FoldingSetImpl, T> { + using Super = FoldingSetImpl; using Node = typename Super::Node; - /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a + /// GetNodeProfile - Each instantiation of the FoldingSet needs to provide a /// way to convert nodes into a unique specifier. - void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const override { + static void GetNodeProfile(const FoldingSetBase *, Node *N, + FoldingSetNodeID &ID) { T *TN = static_cast(N); FoldingSetTrait::Profile(*TN, ID); } /// NodeEquals - Instantiations may optionally provide a way to compare a /// node with a specified ID. - bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const override { + static bool NodeEquals(const FoldingSetBase *, Node *N, + const FoldingSetNodeID &ID, unsigned IDHash, + FoldingSetNodeID &TempID) { T *TN = static_cast(N); return FoldingSetTrait::Equals(*TN, ID, IDHash, TempID); } /// ComputeNodeHash - Instantiations may optionally provide a way to compute a /// hash value directly from a node. - unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const override { + static unsigned ComputeNodeHash(const FoldingSetBase *, Node *N, + FoldingSetNodeID &TempID) { T *TN = static_cast(N); return FoldingSetTrait::ComputeHash(*TN, TempID); } + static const FoldingSetBase::FoldingSetInfo &getFoldingSetInfo() { + static constexpr FoldingSetBase::FoldingSetInfo Info = { + GetNodeProfile, NodeEquals, ComputeNodeHash}; + return Info; + } + friend Super; + public: explicit FoldingSet(unsigned Log2InitSize = 6) : Super(Log2InitSize) {} FoldingSet(FoldingSet &&Arg) = default; @@ -512,35 +542,51 @@ public: /// function with signature /// void Profile(FoldingSetNodeID &, Ctx); template -class ContextualFoldingSet final : public FoldingSetImpl { +class ContextualFoldingSet + : public FoldingSetImpl, T> { // Unfortunately, this can't derive from FoldingSet because the // construction of the vtable for FoldingSet requires // FoldingSet::GetNodeProfile to be instantiated, which in turn // requires a single-argument T::Profile(). - using Super = FoldingSetImpl; + using Super = FoldingSetImpl; using Node = typename Super::Node; Ctx Context; + static const Ctx &getContext(const FoldingSetBase *Base) { + return static_cast(Base)->Context; + } + /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a /// way to convert nodes into a unique specifier. - void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const override { + static void GetNodeProfile(const FoldingSetBase *Base, Node *N, + FoldingSetNodeID &ID) { T *TN = static_cast(N); - ContextualFoldingSetTrait::Profile(*TN, ID, Context); + ContextualFoldingSetTrait::Profile(*TN, ID, getContext(Base)); } - bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const override { + static bool NodeEquals(const FoldingSetBase *Base, Node *N, + const FoldingSetNodeID &ID, unsigned IDHash, + FoldingSetNodeID &TempID) { T *TN = static_cast(N); return ContextualFoldingSetTrait::Equals(*TN, ID, IDHash, TempID, - Context); + getContext(Base)); } - unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const override { + static unsigned ComputeNodeHash(const FoldingSetBase *Base, Node *N, + FoldingSetNodeID &TempID) { T *TN = static_cast(N); - return ContextualFoldingSetTrait::ComputeHash(*TN, TempID, Context); + return ContextualFoldingSetTrait::ComputeHash(*TN, TempID, + getContext(Base)); + } + + static const FoldingSetBase::FoldingSetInfo &getFoldingSetInfo() { + static constexpr FoldingSetBase::FoldingSetInfo Info = { + GetNodeProfile, NodeEquals, ComputeNodeHash}; + return Info; } + friend Super; public: explicit ContextualFoldingSet(Ctx Context, unsigned Log2InitSize = 6) diff --git a/llvm/include/llvm/ADT/FunctionExtras.h b/llvm/include/llvm/ADT/FunctionExtras.h index 121aa527a5dac..4c75e4d2547be 100644 --- a/llvm/include/llvm/ADT/FunctionExtras.h +++ b/llvm/include/llvm/ADT/FunctionExtras.h @@ -11,11 +11,11 @@ /// in ``. /// /// It provides `unique_function`, which works like `std::function` but supports -/// move-only callable objects. +/// move-only callable objects and const-qualification. /// /// Future plans: -/// - Add a `function` that provides const, volatile, and ref-qualified support, -/// which doesn't work with `std::function`. +/// - Add a `function` that provides ref-qualified support, which doesn't work +/// with `std::function`. /// - Provide support for specifying multiple signatures to type erase callable /// objects with an overload set, such as those produced by generic lambdas. /// - Expand to include a copyable utility that directly replaces std::function @@ -34,15 +34,34 @@ #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/PointerUnion.h" +#include "llvm/Support/MemAlloc.h" #include "llvm/Support/type_traits.h" #include +#include namespace llvm { +/// unique_function is a type-erasing functor similar to std::function. +/// +/// It can hold move-only function objects, like lambdas capturing unique_ptrs. +/// Accordingly, it is movable but not copyable. +/// +/// It supports const-qualification: +/// - unique_function has a const operator(). +/// It can only hold functions which themselves have a const operator(). +/// - unique_function has a non-const operator(). +/// It can hold functions with a non-const operator(), like mutable lambdas. template class unique_function; -template -class unique_function { +namespace detail { + +template +using EnableIfTrivial = + std::enable_if_t::value && + std::is_trivially_destructible::value>; + +template class UniqueFunctionBase { +protected: static constexpr size_t InlineStorageSize = sizeof(void *) * 3; // MSVC has a bug and ICEs if we give it a particular dependent value @@ -112,8 +131,11 @@ class unique_function { // For in-line storage, we just provide an aligned character buffer. We // provide three pointers worth of storage here. - typename std::aligned_storage::type - InlineStorage; + // This is mutable as an inlined `const unique_function` may + // still modify its own mutable members. + mutable + typename std::aligned_storage::type + InlineStorage; } StorageUnion; // A compressed pointer to either our dispatching callback or our table of @@ -136,11 +158,25 @@ class unique_function { .template get(); } - void *getInlineStorage() { return &StorageUnion.InlineStorage; } + CallPtrT getCallPtr() const { + return isTrivialCallback() ? getTrivialCallback() + : getNonTrivialCallbacks()->CallPtr; + } - void *getOutOfLineStorage() { + // These three functions are only const in the narrow sense. They return + // mutable pointers to function state. + // This allows unique_function::operator() to be const, even if the + // underlying functor may be internally mutable. + // + // const callers must ensure they're only used in const-correct ways. + void *getCalleePtr() const { + return isInlineStorage() ? getInlineStorage() : getOutOfLineStorage(); + } + void *getInlineStorage() const { return &StorageUnion.InlineStorage; } + void *getOutOfLineStorage() const { return StorageUnion.OutOfLineStorage.StoragePtr; } + size_t getOutOfLineStorageSize() const { return StorageUnion.OutOfLineStorage.Size; } @@ -152,10 +188,11 @@ class unique_function { StorageUnion.OutOfLineStorage = {Ptr, Size, Alignment}; } - template - static ReturnT CallImpl(void *CallableAddr, AdjustedParamT... Params) { - return (*reinterpret_cast(CallableAddr))( - std::forward(Params)...); + template + static ReturnT CallImpl(void *CallableAddr, + AdjustedParamT... Params) { + auto &Func = *reinterpret_cast(CallableAddr); + return Func(std::forward(Params)...); } template @@ -169,11 +206,54 @@ class unique_function { reinterpret_cast(CallableAddr)->~CallableT(); } -public: - unique_function() = default; - unique_function(std::nullptr_t /*null_callable*/) {} + // The pointers to call/move/destroy functions are determined for each + // callable type (and called-as type, which determines the overload chosen). + // (definitions are out-of-line). + + // By default, we need an object that contains all the different + // type erased behaviors needed. Create a static instance of the struct type + // here and each instance will contain a pointer to it. + // Wrap in a struct to avoid https://gcc.gnu.org/PR71954 + template + struct CallbacksHolder { + static NonTrivialCallbacks Callbacks; + }; + // See if we can create a trivial callback. We need the callable to be + // trivially moved and trivially destroyed so that we don't have to store + // type erased callbacks for those operations. + template + struct CallbacksHolder> { + static TrivialCallback Callbacks; + }; + + // A simple tag type so the call-as type to be passed to the constructor. + template struct CalledAs {}; + + // Essentially the "main" unique_function constructor, but subclasses + // provide the qualified type to be used for the call. + // (We always store a T, even if the call will use a pointer to const T). + template + UniqueFunctionBase(CallableT Callable, CalledAs) { + bool IsInlineStorage = true; + void *CallableAddr = getInlineStorage(); + if (sizeof(CallableT) > InlineStorageSize || + alignof(CallableT) > alignof(decltype(StorageUnion.InlineStorage))) { + IsInlineStorage = false; + // Allocate out-of-line storage. FIXME: Use an explicit alignment + // parameter in C++17 mode. + auto Size = sizeof(CallableT); + auto Alignment = alignof(CallableT); + CallableAddr = allocate_buffer(Size, Alignment); + setOutOfLineStorage(CallableAddr, Size, Alignment); + } + + // Now move into the storage. + new (CallableAddr) CallableT(std::move(Callable)); + CallbackAndInlineFlag.setPointerAndInt( + &CallbacksHolder::Callbacks, IsInlineStorage); + } - ~unique_function() { + ~UniqueFunctionBase() { if (!CallbackAndInlineFlag.getPointer()) return; @@ -189,7 +269,7 @@ public: getOutOfLineStorageAlignment()); } - unique_function(unique_function &&RHS) noexcept { + UniqueFunctionBase(UniqueFunctionBase &&RHS) noexcept { // Copy the callback and inline flag. CallbackAndInlineFlag = RHS.CallbackAndInlineFlag; @@ -218,72 +298,83 @@ public: #endif } - unique_function &operator=(unique_function &&RHS) noexcept { + UniqueFunctionBase &operator=(UniqueFunctionBase &&RHS) noexcept { if (this == &RHS) return *this; // Because we don't try to provide any exception safety guarantees we can // implement move assignment very simply by first destroying the current // object and then move-constructing over top of it. - this->~unique_function(); - new (this) unique_function(std::move(RHS)); + this->~UniqueFunctionBase(); + new (this) UniqueFunctionBase(std::move(RHS)); return *this; } - template unique_function(CallableT Callable) { - bool IsInlineStorage = true; - void *CallableAddr = getInlineStorage(); - if (sizeof(CallableT) > InlineStorageSize || - alignof(CallableT) > alignof(decltype(StorageUnion.InlineStorage))) { - IsInlineStorage = false; - // Allocate out-of-line storage. FIXME: Use an explicit alignment - // parameter in C++17 mode. - auto Size = sizeof(CallableT); - auto Alignment = alignof(CallableT); - CallableAddr = allocate_buffer(Size, Alignment); - setOutOfLineStorage(CallableAddr, Size, Alignment); - } + UniqueFunctionBase() = default; - // Now move into the storage. - new (CallableAddr) CallableT(std::move(Callable)); +public: + explicit operator bool() const { + return (bool)CallbackAndInlineFlag.getPointer(); + } +}; - // See if we can create a trivial callback. We need the callable to be - // trivially moved and trivially destroyed so that we don't have to store - // type erased callbacks for those operations. - // - // FIXME: We should use constexpr if here and below to avoid instantiating - // the non-trivial static objects when unnecessary. While the linker should - // remove them, it is still wasteful. - if (llvm::is_trivially_move_constructible::value && - std::is_trivially_destructible::value) { - // We need to create a nicely aligned object. We use a static variable - // for this because it is a trivial struct. - static TrivialCallback Callback = { &CallImpl }; - - CallbackAndInlineFlag = {&Callback, IsInlineStorage}; - return; - } +template +template +typename UniqueFunctionBase::NonTrivialCallbacks UniqueFunctionBase< + R, P...>::CallbacksHolder::Callbacks = { + &CallImpl, &MoveImpl, &DestroyImpl}; - // Otherwise, we need to point at an object that contains all the different - // type erased behaviors needed. Create a static instance of the struct type - // here and then use a pointer to that. - static NonTrivialCallbacks Callbacks = { - &CallImpl, &MoveImpl, &DestroyImpl}; +template +template +typename UniqueFunctionBase::TrivialCallback + UniqueFunctionBase::CallbacksHolder< + CallableT, CalledAsT, EnableIfTrivial>::Callbacks{ + &CallImpl}; - CallbackAndInlineFlag = {&Callbacks, IsInlineStorage}; - } +} // namespace detail + +template +class unique_function : public detail::UniqueFunctionBase { + using Base = detail::UniqueFunctionBase; + +public: + unique_function() = default; + unique_function(std::nullptr_t) {} + unique_function(unique_function &&) = default; + unique_function(const unique_function &) = delete; + unique_function &operator=(unique_function &&) = default; + unique_function &operator=(const unique_function &) = delete; - ReturnT operator()(ParamTs... Params) { - void *CallableAddr = - isInlineStorage() ? getInlineStorage() : getOutOfLineStorage(); + template + unique_function(CallableT Callable) + : Base(std::forward(Callable), + typename Base::template CalledAs{}) {} - return (isTrivialCallback() - ? getTrivialCallback() - : getNonTrivialCallbacks()->CallPtr)(CallableAddr, Params...); + R operator()(P... Params) { + return this->getCallPtr()(this->getCalleePtr(), Params...); } +}; - explicit operator bool() const { - return (bool)CallbackAndInlineFlag.getPointer(); +template +class unique_function + : public detail::UniqueFunctionBase { + using Base = detail::UniqueFunctionBase; + +public: + unique_function() = default; + unique_function(std::nullptr_t) {} + unique_function(unique_function &&) = default; + unique_function(const unique_function &) = delete; + unique_function &operator=(unique_function &&) = default; + unique_function &operator=(const unique_function &) = delete; + + template + unique_function(CallableT Callable) + : Base(std::forward(Callable), + typename Base::template CalledAs{}) {} + + R operator()(P... Params) const { + return this->getCallPtr()(this->getCalleePtr(), Params...); } }; diff --git a/llvm/include/llvm/ADT/Hashing.h b/llvm/include/llvm/ADT/Hashing.h index adcc5cf54da92..9ee310c879fd3 100644 --- a/llvm/include/llvm/ADT/Hashing.h +++ b/llvm/include/llvm/ADT/Hashing.h @@ -101,8 +101,7 @@ public: /// differing argument types even if they would implicit promote to a common /// type without changing the value. template -typename std::enable_if::value, hash_code>::type -hash_value(T value); +std::enable_if_t::value, hash_code> hash_value(T value); /// Compute a hash_code for a pointer's address. /// @@ -158,10 +157,10 @@ inline uint32_t fetch32(const char *p) { } /// Some primes between 2^63 and 2^64 for various uses. -static const uint64_t k0 = 0xc3a5c85c97cb3127ULL; -static const uint64_t k1 = 0xb492b66fbe98f273ULL; -static const uint64_t k2 = 0x9ae16a3b2f90404fULL; -static const uint64_t k3 = 0xc949d7c7509e6557ULL; +static constexpr uint64_t k0 = 0xc3a5c85c97cb3127ULL; +static constexpr uint64_t k1 = 0xb492b66fbe98f273ULL; +static constexpr uint64_t k2 = 0x9ae16a3b2f90404fULL; +static constexpr uint64_t k3 = 0xc949d7c7509e6557ULL; /// Bitwise right rotate. /// Normally this will compile to a single instruction, especially if the @@ -360,7 +359,7 @@ template struct is_hashable_data > /// Helper to get the hashable data representation for a type. /// This variant is enabled when the type itself can be used. template -typename std::enable_if::value, T>::type +std::enable_if_t::value, T> get_hashable_data(const T &value) { return value; } @@ -368,7 +367,7 @@ get_hashable_data(const T &value) { /// This variant is enabled when we must first call hash_value and use the /// result as our data. template -typename std::enable_if::value, size_t>::type +std::enable_if_t::value, size_t> get_hashable_data(const T &value) { using ::llvm::hash_value; return hash_value(value); @@ -442,7 +441,7 @@ hash_code hash_combine_range_impl(InputIteratorT first, InputIteratorT last) { /// are stored in contiguous memory, this routine avoids copying each value /// and directly reads from the underlying memory. template -typename std::enable_if::value, hash_code>::type +std::enable_if_t::value, hash_code> hash_combine_range_impl(ValueT *first, ValueT *last) { const uint64_t seed = get_execution_seed(); const char *s_begin = reinterpret_cast(first); @@ -627,8 +626,7 @@ inline hash_code hash_integer_value(uint64_t value) { // Declared and documented above, but defined here so that any of the hashing // infrastructure is available. template -typename std::enable_if::value, hash_code>::type -hash_value(T value) { +std::enable_if_t::value, hash_code> hash_value(T value) { return ::llvm::hashing::detail::hash_integer_value( static_cast(value)); } diff --git a/llvm/include/llvm/ADT/ImmutableMap.h b/llvm/include/llvm/ADT/ImmutableMap.h index 86fd7fefaec3d..30689d2274a87 100644 --- a/llvm/include/llvm/ADT/ImmutableMap.h +++ b/llvm/include/llvm/ADT/ImmutableMap.h @@ -70,33 +70,14 @@ public: using TreeTy = ImutAVLTree; protected: - TreeTy* Root; + IntrusiveRefCntPtr Root; public: /// Constructs a map from a pointer to a tree root. In general one /// should use a Factory object to create maps instead of directly /// invoking the constructor, but there are cases where make this /// constructor public is useful. - explicit ImmutableMap(const TreeTy* R) : Root(const_cast(R)) { - if (Root) { Root->retain(); } - } - - ImmutableMap(const ImmutableMap &X) : Root(X.Root) { - if (Root) { Root->retain(); } - } - - ~ImmutableMap() { - if (Root) { Root->release(); } - } - - ImmutableMap &operator=(const ImmutableMap &X) { - if (Root != X.Root) { - if (X.Root) { X.Root->retain(); } - if (Root) { Root->release(); } - Root = X.Root; - } - return *this; - } + explicit ImmutableMap(const TreeTy *R) : Root(const_cast(R)) {} class Factory { typename TreeTy::Factory F; @@ -115,12 +96,12 @@ public: LLVM_NODISCARD ImmutableMap add(ImmutableMap Old, key_type_ref K, data_type_ref D) { - TreeTy *T = F.add(Old.Root, std::pair(K,D)); + TreeTy *T = F.add(Old.Root.get(), std::pair(K, D)); return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); } LLVM_NODISCARD ImmutableMap remove(ImmutableMap Old, key_type_ref K) { - TreeTy *T = F.remove(Old.Root,K); + TreeTy *T = F.remove(Old.Root.get(), K); return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); } @@ -134,19 +115,20 @@ public: } bool operator==(const ImmutableMap &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; + return Root && RHS.Root ? Root->isEqual(*RHS.Root.get()) : Root == RHS.Root; } bool operator!=(const ImmutableMap &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; + return Root && RHS.Root ? Root->isNotEqual(*RHS.Root.get()) + : Root != RHS.Root; } TreeTy *getRoot() const { if (Root) { Root->retain(); } - return Root; + return Root.get(); } - TreeTy *getRootWithoutRetain() const { return Root; } + TreeTy *getRootWithoutRetain() const { return Root.get(); } void manualRetain() { if (Root) Root->retain(); @@ -217,7 +199,7 @@ public: data_type_ref getData() const { return (*this)->second; } }; - iterator begin() const { return iterator(Root); } + iterator begin() const { return iterator(Root.get()); } iterator end() const { return iterator(); } data_type* lookup(key_type_ref K) const { @@ -243,7 +225,7 @@ public: unsigned getHeight() const { return Root ? Root->getHeight() : 0; } static inline void Profile(FoldingSetNodeID& ID, const ImmutableMap& M) { - ID.AddPointer(M.Root); + ID.AddPointer(M.Root.get()); } inline void Profile(FoldingSetNodeID& ID) const { @@ -266,7 +248,7 @@ public: using FactoryTy = typename TreeTy::Factory; protected: - TreeTy *Root; + IntrusiveRefCntPtr Root; FactoryTy *Factory; public: @@ -274,44 +256,12 @@ public: /// should use a Factory object to create maps instead of directly /// invoking the constructor, but there are cases where make this /// constructor public is useful. - explicit ImmutableMapRef(const TreeTy *R, FactoryTy *F) - : Root(const_cast(R)), Factory(F) { - if (Root) { - Root->retain(); - } - } + ImmutableMapRef(const TreeTy *R, FactoryTy *F) + : Root(const_cast(R)), Factory(F) {} - explicit ImmutableMapRef(const ImmutableMap &X, - typename ImmutableMap::Factory &F) - : Root(X.getRootWithoutRetain()), - Factory(F.getTreeFactory()) { - if (Root) { Root->retain(); } - } - - ImmutableMapRef(const ImmutableMapRef &X) : Root(X.Root), Factory(X.Factory) { - if (Root) { - Root->retain(); - } - } - - ~ImmutableMapRef() { - if (Root) - Root->release(); - } - - ImmutableMapRef &operator=(const ImmutableMapRef &X) { - if (Root != X.Root) { - if (X.Root) - X.Root->retain(); - - if (Root) - Root->release(); - - Root = X.Root; - Factory = X.Factory; - } - return *this; - } + ImmutableMapRef(const ImmutableMap &X, + typename ImmutableMap::Factory &F) + : Root(X.getRootWithoutRetain()), Factory(F.getTreeFactory()) {} static inline ImmutableMapRef getEmptyMap(FactoryTy *F) { return ImmutableMapRef(0, F); @@ -326,12 +276,13 @@ public: } ImmutableMapRef add(key_type_ref K, data_type_ref D) const { - TreeTy *NewT = Factory->add(Root, std::pair(K, D)); + TreeTy *NewT = + Factory->add(Root.get(), std::pair(K, D)); return ImmutableMapRef(NewT, Factory); } ImmutableMapRef remove(key_type_ref K) const { - TreeTy *NewT = Factory->remove(Root, K); + TreeTy *NewT = Factory->remove(Root.get(), K); return ImmutableMapRef(NewT, Factory); } @@ -340,15 +291,16 @@ public: } ImmutableMap asImmutableMap() const { - return ImmutableMap(Factory->getCanonicalTree(Root)); + return ImmutableMap(Factory->getCanonicalTree(Root.get())); } bool operator==(const ImmutableMapRef &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; + return Root && RHS.Root ? Root->isEqual(*RHS.Root.get()) : Root == RHS.Root; } bool operator!=(const ImmutableMapRef &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; + return Root && RHS.Root ? Root->isNotEqual(*RHS.Root.get()) + : Root != RHS.Root; } bool isEmpty() const { return !Root; } @@ -377,7 +329,7 @@ public: data_type_ref getData() const { return (*this)->second; } }; - iterator begin() const { return iterator(Root); } + iterator begin() const { return iterator(Root.get()); } iterator end() const { return iterator(); } data_type *lookup(key_type_ref K) const { diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h index a6a6abfd96001..f19913f8dcdd7 100644 --- a/llvm/include/llvm/ADT/ImmutableSet.h +++ b/llvm/include/llvm/ADT/ImmutableSet.h @@ -15,6 +15,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator.h" #include "llvm/Support/Allocator.h" @@ -169,7 +170,7 @@ public: bool contains(key_type_ref K) { return (bool) find(K); } /// foreach - A member template the accepts invokes operator() on a functor - /// object (specifed by Callback) for every node/subtree in the tree. + /// object (specified by Callback) for every node/subtree in the tree. /// Nodes are visited using an inorder traversal. template void foreach(Callback& C) { @@ -183,7 +184,7 @@ public: } /// validateTree - A utility method that checks that the balancing and - /// ordering invariants of the tree are satisifed. It is a recursive + /// ordering invariants of the tree are satisfied. It is a recursive /// method that returns the height of the tree, which is then consumed /// by the enclosing validateTree call. External callers should ignore the /// return value. An invalid tree will cause an assertion to fire in @@ -357,6 +358,12 @@ public: } }; +template +struct IntrusiveRefCntPtrInfo> { + static void retain(ImutAVLTree *Tree) { Tree->retain(); } + static void release(ImutAVLTree *Tree) { Tree->release(); } +}; + //===----------------------------------------------------------------------===// // Immutable AVL-Tree Factory class. //===----------------------------------------------------------------------===// @@ -450,7 +457,7 @@ protected: //===--------------------------------------------------===// // "createNode" is used to generate new tree roots that link - // to other trees. The functon may also simply move links + // to other trees. The function may also simply move links // in an existing root if that root is still marked mutable. // This is necessary because otherwise our balancing code // would leak memory as it would create nodes that are @@ -961,33 +968,14 @@ public: using TreeTy = ImutAVLTree; private: - TreeTy *Root; + IntrusiveRefCntPtr Root; public: /// Constructs a set from a pointer to a tree root. In general one /// should use a Factory object to create sets instead of directly /// invoking the constructor, but there are cases where make this /// constructor public is useful. - explicit ImmutableSet(TreeTy* R) : Root(R) { - if (Root) { Root->retain(); } - } - - ImmutableSet(const ImmutableSet &X) : Root(X.Root) { - if (Root) { Root->retain(); } - } - - ~ImmutableSet() { - if (Root) { Root->release(); } - } - - ImmutableSet &operator=(const ImmutableSet &X) { - if (Root != X.Root) { - if (X.Root) { X.Root->retain(); } - if (Root) { Root->release(); } - Root = X.Root; - } - return *this; - } + explicit ImmutableSet(TreeTy *R) : Root(R) {} class Factory { typename TreeTy::Factory F; @@ -1016,7 +1004,7 @@ public: /// The memory allocated to represent the set is released when the /// factory object that created the set is destroyed. LLVM_NODISCARD ImmutableSet add(ImmutableSet Old, value_type_ref V) { - TreeTy *NewT = F.add(Old.Root, V); + TreeTy *NewT = F.add(Old.Root.get(), V); return ImmutableSet(Canonicalize ? F.getCanonicalTree(NewT) : NewT); } @@ -1028,7 +1016,7 @@ public: /// The memory allocated to represent the set is released when the /// factory object that created the set is destroyed. LLVM_NODISCARD ImmutableSet remove(ImmutableSet Old, value_type_ref V) { - TreeTy *NewT = F.remove(Old.Root, V); + TreeTy *NewT = F.remove(Old.Root.get(), V); return ImmutableSet(Canonicalize ? F.getCanonicalTree(NewT) : NewT); } @@ -1047,21 +1035,20 @@ public: } bool operator==(const ImmutableSet &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; + return Root && RHS.Root ? Root->isEqual(*RHS.Root.get()) : Root == RHS.Root; } bool operator!=(const ImmutableSet &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; + return Root && RHS.Root ? Root->isNotEqual(*RHS.Root.get()) + : Root != RHS.Root; } TreeTy *getRoot() { if (Root) { Root->retain(); } - return Root; + return Root.get(); } - TreeTy *getRootWithoutRetain() const { - return Root; - } + TreeTy *getRootWithoutRetain() const { return Root.get(); } /// isEmpty - Return true if the set contains no elements. bool isEmpty() const { return !Root; } @@ -1082,7 +1069,7 @@ public: using iterator = ImutAVLValueIterator; - iterator begin() const { return iterator(Root); } + iterator begin() const { return iterator(Root.get()); } iterator end() const { return iterator(); } //===--------------------------------------------------===// @@ -1092,7 +1079,7 @@ public: unsigned getHeight() const { return Root ? Root->getHeight() : 0; } static void Profile(FoldingSetNodeID &ID, const ImmutableSet &S) { - ID.AddPointer(S.Root); + ID.AddPointer(S.Root.get()); } void Profile(FoldingSetNodeID &ID) const { return Profile(ID, *this); } @@ -1114,7 +1101,7 @@ public: using FactoryTy = typename TreeTy::Factory; private: - TreeTy *Root; + IntrusiveRefCntPtr Root; FactoryTy *Factory; public: @@ -1122,42 +1109,18 @@ public: /// should use a Factory object to create sets instead of directly /// invoking the constructor, but there are cases where make this /// constructor public is useful. - explicit ImmutableSetRef(TreeTy* R, FactoryTy *F) - : Root(R), - Factory(F) { - if (Root) { Root->retain(); } - } - - ImmutableSetRef(const ImmutableSetRef &X) - : Root(X.Root), - Factory(X.Factory) { - if (Root) { Root->retain(); } - } - - ~ImmutableSetRef() { - if (Root) { Root->release(); } - } - - ImmutableSetRef &operator=(const ImmutableSetRef &X) { - if (Root != X.Root) { - if (X.Root) { X.Root->retain(); } - if (Root) { Root->release(); } - Root = X.Root; - Factory = X.Factory; - } - return *this; - } + ImmutableSetRef(TreeTy *R, FactoryTy *F) : Root(R), Factory(F) {} static ImmutableSetRef getEmptySet(FactoryTy *F) { return ImmutableSetRef(0, F); } ImmutableSetRef add(value_type_ref V) { - return ImmutableSetRef(Factory->add(Root, V), Factory); + return ImmutableSetRef(Factory->add(Root.get(), V), Factory); } ImmutableSetRef remove(value_type_ref V) { - return ImmutableSetRef(Factory->remove(Root, V), Factory); + return ImmutableSetRef(Factory->remove(Root.get(), V), Factory); } /// Returns true if the set contains the specified value. @@ -1166,20 +1129,19 @@ public: } ImmutableSet asImmutableSet(bool canonicalize = true) const { - return ImmutableSet(canonicalize ? - Factory->getCanonicalTree(Root) : Root); + return ImmutableSet( + canonicalize ? Factory->getCanonicalTree(Root.get()) : Root.get()); } - TreeTy *getRootWithoutRetain() const { - return Root; - } + TreeTy *getRootWithoutRetain() const { return Root.get(); } bool operator==(const ImmutableSetRef &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; + return Root && RHS.Root ? Root->isEqual(*RHS.Root.get()) : Root == RHS.Root; } bool operator!=(const ImmutableSetRef &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; + return Root && RHS.Root ? Root->isNotEqual(*RHS.Root.get()) + : Root != RHS.Root; } /// isEmpty - Return true if the set contains no elements. @@ -1195,7 +1157,7 @@ public: using iterator = ImutAVLValueIterator; - iterator begin() const { return iterator(Root); } + iterator begin() const { return iterator(Root.get()); } iterator end() const { return iterator(); } //===--------------------------------------------------===// @@ -1205,7 +1167,7 @@ public: unsigned getHeight() const { return Root ? Root->getHeight() : 0; } static void Profile(FoldingSetNodeID &ID, const ImmutableSetRef &S) { - ID.AddPointer(S.Root); + ID.AddPointer(S.Root.get()); } void Profile(FoldingSetNodeID &ID) const { return Profile(ID, *this); } diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h index a02876ee77f39..db7804d0a5513 100644 --- a/llvm/include/llvm/ADT/IntervalMap.h +++ b/llvm/include/llvm/ADT/IntervalMap.h @@ -491,7 +491,7 @@ class NodeRef { struct CacheAlignedPointerTraits { static inline void *getAsVoidPointer(void *P) { return P; } static inline void *getFromVoidPointer(void *P) { return P; } - enum { NumLowBitsAvailable = Log2CacheLine }; + static constexpr int NumLowBitsAvailable = Log2CacheLine; }; PointerIntPair pip; @@ -823,7 +823,7 @@ public: } /// reset - Reset cached information about node(Level) from subtree(Level -1). - /// @param Level 1..height. THe node to update after parent node changed. + /// @param Level 1..height. The node to update after parent node changed. void reset(unsigned Level) { path[Level] = Entry(subtree(Level - 1), offset(Level)); } @@ -884,7 +884,7 @@ public: } /// getLeftSibling - Get the left sibling node at Level, or a null NodeRef. - /// @param Level Get the sinbling to node(Level). + /// @param Level Get the sibling to node(Level). /// @return Left sibling, or NodeRef(). NodeRef getRightSibling(unsigned Level) const; @@ -1396,7 +1396,7 @@ public: setRoot(map->rootSize); } - /// preincrement - move to the next interval. + /// preincrement - Move to the next interval. const_iterator &operator++() { assert(valid() && "Cannot increment end()"); if (++path.leafOffset() == path.leafSize() && branched()) @@ -1404,14 +1404,14 @@ public: return *this; } - /// postincrement - Dont do that! + /// postincrement - Don't do that! const_iterator operator++(int) { const_iterator tmp = *this; operator++(); return tmp; } - /// predecrement - move to the previous interval. + /// predecrement - Move to the previous interval. const_iterator &operator--() { if (path.leafOffset() && (valid() || !branched())) --path.leafOffset(); @@ -1420,7 +1420,7 @@ public: return *this; } - /// postdecrement - Dont do that! + /// postdecrement - Don't do that! const_iterator operator--(int) { const_iterator tmp = *this; operator--(); diff --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h index c84f9aa8b3425..c64b823523972 100644 --- a/llvm/include/llvm/ADT/Optional.h +++ b/llvm/include/llvm/ADT/Optional.h @@ -269,7 +269,7 @@ public: /// Apply a function to the value if present; otherwise return None. template - auto map(const Function &F) const + auto map(const Function &F) const LLVM_LVALUE_FUNCTION -> Optional { if (*this) return F(getValue()); return None; diff --git a/llvm/include/llvm/ADT/PointerEmbeddedInt.h b/llvm/include/llvm/ADT/PointerEmbeddedInt.h index 3eb6edb034303..fbc48af79da1e 100644 --- a/llvm/include/llvm/ADT/PointerEmbeddedInt.h +++ b/llvm/include/llvm/ADT/PointerEmbeddedInt.h @@ -94,7 +94,7 @@ struct PointerLikeTypeTraits> { return T(reinterpret_cast(P), typename T::RawValueTag()); } - enum { NumLowBitsAvailable = T::Shift }; + static constexpr int NumLowBitsAvailable = T::Shift; }; // Teach DenseMap how to use PointerEmbeddedInt objects as keys if the Int type diff --git a/llvm/include/llvm/ADT/PointerIntPair.h b/llvm/include/llvm/ADT/PointerIntPair.h index fa6bf15044691..cb8b202c48b77 100644 --- a/llvm/include/llvm/ADT/PointerIntPair.h +++ b/llvm/include/llvm/ADT/PointerIntPair.h @@ -147,7 +147,7 @@ struct PointerIntPairInfo { "cannot use a pointer type that has all bits free"); static_assert(IntBits <= PtrTraits::NumLowBitsAvailable, "PointerIntPair with integer size too large for pointer"); - enum : uintptr_t { + enum MaskAndShiftConstants : uintptr_t { /// PointerBitMask - The bits that come from the pointer. PointerBitMask = ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable) - 1), @@ -235,7 +235,8 @@ struct PointerLikeTypeTraits< return PointerIntPair::getFromOpaqueValue(P); } - enum { NumLowBitsAvailable = PtrTraits::NumLowBitsAvailable - IntBits }; + static constexpr int NumLowBitsAvailable = + PtrTraits::NumLowBitsAvailable - IntBits; }; } // end namespace llvm diff --git a/llvm/include/llvm/ADT/PointerSumType.h b/llvm/include/llvm/ADT/PointerSumType.h index d467f83f58ac8..a7ef774e205e6 100644 --- a/llvm/include/llvm/ADT/PointerSumType.h +++ b/llvm/include/llvm/ADT/PointerSumType.h @@ -214,7 +214,7 @@ struct PointerSumTypeHelper : MemberTs... { LookupOverload(PointerSumTypeMember *); template static void LookupOverload(...); template struct Lookup { - // Compute a particular member type by resolving the lookup helper ovorload. + // Compute a particular member type by resolving the lookup helper overload. using MemberT = decltype( LookupOverload(static_cast(nullptr))); diff --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h index 40b7b000da409..6fecff8d756f0 100644 --- a/llvm/include/llvm/ADT/PointerUnion.h +++ b/llvm/include/llvm/ADT/PointerUnion.h @@ -181,7 +181,7 @@ public: explicit operator bool() const { return !isNull(); } /// Test if the Union currently holds the type matching T. - template int is() const { + template bool is() const { constexpr int Index = pointer_union_detail::TypeIndex::Index; static_assert(Index < sizeof...(PTs), "PointerUnion::is given type not in the union"); @@ -197,7 +197,7 @@ public: } /// Returns the current pointer if it is of the specified pointer type, - /// otherwises returns null. + /// otherwise returns null. template T dyn_cast() const { if (is()) return get(); diff --git a/llvm/include/llvm/ADT/PostOrderIterator.h b/llvm/include/llvm/ADT/PostOrderIterator.h index 2fe7447a8e778..bb413a956d9f7 100644 --- a/llvm/include/llvm/ADT/PostOrderIterator.h +++ b/llvm/include/llvm/ADT/PostOrderIterator.h @@ -18,6 +18,7 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator_range.h" #include #include @@ -101,7 +102,7 @@ class po_iterator // VisitStack - Used to maintain the ordering. Top = current block // First element is basic block pointer, second is the 'next child' to visit - std::vector> VisitStack; + SmallVector, 8> VisitStack; po_iterator(NodeRef BB) { this->insertEdge(Optional(), BB); diff --git a/llvm/include/llvm/ADT/PriorityWorklist.h b/llvm/include/llvm/ADT/PriorityWorklist.h index 96d22c87557e6..01dd59a2e71a3 100644 --- a/llvm/include/llvm/ADT/PriorityWorklist.h +++ b/llvm/include/llvm/ADT/PriorityWorklist.h @@ -110,7 +110,7 @@ public: /// Insert a sequence of new elements into the PriorityWorklist. template - typename std::enable_if::value>::type + std::enable_if_t::value> insert(SequenceT &&Input) { if (std::begin(Input) == std::end(Input)) // Nothing to do for an empty input sequence. diff --git a/llvm/include/llvm/ADT/SCCIterator.h b/llvm/include/llvm/ADT/SCCIterator.h index 1e642b9f75d3a..8a7c0a78a0fc7 100644 --- a/llvm/include/llvm/ADT/SCCIterator.h +++ b/llvm/include/llvm/ADT/SCCIterator.h @@ -124,11 +124,11 @@ public: return CurrentSCC; } - /// Test if the current SCC has a loop. + /// Test if the current SCC has a cycle. /// /// If the SCC has more than one node, this is trivially true. If not, it may - /// still contain a loop if the node has an edge back to itself. - bool hasLoop() const; + /// still contain a cycle if the node has an edge back to itself. + bool hasCycle() const; /// This informs the \c scc_iterator that the specified \c Old node /// has been deleted, and \c New is to be used in its place. @@ -212,7 +212,7 @@ template void scc_iterator::GetNextSCC() { } template -bool scc_iterator::hasLoop() const { +bool scc_iterator::hasCycle() const { assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); if (CurrentSCC.size() > 1) return true; diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index b61dab2459d18..50b688b366489 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -50,6 +50,10 @@ namespace detail { template using IterOfRange = decltype(std::begin(std::declval())); +template +using ValueOfRange = typename std::remove_reference()))>::type; + } // end namespace detail //===----------------------------------------------------------------------===// @@ -75,6 +79,79 @@ template struct make_const_ref { typename std::add_const::type>::type; }; +/// Utilities for detecting if a given trait holds for some set of arguments +/// 'Args'. For example, the given trait could be used to detect if a given type +/// has a copy assignment operator: +/// template +/// using has_copy_assign_t = decltype(std::declval() +/// = std::declval()); +/// bool fooHasCopyAssign = is_detected::value; +namespace detail { +template using void_t = void; +template class Op, class... Args> struct detector { + using value_t = std::false_type; +}; +template