diff options
author | Adam Jackson <[email protected]> | 2019-09-06 09:50:22 +0200 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2019-09-11 17:00:43 +0000 |
commit | 59f18f21595c46f103a0efecd19d4137d179ecab (patch) | |
tree | 83ce41b05cec571d05f28136dd3e5a5d19fb941e /src/gallium/auxiliary | |
parent | 9abf7d575597e9dc534cccbb973f9e98338f48fe (diff) |
gallium: Require LLVM >= 3.7
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 33 |
2 files changed, 4 insertions, 33 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 23d330cff54..46355e0277c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -602,9 +602,7 @@ gallivm_compile_module(struct gallivm_state *gallivm) /* Disable frame pointer omission on debug/profile builds */ /* XXX: And workaround http://llvm.org/PR21435 */ -#if (LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7)) && \ - (defined(DEBUG) || defined(PROFILE) || \ - defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)) +#if defined(DEBUG) || defined(PROFILE) || defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim", "true"); LLVMAddTargetDependentFunctionAttr(func, "no-frame-pointer-elim-non-leaf", "true"); #endif diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 23bf1cf7042..cf18d6d14f9 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -45,10 +45,8 @@ #include <llvm/Config/llvm-config.h> // Workaround http://llvm.org/PR23628 -#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7) -# pragma push_macro("DEBUG") -# undef DEBUG -#endif +#pragma push_macro("DEBUG") +#undef DEBUG #include <llvm/Config/llvm-config.h> #include <llvm-c/Core.h> @@ -57,11 +55,7 @@ #include <llvm/Target/TargetOptions.h> #include <llvm/ExecutionEngine/ExecutionEngine.h> #include <llvm/ADT/Triple.h> -#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7) #include <llvm/Analysis/TargetLibraryInfo.h> -#else -#include <llvm/Target/TargetLibraryInfo.h> -#endif #include <llvm/ExecutionEngine/SectionMemoryManager.h> #include <llvm/Support/CommandLine.h> #include <llvm/Support/Host.h> @@ -80,9 +74,7 @@ #endif // Workaround http://llvm.org/PR23628 -#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7) -# pragma pop_macro("DEBUG") -#endif +#pragma pop_macro("DEBUG") #include "c11/threads.h" #include "os/os_thread.h" @@ -160,11 +152,7 @@ LLVMTargetLibraryInfoRef gallivm_create_target_library_info(const char *triple) { return reinterpret_cast<LLVMTargetLibraryInfoRef>( -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 7 - new llvm::TargetLibraryInfo( -#else new llvm::TargetLibraryInfoImpl( -#endif llvm::Triple(triple))); } @@ -173,11 +161,7 @@ void gallivm_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info) { delete reinterpret_cast< -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 7 - llvm::TargetLibraryInfo -#else llvm::TargetLibraryInfoImpl -#endif *>(library_info); } @@ -333,17 +317,6 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, options.StackAlignmentOverride = 4; #endif -#if defined(DEBUG) && (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 7) - options.JITEmitDebugInfo = true; -#endif - - /* XXX: Workaround http://llvm.org/PR21435 */ -#if defined(DEBUG) || defined(PROFILE) || defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 7 - options.NoFramePointerElim = true; -#endif -#endif - builder.setEngineKind(EngineKind::JIT) .setErrorStr(&Error) .setTargetOptions(options) |