diff options
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm-c/DebugInfo.h | 24 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/DXILResource.h | 19 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/LoopAnalysisManager.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/LoopInfo.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h | 26 | ||||
-rw-r--r-- | llvm/include/llvm/BinaryFormat/ELF.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Frontend/OpenMP/ClauseT.h | 57 | ||||
-rw-r--r-- | llvm/include/llvm/Frontend/OpenMP/OMP.td | 10 | ||||
-rw-r--r-- | llvm/include/llvm/IR/DebugProgramInstruction.h | 10 | ||||
-rw-r--r-- | llvm/include/llvm/IR/Value.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/LTO/LTO.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h | 1 | ||||
-rw-r--r-- | llvm/include/llvm/TargetParser/X86TargetParser.def | 1 | ||||
-rw-r--r-- | llvm/include/llvm/TargetParser/X86TargetParser.h | 1 | ||||
-rw-r--r-- | llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h | 10 | ||||
-rw-r--r-- | llvm/include/llvm/Transforms/Scalar/LoopPassManager.h | 15 |
16 files changed, 134 insertions, 56 deletions
diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h index 2ecd69a..70da3a6 100644 --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -204,6 +204,11 @@ enum { typedef unsigned LLVMMetadataKind; /** + * The kind of checksum to emit. + */ +typedef enum { CSK_MD5, CSK_SHA1, CSK_SHA256 } LLVMChecksumKind; + +/** * An LLVM DWARF type encoding. */ typedef unsigned LLVMDWARFTypeEncoding; @@ -327,6 +332,25 @@ LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef Builder, size_t DirectoryLen); /** + * Create a file descriptor to hold debugging information for a file. + * \param Builder The \c DIBuilder. + * \param Filename File name. + * \param FilenameLen The length of the C string passed to \c Filename. + * \param Directory Directory. + * \param DirectoryLen The length of the C string passed to \c Directory. + * \param ChecksumKind The kind of checksum. eg MD5, SHA256 + * \param Checksum The checksum. + * \param ChecksumLen The length of the checksum. + * \param Souce The embedded source. + * \param SourceLen The length of the source. + */ +LLVM_C_ABI LLVMMetadataRef LLVMDIBuilderCreateFileWithChecksum( + LLVMDIBuilderRef Builder, const char *Filename, size_t FilenameLen, + const char *Directory, size_t DirectoryLen, LLVMChecksumKind ChecksumKind, + const char *Checksum, size_t ChecksumLen, const char *Source, + size_t SourceLen); + +/** * Creates a new descriptor for a module with the specified parent scope. * \param Builder The \c DIBuilder. * \param ParentScope The parent scope containing this module declaration. diff --git a/llvm/include/llvm/Analysis/DXILResource.h b/llvm/include/llvm/Analysis/DXILResource.h index 88ac0a1..c7aff16 100644 --- a/llvm/include/llvm/Analysis/DXILResource.h +++ b/llvm/include/llvm/Analysis/DXILResource.h @@ -243,6 +243,25 @@ public: } }; +/// The dx.Padding target extension type +/// +/// `target("dx.Padding", NumBytes)` +class PaddingExtType : public TargetExtType { +public: + PaddingExtType() = delete; + PaddingExtType(const PaddingExtType &) = delete; + PaddingExtType &operator=(const PaddingExtType &) = delete; + + unsigned getNumBytes() const { return getIntParameter(0); } + + static bool classof(const TargetExtType *T) { + return T->getName() == "dx.Padding"; + } + static bool classof(const Type *T) { + return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T)); + } +}; + //===----------------------------------------------------------------------===// class ResourceTypeInfo { diff --git a/llvm/include/llvm/Analysis/LoopAnalysisManager.h b/llvm/include/llvm/Analysis/LoopAnalysisManager.h index fc69cb0..1755257 100644 --- a/llvm/include/llvm/Analysis/LoopAnalysisManager.h +++ b/llvm/include/llvm/Analysis/LoopAnalysisManager.h @@ -36,7 +36,6 @@ namespace llvm { class AAResults; class AssumptionCache; -class BlockFrequencyInfo; class DominatorTree; class Function; class Loop; @@ -58,7 +57,6 @@ struct LoopStandardAnalysisResults { ScalarEvolution &SE; TargetLibraryInfo &TLI; TargetTransformInfo &TTI; - BlockFrequencyInfo *BFI; MemorySSA *MSSA; }; diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index a7a6a27..0ecb114 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -617,7 +617,7 @@ public: }; /// Function to print a loop's contents as LLVM's text IR assembly. -LLVM_ABI void printLoop(Loop &L, raw_ostream &OS, +LLVM_ABI void printLoop(const Loop &L, raw_ostream &OS, const std::string &Banner = ""); /// Find and return the loop attribute node for the attribute @p Name in diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h b/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h index 871028d..9354eef 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h +++ b/llvm/include/llvm/Analysis/ScalarEvolutionPatternMatch.h @@ -95,6 +95,10 @@ inline bind_ty<const SCEVAddExpr> m_scev_Add(const SCEVAddExpr *&V) { return V; } +inline bind_ty<const SCEVMulExpr> m_scev_Mul(const SCEVMulExpr *&V) { + return V; +} + /// Match a specified const SCEV *. struct specificscev_ty { const SCEV *Expr; @@ -252,6 +256,18 @@ m_scev_UDiv(const Op0_t &Op0, const Op1_t &Op1) { return m_scev_Binary<SCEVUDivExpr>(Op0, Op1); } +template <typename Op0_t, typename Op1_t> +inline SCEVBinaryExpr_match<SCEVSMaxExpr, Op0_t, Op1_t> +m_scev_SMax(const Op0_t &Op0, const Op1_t &Op1) { + return m_scev_Binary<SCEVSMaxExpr>(Op0, Op1); +} + +template <typename Op0_t, typename Op1_t> +inline SCEVBinaryExpr_match<SCEVMinMaxExpr, Op0_t, Op1_t> +m_scev_MinMax(const Op0_t &Op0, const Op1_t &Op1) { + return m_scev_Binary<SCEVMinMaxExpr>(Op0, Op1); +} + /// Match unsigned remainder pattern. /// Matches patterns generated by getURemExpr. template <typename Op0_t, typename Op1_t> struct SCEVURem_match { @@ -284,14 +300,10 @@ template <typename Op0_t, typename Op1_t> struct SCEVURem_match { << SE.getTypeSizeInBits(TruncTy)); return Op0.match(LHS) && Op1.match(RHS); } - const auto *Add = dyn_cast<SCEVAddExpr>(Expr); - if (Add == nullptr || Add->getNumOperands() != 2) - return false; - - const SCEV *A = Add->getOperand(1); - const auto *Mul = dyn_cast<SCEVMulExpr>(Add->getOperand(0)); - if (Mul == nullptr) + const SCEV *A; + const SCEVMulExpr *Mul; + if (!SCEVPatternMatch::match(Expr, m_scev_Add(m_scev_Mul(Mul), m_SCEV(A)))) return false; const auto MatchURemWithDivisor = [&](const SCEV *B) { diff --git a/llvm/include/llvm/BinaryFormat/ELF.h b/llvm/include/llvm/BinaryFormat/ELF.h index e619b18..8d0dc64 100644 --- a/llvm/include/llvm/BinaryFormat/ELF.h +++ b/llvm/include/llvm/BinaryFormat/ELF.h @@ -647,6 +647,7 @@ enum { EF_HEXAGON_ISA_V85 = 0x00000085, // Hexagon V85 ISA EF_HEXAGON_ISA_V87 = 0x00000087, // Hexagon V87 ISA EF_HEXAGON_ISA_V89 = 0x00000089, // Hexagon V89 ISA + EF_HEXAGON_ISA_V91 = 0x00000091, // Hexagon V91 ISA EF_HEXAGON_ISA = 0x000003ff, // Hexagon V.. ISA // Tiny core flag, bit[15] @@ -680,6 +681,7 @@ enum { EF_HEXAGON_MACH_V85 = EF_HEXAGON_ISA_V85, // Hexagon V85 EF_HEXAGON_MACH_V87 = EF_HEXAGON_ISA_V87, // Hexagon V87 EF_HEXAGON_MACH_V89 = EF_HEXAGON_ISA_V89, // Hexagon V89 + EF_HEXAGON_MACH_V91 = EF_HEXAGON_ISA_V91, // Hexagon V91 EF_HEXAGON_MACH = 0x0000ffff, // Hexagon V.. }; diff --git a/llvm/include/llvm/Frontend/OpenMP/ClauseT.h b/llvm/include/llvm/Frontend/OpenMP/ClauseT.h index d49bade..1a01fa6 100644 --- a/llvm/include/llvm/Frontend/OpenMP/ClauseT.h +++ b/llvm/include/llvm/Frontend/OpenMP/ClauseT.h @@ -571,7 +571,9 @@ struct DoacrossT { // V5.2: [8.2.1] `requirement` clauses template <typename T, typename I, typename E> // struct DynamicAllocatorsT { - using EmptyTrait = std::true_type; + using Requires = E; + using WrapperTrait = std::true_type; + OPT(Requires) v; }; template <typename T, typename I, typename E> // @@ -1056,7 +1058,9 @@ struct ReplayableT { // V5.2: [8.2.1] `requirement` clauses template <typename T, typename I, typename E> // struct ReverseOffloadT { - using EmptyTrait = std::true_type; + using Requires = E; + using WrapperTrait = std::true_type; + OPT(Requires) v; }; // V5.2: [10.4.2] `safelen` clause @@ -1078,6 +1082,14 @@ struct ScheduleT { std::tuple<Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t; }; +// [6.0:361] +template <typename T, typename I, typename E> // +struct SelfMapsT { + using Requires = E; + using WrapperTrait = std::true_type; + OPT(Requires) v; +}; + // V5.2: [15.8.1] Memory-order clauses template <typename T, typename I, typename E> // struct SeqCstT { @@ -1169,18 +1181,17 @@ struct TransparentT { // V5.2: [8.2.1] `requirement` clauses template <typename T, typename I, typename E> // struct UnifiedAddressT { - using EmptyTrait = std::true_type; + using Requires = E; + using WrapperTrait = std::true_type; + OPT(Requires) v; }; // V5.2: [8.2.1] `requirement` clauses template <typename T, typename I, typename E> // struct UnifiedSharedMemoryT { - using EmptyTrait = std::true_type; -}; - -template <typename T, typename I, typename E> // -struct SelfMapsT { - using EmptyTrait = std::true_type; + using Requires = E; + using WrapperTrait = std::true_type; + OPT(Requires) v; }; // V5.2: [5.10] `uniform` clause @@ -1288,14 +1299,12 @@ using ExtensionClausesT = template <typename T, typename I, typename E> using EmptyClausesT = std::variant< AcqRelT<T, I, E>, AcquireT<T, I, E>, CaptureT<T, I, E>, CompareT<T, I, E>, - DynamicAllocatorsT<T, I, E>, FullT<T, I, E>, InbranchT<T, I, E>, - MergeableT<T, I, E>, NogroupT<T, I, E>, NoOpenmpRoutinesT<T, I, E>, + FullT<T, I, E>, InbranchT<T, I, E>, MergeableT<T, I, E>, NogroupT<T, I, E>, + NoOpenmpConstructsT<T, I, E>, NoOpenmpRoutinesT<T, I, E>, NoOpenmpT<T, I, E>, NoParallelismT<T, I, E>, NotinbranchT<T, I, E>, NowaitT<T, I, E>, ReadT<T, I, E>, RelaxedT<T, I, E>, ReleaseT<T, I, E>, - ReverseOffloadT<T, I, E>, SeqCstT<T, I, E>, SimdT<T, I, E>, - ThreadsT<T, I, E>, UnifiedAddressT<T, I, E>, UnifiedSharedMemoryT<T, I, E>, - UnknownT<T, I, E>, UntiedT<T, I, E>, UseT<T, I, E>, WeakT<T, I, E>, - WriteT<T, I, E>, NoOpenmpConstructsT<T, I, E>, SelfMapsT<T, I, E>>; + SeqCstT<T, I, E>, SimdT<T, I, E>, ThreadsT<T, I, E>, UnknownT<T, I, E>, + UntiedT<T, I, E>, UseT<T, I, E>, WeakT<T, I, E>, WriteT<T, I, E>>; template <typename T, typename I, typename E> using IncompleteClausesT = @@ -1323,18 +1332,20 @@ using WrapperClausesT = std::variant< AtomicDefaultMemOrderT<T, I, E>, AtT<T, I, E>, BindT<T, I, E>, CollapseT<T, I, E>, ContainsT<T, I, E>, CopyinT<T, I, E>, CopyprivateT<T, I, E>, DefaultT<T, I, E>, DestroyT<T, I, E>, - DetachT<T, I, E>, DeviceTypeT<T, I, E>, EnterT<T, I, E>, - ExclusiveT<T, I, E>, FailT<T, I, E>, FilterT<T, I, E>, FinalT<T, I, E>, - FirstprivateT<T, I, E>, HasDeviceAddrT<T, I, E>, HintT<T, I, E>, - HoldsT<T, I, E>, InclusiveT<T, I, E>, IndirectT<T, I, E>, + DetachT<T, I, E>, DeviceTypeT<T, I, E>, DynamicAllocatorsT<T, I, E>, + EnterT<T, I, E>, ExclusiveT<T, I, E>, FailT<T, I, E>, FilterT<T, I, E>, + FinalT<T, I, E>, FirstprivateT<T, I, E>, HasDeviceAddrT<T, I, E>, + HintT<T, I, E>, HoldsT<T, I, E>, InclusiveT<T, I, E>, IndirectT<T, I, E>, InitializerT<T, I, E>, IsDevicePtrT<T, I, E>, LinkT<T, I, E>, MessageT<T, I, E>, NocontextT<T, I, E>, NontemporalT<T, I, E>, NovariantsT<T, I, E>, NumTeamsT<T, I, E>, NumThreadsT<T, I, E>, OrderedT<T, I, E>, PartialT<T, I, E>, PriorityT<T, I, E>, PrivateT<T, I, E>, - ProcBindT<T, I, E>, SafelenT<T, I, E>, SeverityT<T, I, E>, SharedT<T, I, E>, - SimdlenT<T, I, E>, SizesT<T, I, E>, PermutationT<T, I, E>, - ThreadLimitT<T, I, E>, UniformT<T, I, E>, UpdateT<T, I, E>, - UseDeviceAddrT<T, I, E>, UseDevicePtrT<T, I, E>, UsesAllocatorsT<T, I, E>>; + ProcBindT<T, I, E>, ReverseOffloadT<T, I, E>, SafelenT<T, I, E>, + SelfMapsT<T, I, E>, SeverityT<T, I, E>, SharedT<T, I, E>, SimdlenT<T, I, E>, + SizesT<T, I, E>, PermutationT<T, I, E>, ThreadLimitT<T, I, E>, + UnifiedAddressT<T, I, E>, UnifiedSharedMemoryT<T, I, E>, UniformT<T, I, E>, + UpdateT<T, I, E>, UseDeviceAddrT<T, I, E>, UseDevicePtrT<T, I, E>, + UsesAllocatorsT<T, I, E>>; template <typename T, typename I, typename E> using UnionOfAllClausesT = typename type::Union< // diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td index 86a9e24..edcf7a9 100644 --- a/llvm/include/llvm/Frontend/OpenMP/OMP.td +++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td @@ -177,6 +177,8 @@ def OMPC_Doacross : Clause<[Spelling<"doacross">]> { } def OMPC_DynamicAllocators : Clause<[Spelling<"dynamic_allocators">]> { let clangClass = "OMPDynamicAllocatorsClause"; + let flangClass = "OmpDynamicAllocatorsClause"; + let isValueOptional = true; } def OMPC_DynGroupprivate : Clause<[Spelling<"dyn_groupprivate">]> { let flangClass = "OmpDynGroupprivateClause"; @@ -467,6 +469,8 @@ def OMPC_Replayable : Clause<[Spelling<"replayable">]> { } def OMPC_ReverseOffload : Clause<[Spelling<"reverse_offload">]> { let clangClass = "OMPReverseOffloadClause"; + let flangClass = "OmpReverseOffloadClause"; + let isValueOptional = true; } def OMPC_SafeLen : Clause<[Spelling<"safelen">]> { let clangClass = "OMPSafelenClause"; @@ -541,12 +545,18 @@ def OMPC_Transparent : Clause<[Spelling<"transparent">]> { } def OMPC_UnifiedAddress : Clause<[Spelling<"unified_address">]> { let clangClass = "OMPUnifiedAddressClause"; + let flangClass = "OmpUnifiedAddressClause"; + let isValueOptional = true; } def OMPC_UnifiedSharedMemory : Clause<[Spelling<"unified_shared_memory">]> { let clangClass = "OMPUnifiedSharedMemoryClause"; + let flangClass = "OmpUnifiedSharedMemoryClause"; + let isValueOptional = true; } def OMPC_SelfMaps : Clause<[Spelling<"self_maps">]> { let clangClass = "OMPSelfMapsClause"; + let flangClass = "OmpSelfMapsClause"; + let isValueOptional = true; } def OMPC_Uniform : Clause<[Spelling<"uniform">]> { let flangClass = "Name"; diff --git a/llvm/include/llvm/IR/DebugProgramInstruction.h b/llvm/include/llvm/IR/DebugProgramInstruction.h index e0292c2..457c60e3b 100644 --- a/llvm/include/llvm/IR/DebugProgramInstruction.h +++ b/llvm/include/llvm/IR/DebugProgramInstruction.h @@ -14,7 +14,7 @@ // dbg.value(metadata i32 %foo, ...) // %bar = void call @ext(%foo); // -// and all information is stored in the Value / Metadata hierachy defined +// and all information is stored in the Value / Metadata hierarchy defined // elsewhere in LLVM. In the "DbgRecord" design, each instruction /may/ have a // connection with a DbgMarker, which identifies a position immediately before // the instruction, and each DbgMarker /may/ then have connections to DbgRecords @@ -37,7 +37,7 @@ // // This structure separates the two concerns of the position of the debug-info // in the function, and the Value that it refers to. It also creates a new -// "place" in-between the Value / Metadata hierachy where we can customise +// "place" in-between the Value / Metadata hierarchy where we can customise // storage and allocation techniques to better suite debug-info workloads. // NB: as of the initial prototype, none of that has actually been attempted // yet. @@ -162,7 +162,7 @@ public: LLVM_ABI bool isIdenticalToWhenDefined(const DbgRecord &R) const; /// Convert this DbgRecord back into an appropriate llvm.dbg.* intrinsic. /// \p InsertBefore Optional position to insert this intrinsic. - /// \returns A new llvm.dbg.* intrinsic representiung this DbgRecord. + /// \returns A new llvm.dbg.* intrinsic representing this DbgRecord. LLVM_ABI DbgInfoIntrinsic * createDebugIntrinsic(Module *M, Instruction *InsertBefore) const; ///@} @@ -530,7 +530,7 @@ public: LLVM_ABI void setKillAddress(); /// Check whether this kills the address component. This doesn't take into /// account the position of the intrinsic, therefore a returned value of false - /// does not guarentee the address is a valid location for the variable at the + /// does not guarantee the address is a valid location for the variable at the /// intrinsic's position in IR. LLVM_ABI bool isKillAddress() const; @@ -539,7 +539,7 @@ public: LLVM_ABI DbgVariableRecord *clone() const; /// Convert this DbgVariableRecord back into a dbg.value intrinsic. /// \p InsertBefore Optional position to insert this intrinsic. - /// \returns A new dbg.value intrinsic representiung this DbgVariableRecord. + /// \returns A new dbg.value intrinsic representing this DbgVariableRecord. LLVM_ABI DbgVariableIntrinsic * createDebugIntrinsic(Module *M, Instruction *InsertBefore) const; diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h index 04d0391..58822a0 100644 --- a/llvm/include/llvm/IR/Value.h +++ b/llvm/include/llvm/IR/Value.h @@ -484,8 +484,8 @@ public: /// Remove every uses that can safely be removed. /// /// This will remove for example uses in llvm.assume. - /// This should be used when performing want to perform a tranformation but - /// some Droppable uses pervent it. + /// This should be used when performing want to perform a transformation but + /// some Droppable uses prevent it. /// This function optionally takes a filter to only remove some droppable /// uses. LLVM_ABI void diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index 3a9a7f7..000472f 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -105,12 +105,6 @@ setupStatsFile(StringRef StatsFilename); /// ordered indices to elements in the input array. LLVM_ABI std::vector<int> generateModulesOrdering(ArrayRef<BitcodeModule *> R); -/// Updates MemProf attributes (and metadata) based on whether the index -/// has recorded that we are linking with allocation libraries containing -/// the necessary APIs for downstream transformations. -LLVM_ABI void updateMemProfAttributes(Module &Mod, - const ModuleSummaryIndex &Index); - class LTO; struct SymbolResolution; diff --git a/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h b/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h index faaff4a..4aa6c01 100644 --- a/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h +++ b/llvm/include/llvm/Support/X86DisassemblerDecoderCommon.h @@ -121,6 +121,7 @@ enum attributeBits { "The Dynamic Duo! Prefer over all else because this changes " \ "most operands' meaning") \ ENUM_ENTRY(IC_64BIT_REX2, 2, "requires a REX2 prefix") \ + ENUM_ENTRY(IC_64BIT_REX2_REXW, 3, "requires a REX2 and the W prefix") \ ENUM_ENTRY(IC_VEX, 1, "requires a VEX prefix") \ ENUM_ENTRY(IC_VEX_XS, 2, "requires VEX and the XS prefix") \ ENUM_ENTRY(IC_VEX_XD, 2, "requires VEX and the XD prefix") \ diff --git a/llvm/include/llvm/TargetParser/X86TargetParser.def b/llvm/include/llvm/TargetParser/X86TargetParser.def index 254587b..a94eab1 100644 --- a/llvm/include/llvm/TargetParser/X86TargetParser.def +++ b/llvm/include/llvm/TargetParser/X86TargetParser.def @@ -108,6 +108,7 @@ X86_CPU_SUBTYPE(INTEL_COREI7_ARROWLAKE_S, "arrowlake-s") X86_CPU_SUBTYPE(INTEL_COREI7_PANTHERLAKE, "pantherlake") X86_CPU_SUBTYPE(AMDFAM1AH_ZNVER5, "znver5") X86_CPU_SUBTYPE(INTEL_COREI7_DIAMONDRAPIDS, "diamondrapids") +X86_CPU_SUBTYPE(INTEL_COREI7_NOVALAKE, "novalake") // Alternate names supported by __builtin_cpu_is and target multiversioning. X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_ALDERLAKE, "raptorlake") diff --git a/llvm/include/llvm/TargetParser/X86TargetParser.h b/llvm/include/llvm/TargetParser/X86TargetParser.h index e4c43cd..80f3d35 100644 --- a/llvm/include/llvm/TargetParser/X86TargetParser.h +++ b/llvm/include/llvm/TargetParser/X86TargetParser.h @@ -117,6 +117,7 @@ enum CPUKind { CK_Lunarlake, CK_Pantherlake, CK_Wildcatlake, + CK_Novalake, CK_Sierraforest, CK_Grandridge, CK_Graniterapids, diff --git a/llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h b/llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h index f2de083..576f1eb 100644 --- a/llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h +++ b/llvm/include/llvm/Transforms/IPO/MemProfContextDisambiguation.h @@ -95,6 +95,16 @@ public: function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> isPrevailing); }; + +/// Strips MemProf attributes and metadata. Can be invoked by the pass pipeline +/// when we don't have an index that has recorded that we are linking with +/// allocation libraries containing the necessary APIs for downstream +/// transformations. +class MemProfRemoveInfo : public PassInfoMixin<MemProfRemoveInfo> { +public: + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); +}; + } // end namespace llvm #endif // LLVM_TRANSFORMS_IPO_MEMPROF_CONTEXT_DISAMBIGUATION_H diff --git a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h index 750f954..1842d2d 100644 --- a/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h +++ b/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h @@ -404,10 +404,8 @@ public: explicit FunctionToLoopPassAdaptor(std::unique_ptr<PassConceptT> Pass, bool UseMemorySSA = false, - bool UseBlockFrequencyInfo = false, bool LoopNestMode = false) : Pass(std::move(Pass)), UseMemorySSA(UseMemorySSA), - UseBlockFrequencyInfo(UseBlockFrequencyInfo), LoopNestMode(LoopNestMode) { LoopCanonicalizationFPM.addPass(LoopSimplifyPass()); LoopCanonicalizationFPM.addPass(LCSSAPass()); @@ -429,7 +427,6 @@ private: FunctionPassManager LoopCanonicalizationFPM; bool UseMemorySSA = false; - bool UseBlockFrequencyInfo = false; const bool LoopNestMode; }; @@ -442,8 +439,7 @@ private: /// \c LoopPassManager and the returned adaptor will be in loop-nest mode. template <typename LoopPassT> inline FunctionToLoopPassAdaptor -createFunctionToLoopPassAdaptor(LoopPassT &&Pass, bool UseMemorySSA = false, - bool UseBlockFrequencyInfo = false) { +createFunctionToLoopPassAdaptor(LoopPassT &&Pass, bool UseMemorySSA = false) { if constexpr (is_detected<HasRunOnLoopT, LoopPassT>::value) { using PassModelT = detail::PassModel<Loop, LoopPassT, LoopAnalysisManager, @@ -453,7 +449,7 @@ createFunctionToLoopPassAdaptor(LoopPassT &&Pass, bool UseMemorySSA = false, return FunctionToLoopPassAdaptor( std::unique_ptr<FunctionToLoopPassAdaptor::PassConceptT>( new PassModelT(std::forward<LoopPassT>(Pass))), - UseMemorySSA, UseBlockFrequencyInfo, false); + UseMemorySSA, false); } else { LoopPassManager LPM; LPM.addPass(std::forward<LoopPassT>(Pass)); @@ -465,7 +461,7 @@ createFunctionToLoopPassAdaptor(LoopPassT &&Pass, bool UseMemorySSA = false, return FunctionToLoopPassAdaptor( std::unique_ptr<FunctionToLoopPassAdaptor::PassConceptT>( new PassModelT(std::move(LPM))), - UseMemorySSA, UseBlockFrequencyInfo, true); + UseMemorySSA, true); } } @@ -474,8 +470,7 @@ createFunctionToLoopPassAdaptor(LoopPassT &&Pass, bool UseMemorySSA = false, template <> inline FunctionToLoopPassAdaptor createFunctionToLoopPassAdaptor<LoopPassManager>(LoopPassManager &&LPM, - bool UseMemorySSA, - bool UseBlockFrequencyInfo) { + bool UseMemorySSA) { // Check if LPM contains any loop pass and if it does not, returns an adaptor // in loop-nest mode. using PassModelT = @@ -487,7 +482,7 @@ createFunctionToLoopPassAdaptor<LoopPassManager>(LoopPassManager &&LPM, return FunctionToLoopPassAdaptor( std::unique_ptr<FunctionToLoopPassAdaptor::PassConceptT>( new PassModelT(std::move(LPM))), - UseMemorySSA, UseBlockFrequencyInfo, LoopNestMode); + UseMemorySSA, LoopNestMode); } /// Pass for printing a loop's contents as textual IR. |