aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-01-15 14:51:43 +0100
committerSamuel Pitoiset <[email protected]>2018-01-16 21:39:53 +0100
commit2091206ad3764c94317bd700cc551f9c31a2847d (patch)
treefa545fd9f22e95bc2ab5938a38d5713b30be44e9 /src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
parentad2b3b2a9cefc28f8bd78a116ab549a08d35ec35 (diff)
ac: import lp_create_builder() from gallivm
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 13194072902..79dbedbb565 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -813,32 +813,3 @@ lp_is_function(LLVMValueRef v)
return llvm::isa<llvm::Function>(llvm::unwrap(v));
#endif
}
-
-extern "C" LLVMBuilderRef
-lp_create_builder(LLVMContextRef ctx, enum lp_float_mode float_mode)
-{
- LLVMBuilderRef builder = LLVMCreateBuilderInContext(ctx);
-
-#if HAVE_LLVM >= 0x0308
- llvm::FastMathFlags flags;
-
- switch (float_mode) {
- case LP_FLOAT_MODE_DEFAULT:
- break;
- case LP_FLOAT_MODE_NO_SIGNED_ZEROS_FP_MATH:
- flags.setNoSignedZeros();
- llvm::unwrap(builder)->setFastMathFlags(flags);
- break;
- case LP_FLOAT_MODE_UNSAFE_FP_MATH:
-#if HAVE_LLVM >= 0x0600
- flags.setFast();
-#else
- flags.setUnsafeAlgebra();
-#endif
- llvm::unwrap(builder)->setFastMathFlags(flags);
- break;
- }
-#endif
-
- return builder;
-}