# repository's registry will be used there as well.
variables:
UPSTREAM_REPO: mesa/mesa
- DEBIAN_TAG: "2019-08-09"
+ DEBIAN_TAG: "2019-09-11"
DEBIAN_VERSION: stretch-slim
DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
variables:
SCONS_TARGET: "llvm=1"
SCONS_CHECK_COMMAND: "scons llvm=1 check"
- LLVM_VERSION: "3.4"
- # LLVM 3.4 packages were built with an old libstdc++ ABI
- CXX: "g++ -D_GLIBCXX_USE_CXX11_ABI=0"
+ LLVM_VERSION: "3.9"
.deqp-test:
<<: *ci-run-policy
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
echo 'deb https://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.list
-echo 'deb https://deb.debian.org/debian jessie main' >/etc/apt/sources.list.d/jessie.list
apt-get update
apt-get install -y -t stretch-backports \
- llvm-3.4-dev \
llvm-3.9-dev \
libclang-3.9-dev \
llvm-4.0-dev \
elif with_gallium_opencl or with_gallium_r600
_llvm_version = '>= 3.9.0'
else
- _llvm_version = '>= 3.4.0'
+ _llvm_version = '>= 3.5.0'
endif
_shared_llvm = get_option('shared-llvm')
import SCons.Util
-required_llvm_version = '3.4'
+required_llvm_version = '3.5'
def generate(env):
'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser',
'LLVMBitReader', 'LLVMMC', 'LLVMCore', 'LLVMSupport'
])
- elif llvm_version >= distutils.version.LooseVersion('3.5'):
+ else:
env.Prepend(LIBS = [
'LLVMMCDisassembler',
'LLVMBitWriter', 'LLVMMCJIT', 'LLVMRuntimeDyld',
'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
'LLVMSupport'
])
- else:
- env.Prepend(LIBS = [
- 'LLVMMCDisassembler',
- 'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
- 'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG',
- 'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter',
- 'LLVMX86Utils', 'LLVMX86Info', 'LLVMMCJIT', 'LLVMJIT',
- 'LLVMExecutionEngine', 'LLVMCodeGen', 'LLVMScalarOpts',
- 'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMipa',
- 'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
- 'LLVMSupport', 'LLVMRuntimeDyld', 'LLVMObject'
- ])
env.Append(LIBS = [
'imagehlp',
'psapi',
env.ParseConfig('%s --libs ' % llvm_config + ' '.join(components))
env.ParseConfig('%s --ldflags' % llvm_config)
- if llvm_version >= distutils.version.LooseVersion('3.5'):
- env.ParseConfig('%s --system-libs' % llvm_config)
- env.Append(CXXFLAGS = ['-std=c++14'])
+ env.ParseConfig('%s --system-libs' % llvm_config)
+ env.Append(CXXFLAGS = ['-std=c++14'])
except OSError:
print('scons: llvm-config version %s failed' % llvm_version)
return
"-sroa -early-cse -simplifycfg -reassociate "
"-mem2reg -constprop -instcombine -gvn",
filename, gallivm_debug & GALLIVM_PERF_NO_OPT ? 0 : 2,
- (LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)) ? "[-mcpu=<-mcpu option>] " : "",
+ "[-mcpu=<-mcpu option>] ",
"[-mattr=<-mattr option(s)>]");
}
#include <llvm/Support/TargetSelect.h>
-#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
#include <llvm/IR/CallSite.h>
-#endif
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Module.h>
#include <llvm/Support/CBindingWrapping.h>
MAttrs.push_back("-avx512er");
MAttrs.push_back("-avx512f");
MAttrs.push_back("-avx512pf");
-#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
MAttrs.push_back("-avx512bw");
MAttrs.push_back("-avx512dq");
MAttrs.push_back("-avx512vl");
#endif
-#endif
#if defined(PIPE_ARCH_ARM)
if (!util_cpu_caps.has_neon) {
MAttrs.push_back("-neon");
}
}
-#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
StringRef MCPU = llvm::sys::getHostCPUName();
/*
* The cpu bits are no longer set automatically, so need to set mcpu manually.
if (gallivm_debug & (GALLIVM_DEBUG_IR | GALLIVM_DEBUG_ASM | GALLIVM_DEBUG_DUMP_BC)) {
debug_printf("llc -mcpu option: %s\n", MCPU.str().c_str());
}
-#endif
ShaderMemoryManager *MM = NULL;
if (useMCJIT) {
{
#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 9)
return LLVMGetCalledValue(call);
-#elif LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
- return llvm::wrap(llvm::CallSite(llvm::unwrap<llvm::Instruction>(call)).getCalledValue());
#else
- return NULL; /* radeonsi doesn't support so old LLVM. */
+ return llvm::wrap(llvm::CallSite(llvm::unwrap<llvm::Instruction>(call)).getCalledValue());
#endif
}
{
return llvm::wrap(llvm::unwrap(B)->CreateAtomicCmpXchg(llvm::unwrap(Ptr), llvm::unwrap(Cmp),
llvm::unwrap(New), mapFromLLVMOrdering(SuccessOrdering),
-#if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5)
mapFromLLVMOrdering(FailureOrdering),
-#endif
SingleThread ? llvm::SynchronizationScope::SingleThread : llvm::SynchronizationScope::CrossThread));
}
#endif
-
-#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 5
-LLVMValueRef LLVMBuildFence(LLVMBuilderRef B,
- LLVMAtomicOrdering ordering,
- LLVMBool singleThread,
- const char *Name)
-{
- return llvm::wrap(llvm::unwrap(B)->CreateFence(mapFromLLVMOrdering(ordering),
- singleThread ? llvm::SynchronizationScope::SingleThread : llvm::SynchronizationScope::CrossThread));
-}
-#endif
LLVMBool SingleThread);
#endif
-#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 5
-LLVMValueRef LLVMBuildFence(LLVMBuilderRef B,
- LLVMAtomicOrdering ordering,
- LLVMBool singleThread, const char *Name);
-#endif
#ifdef __cplusplus
}
#endif