mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
LLVMJIT: LLVMGetHostCPUFeatures now is upstream, use LLMV version if available.
Noticed thanks to buildfarm animal seawasp. Author: Andres Freund Backpatch: v11-, where LLVM based JIT compliation was introduced.
This commit is contained in:
@ -32,6 +32,7 @@ char *LLVMGetHostCPUName(void) {
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_DECL_LLVMGETHOSTCPUFEATURES) && !HAVE_DECL_LLVMGETHOSTCPUFEATURES
|
||||
char *LLVMGetHostCPUFeatures(void) {
|
||||
llvm::SubtargetFeatures Features;
|
||||
llvm::StringMap<bool> HostFeatures;
|
||||
@ -42,3 +43,4 @@ char *LLVMGetHostCPUFeatures(void) {
|
||||
|
||||
return strdup(Features.getString().c_str());
|
||||
}
|
||||
#endif
|
||||
|
@ -125,9 +125,11 @@ extern LLVMValueRef slot_compile_deform(struct LLVMJitContext *context, TupleDes
|
||||
extern char *LLVMGetHostCPUName(void);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DECL_LLVMGETHOSTCPUFEATURES) && !HAVE_DECL_LLVMGETHOSTCPUFEATURES
|
||||
/** Get the host CPU features as a string. The result needs to be disposed
|
||||
with LLVMDisposeMessage. */
|
||||
extern char *LLVMGetHostCPUFeatures(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
@ -142,6 +142,10 @@
|
||||
`LLVMCreatePerfJITEventListener', and to 0 if you don't. */
|
||||
#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
|
||||
|
||||
/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to
|
||||
0 if you don't. */
|
||||
#undef HAVE_DECL_LLVMGETHOSTCPUFEATURES
|
||||
|
||||
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
|
||||
if you don't. */
|
||||
#undef HAVE_DECL_LLVMGETHOSTCPUNAME
|
||||
|
@ -119,6 +119,10 @@
|
||||
if you don't. */
|
||||
#define HAVE_DECL_LLVMGETHOSTCPUNAME 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to 0
|
||||
if you don't. */
|
||||
#define HAVE_DECL_LLVMGETHOSTCPUFEATURES 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and
|
||||
to 0 if you don't. */
|
||||
#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0
|
||||
|
Reference in New Issue
Block a user