diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-08-13 15:37:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-08 19:04:56 +0000 |
commit | 61cfbce3347e4372143bcabf7b197577b9f3958a (patch) | |
tree | a996b7140fcecf4ec110b2ac28983b858e5df637 /contrib/llvm-project/llvm/include | |
parent | 972a253a57b6f144b0e4a3e2080a2a0076ec55a0 (diff) | |
parent | 677727e8296a802385345db6fa65e68223f4597a (diff) | |
download | src-61cfbce3347e4372143bcabf7b197577b9f3958a.tar.gz src-61cfbce3347e4372143bcabf7b197577b9f3958a.zip |
Diffstat (limited to 'contrib/llvm-project/llvm/include')
10 files changed, 37 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h b/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h index 6ea6d2361eba..102b069ac722 100644 --- a/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h +++ b/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h @@ -1440,6 +1440,10 @@ public: /// to a stack reload. unsigned getGISelRematGlobalCost() const; + /// \returns the lower bound of a trip count to decide on vectorization + /// while tail-folding. + unsigned getMinTripCountTailFoldingThreshold() const; + /// \returns True if the target supports scalable vectors. bool supportsScalableVectors() const; @@ -1830,6 +1834,7 @@ public: ReductionFlags) const = 0; virtual bool shouldExpandReduction(const IntrinsicInst *II) const = 0; virtual unsigned getGISelRematGlobalCost() const = 0; + virtual unsigned getMinTripCountTailFoldingThreshold() const = 0; virtual bool enableScalableVectorization() const = 0; virtual bool supportsScalableVectors() const = 0; virtual bool hasActiveVectorLength(unsigned Opcode, Type *DataType, @@ -2453,6 +2458,10 @@ public: return Impl.getGISelRematGlobalCost(); } + unsigned getMinTripCountTailFoldingThreshold() const override { + return Impl.getMinTripCountTailFoldingThreshold(); + } + bool supportsScalableVectors() const override { return Impl.supportsScalableVectors(); } diff --git a/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h index 1a75cb35549e..da1f53aa33cb 100644 --- a/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h +++ b/contrib/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h @@ -803,6 +803,8 @@ public: unsigned getGISelRematGlobalCost() const { return 1; } + unsigned getMinTripCountTailFoldingThreshold() const { return 0; } + bool supportsScalableVectors() const { return false; } bool enableScalableVectorization() const { return false; } diff --git a/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h b/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h index a0bb50db8c54..99e7a9868c29 100644 --- a/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h +++ b/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h @@ -1597,6 +1597,7 @@ enum { NT_GNU_BUILD_ID = 3, NT_GNU_GOLD_VERSION = 4, NT_GNU_PROPERTY_TYPE_0 = 5, + FDO_PACKAGING_METADATA = 0xcafe1a7e, }; // Android note types. diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/ISDOpcodes.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/ISDOpcodes.h index e90730140406..b7f6de40266e 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/ISDOpcodes.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/ISDOpcodes.h @@ -1486,6 +1486,11 @@ inline unsigned getUnorderedFlavor(CondCode Cond) { /// SetCC operation. CondCode getSetCCInverse(CondCode Operation, EVT Type); +inline bool isExtOpcode(unsigned Opcode) { + return Opcode == ISD::ANY_EXTEND || Opcode == ISD::ZERO_EXTEND || + Opcode == ISD::SIGN_EXTEND; +} + namespace GlobalISel { /// Return the operation corresponding to !(X op Y), where 'op' is a valid /// SetCC operation. The U bit of the condition code has different meanings diff --git a/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/CodeView.h b/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/CodeView.h index d4cb6ae7a28e..b7a3e1561a07 100644 --- a/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/CodeView.h +++ b/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/CodeView.h @@ -330,6 +330,9 @@ enum class DebugSubsectionKind : uint32_t { MergedAssemblyInput = 0xfc, CoffSymbolRVA = 0xfd, + + XfgHashType = 0xff, + XfgHashVirtual = 0x100, }; /// Equivalent to CV_ptrtype_e. diff --git a/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.h b/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.h index 37fe5a98b093..549a6c096510 100644 --- a/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.h +++ b/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/ExecutorSharedMemoryMapperService.h @@ -66,7 +66,10 @@ private: static llvm::orc::shared::CWrapperFunctionResult releaseWrapper(const char *ArgData, size_t ArgSize); +#if (defined(LLVM_ON_UNIX) && !defined(__ANDROID__)) || defined(_WIN32) std::atomic<int> SharedMemoryCount{0}; +#endif + std::mutex Mutex; ReservationMap Reservations; AllocationMap Allocations; diff --git a/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h b/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h index cfb951178da6..99175d796974 100644 --- a/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h +++ b/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h @@ -19,4 +19,7 @@ extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerJITLoaderGDBWrapper(const char *Data, uint64_t Size); +extern "C" llvm::orc::shared::CWrapperFunctionResult +llvm_orc_registerJITLoaderGDBAllocAction(const char *Data, size_t Size); + #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_JITLOADERGDB_H diff --git a/contrib/llvm-project/llvm/include/llvm/IR/Type.h b/contrib/llvm-project/llvm/include/llvm/IR/Type.h index 51263c6b8fcc..a7f22324571b 100644 --- a/contrib/llvm-project/llvm/include/llvm/IR/Type.h +++ b/contrib/llvm-project/llvm/include/llvm/IR/Type.h @@ -144,6 +144,11 @@ public: /// Return true if this is 'bfloat', a 16-bit bfloat type. bool isBFloatTy() const { return getTypeID() == BFloatTyID; } + /// Return true if this is a 16-bit float type. + bool is16bitFPTy() const { + return getTypeID() == BFloatTyID || getTypeID() == HalfTyID; + } + /// Return true if this is 'float', a 32-bit IEEE fp type. bool isFloatTy() const { return getTypeID() == FloatTyID; } diff --git a/contrib/llvm-project/llvm/include/llvm/Support/ErrorHandling.h b/contrib/llvm-project/llvm/include/llvm/Support/ErrorHandling.h index 004b3b7868fb..9c8e3448f3a0 100644 --- a/contrib/llvm-project/llvm/include/llvm/Support/ErrorHandling.h +++ b/contrib/llvm-project/llvm/include/llvm/Support/ErrorHandling.h @@ -147,7 +147,11 @@ llvm_unreachable_internal(const char *msg = nullptr, const char *file = nullptr, #elif LLVM_UNREACHABLE_OPTIMIZE #define llvm_unreachable(msg) LLVM_BUILTIN_UNREACHABLE #else -#define llvm_unreachable(msg) LLVM_BUILTIN_TRAP, LLVM_BUILTIN_UNREACHABLE +#define llvm_unreachable(msg) \ + do { \ + LLVM_BUILTIN_TRAP; \ + LLVM_BUILTIN_UNREACHABLE; \ + } while (false) #endif #endif diff --git a/contrib/llvm-project/llvm/include/llvm/Support/Host.h b/contrib/llvm-project/llvm/include/llvm/Support/Host.h index f683371ad1d3..369d6745db5a 100644 --- a/contrib/llvm-project/llvm/include/llvm/Support/Host.h +++ b/contrib/llvm-project/llvm/include/llvm/Support/Host.h @@ -65,6 +65,7 @@ namespace sys { StringRef getHostCPUNameForARM(StringRef ProcCpuinfoContent); StringRef getHostCPUNameForS390x(StringRef ProcCpuinfoContent); StringRef getHostCPUNameForRISCV(StringRef ProcCpuinfoContent); + StringRef getHostCPUNameForSPARC(StringRef ProcCpuinfoContent); StringRef getHostCPUNameForBPF(); /// Helper functions to extract CPU details from CPUID on x86. |