Mesa (master): gallivm: limit use of setFastMathFlags to LLVM 3.8 and later
Marek Olšák
mareko at kemper.freedesktop.org
Tue Nov 15 19:22:34 UTC 2016
Module: Mesa
Branch: master
Commit: 5b8876609ec526cd407e86b50bf8587ddb5bbacd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b8876609ec526cd407e86b50bf8587ddb5bbacd
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Nov 15 19:56:03 2016 +0100
gallivm: limit use of setFastMathFlags to LLVM 3.8 and later
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index da3cbdd..a68428d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -739,11 +739,13 @@ lp_create_builder(LLVMContextRef ctx, bool unsafe_fpmath)
{
LLVMBuilderRef builder = LLVMCreateBuilderInContext(ctx);
+#if HAVE_LLVM >= 0x0308
if (unsafe_fpmath) {
llvm::FastMathFlags flags;
flags.setUnsafeAlgebra();
llvm::unwrap(builder)->setFastMathFlags(flags);
}
+#endif
return builder;
}
More information about the mesa-commit
mailing list