Commit a71d3315 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Enable some FPU optimizations via standard pragma by default

If GCC -ffast-math is not supported, some floating point optimizations
are still possible through more standard means:

"FP_CONTRACT on" is a subset of -funsafe-math-optimizations.

"FENV_ACCESS off" corresponds to -frounding-math.

"CX_LIMITED_RANGE on" corresponds to -fcx-limited-range, but is not
included as VLC does not use complex numbers anywhere yet.
parent b82611d2
...@@ -964,6 +964,12 @@ AS_IF([test "${enable_optimizations}" != "no"], [ ...@@ -964,6 +964,12 @@ AS_IF([test "${enable_optimizations}" != "no"], [
]) ])
]) ])
AS_IF([test "${ac_cv_c_fast_math}" = "no"], [VLC_RESTORE_FLAGS]) AS_IF([test "${ac_cv_c_fast_math}" = "no"], [VLC_RESTORE_FLAGS])
AH_BOTTOM([
#ifndef __FAST_MATH__
# pragma STDC FENV_ACCESS OFF
# pragma STDC FP_CONTRACT ON
#endif
])
dnl Check for -funroll-loops dnl Check for -funroll-loops
VLC_SAVE_FLAGS VLC_SAVE_FLAGS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment