mirror of
https://github.com/zebrajr/postgres.git
synced 2026-01-15 12:15:21 +00:00
jit: Drop redundant LLVM configure probes.
We currently require LLVM 14, so these probes for LLVM 9 functions always succeeded. Even when the features aren't enabled in an LLVM build, dummy functions are defined (a problem for a later commit). The whole PGAC_CHECK_LLVM_FUNCTIONS macro and Meson equivalent are removed, because we switched to testing LLVM_VERSION_MAJOR at compile time in subsequent work and these were the last holdouts. That suits the nature of LLVM API evolution better, and also allows for strictly mechanical pruning in future commits like820b5af7and972c2cd2. They advanced the minimum LLVM version but failed to spot these. Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CA%2BhUKGJgB6gvrdDohgwLfCwzVQm%3DVMtb9m0vzQn%3DCwWn-kwG9w%40mail.gmail.com
This commit is contained in:
@@ -101,20 +101,3 @@ dnl LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
|
||||
AC_SUBST(LLVM_BINPATH)
|
||||
|
||||
])# PGAC_LLVM_SUPPORT
|
||||
|
||||
|
||||
# PGAC_CHECK_LLVM_FUNCTIONS
|
||||
# -------------------------
|
||||
#
|
||||
# Check presence of some optional LLVM functions.
|
||||
# (This shouldn't happen until we're ready to run AC_CHECK_DECLS tests;
|
||||
# because PGAC_LLVM_SUPPORT runs very early, it's not an appropriate place.)
|
||||
#
|
||||
AC_DEFUN([PGAC_CHECK_LLVM_FUNCTIONS],
|
||||
[
|
||||
# Check which functionality is present
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
|
||||
AC_CHECK_DECLS([LLVMCreateGDBRegistrationListener, LLVMCreatePerfJITEventListener], [], [], [[#include <llvm-c/ExecutionEngine.h>]])
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
])# PGAC_CHECK_LLVM_FUNCTIONS
|
||||
|
||||
32
configure
vendored
32
configure
vendored
@@ -16607,38 +16607,6 @@ fi
|
||||
CPPFLAGS=$ac_save_CPPFLAGS
|
||||
fi
|
||||
|
||||
if test "$with_llvm" = yes; then
|
||||
|
||||
# Check which functionality is present
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
|
||||
ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
|
||||
"
|
||||
if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
|
||||
_ACEOF
|
||||
ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
|
||||
"
|
||||
if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
|
||||
_ACEOF
|
||||
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
# Lastly, restore full LIBS list and check for readline/libedit symbols
|
||||
LIBS="$LIBS_including_readline"
|
||||
|
||||
|
||||
@@ -1941,10 +1941,6 @@ if test "$with_icu" = yes; then
|
||||
CPPFLAGS=$ac_save_CPPFLAGS
|
||||
fi
|
||||
|
||||
if test "$with_llvm" = yes; then
|
||||
PGAC_CHECK_LLVM_FUNCTIONS()
|
||||
fi
|
||||
|
||||
# Lastly, restore full LIBS list and check for readline/libedit symbols
|
||||
LIBS="$LIBS_including_readline"
|
||||
|
||||
|
||||
@@ -2679,14 +2679,6 @@ decl_checks += [
|
||||
['memset_s', 'string.h', '#define __STDC_WANT_LIB_EXT1__ 1'],
|
||||
]
|
||||
|
||||
# Check presence of some optional LLVM functions.
|
||||
if llvm.found()
|
||||
decl_checks += [
|
||||
['LLVMCreateGDBRegistrationListener', 'llvm-c/ExecutionEngine.h'],
|
||||
['LLVMCreatePerfJITEventListener', 'llvm-c/ExecutionEngine.h'],
|
||||
]
|
||||
endif
|
||||
|
||||
foreach c : decl_checks
|
||||
func = c.get(0)
|
||||
header = c.get(1)
|
||||
|
||||
@@ -1180,24 +1180,19 @@ llvm_create_object_layer(void *Ctx, LLVMOrcExecutionSessionRef ES, const char *T
|
||||
LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(ES);
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER) && HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
|
||||
if (jit_debugging_support)
|
||||
{
|
||||
LLVMJITEventListenerRef l = LLVMCreateGDBRegistrationListener();
|
||||
|
||||
LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(objlayer, l);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER) && HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
|
||||
if (jit_profiling_support)
|
||||
{
|
||||
LLVMJITEventListenerRef l = LLVMCreatePerfJITEventListener();
|
||||
|
||||
LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(objlayer, l);
|
||||
}
|
||||
#endif
|
||||
|
||||
return objlayer;
|
||||
}
|
||||
|
||||
@@ -83,14 +83,6 @@
|
||||
don't. */
|
||||
#undef HAVE_DECL_F_FULLFSYNC
|
||||
|
||||
/* Define to 1 if you have the declaration of
|
||||
`LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
|
||||
#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
|
||||
|
||||
/* Define to 1 if you have the declaration of
|
||||
`LLVMCreatePerfJITEventListener', and to 0 if you don't. */
|
||||
#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
|
||||
|
||||
/* Define to 1 if you have the declaration of `memset_s', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_MEMSET_S
|
||||
|
||||
Reference in New Issue
Block a user