On 16 January 2017 at 23:38, Ben Crocker <bcroc...@redhat.com> wrote: > Reenable the PPC64LE Vector-Scalar Extension for LLVM versions >= 3.8.1, > now that LLVM bug 26775 and its corollary, 25503, are fixed. > > Amendment: remove extraneous spaces in macro def & invocations. > > Signed-off-by: Ben Crocker <bcroc...@redhat.com> Stable ?
Cc: "12.0 13.0 17.0" <mesa-sta...@lists.freedesktop.org> > --- > src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > index cac81b9..ff6bbb9 100644 > --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp > @@ -50,6 +50,8 @@ > > #include <stddef.h> > > +#define LLVM_VERSION(MAJOR_MINOR, PATCH_LEVEL) ((MAJOR_MINOR << 8) + > PATCH_LEVEL) > + Don't think the extra macro brings much. We directly compare pretty much anywhere in Mesa. > // Workaround http://llvm.org/PR23628 > #if HAVE_LLVM >= 0x0307 > # pragma push_macro("DEBUG") > @@ -614,7 +616,8 @@ > lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, > > #if defined(PIPE_ARCH_PPC) > MAttrs.push_back(util_cpu_caps.has_altivec ? "+altivec" : "-altivec"); > -#if HAVE_LLVM >= 0x0304 > +#if (HAVE_LLVM >= 0x0304) && \ > + (LLVM_VERSION(HAVE_LLVM, MESA_LLVM_VERSION_PATCH) <= LLVM_VERSION(0x0308, > 0x00)) I've mentioned this on another unrelated thread, but it's also applicable here: We want to remove build-time patch version checks and ask LLVM at runtime about it. Reason being is that when using shared LLVM one can easily update/downgrade between bugfix releases and the build time decision (in this patch) will no longer hold true. If there's no LLVM API can I ask you to follow with LLVM devs ? Until that one is available, this patch will be good enough. Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev