[vlc-devel] [vlc-commits] Enable some FPU optimizations via standard pragma by default
Naohiro KORIYAMA
nkoriyama at gmail.com
Wed Mar 7 17:38:01 CET 2012
Hello,
2012/3/8 Rémi Denis-Courmont <git at videolan.org>:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 7 18:14:26 2012 +0200| [8c890bba351fb5834913aa620b342b3fce78f0be] | committer: 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.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c890bba351fb5834913aa620b342b3fce78f0be
> ---
>
> configure.ac | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index cc1500e..62dc5fc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -964,6 +964,12 @@ AS_IF([test "${enable_optimizations}" != "no"], [
> ])
> ])
> 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
> +])
clang claims if on/off is lower case like that:
../../config.h:816:27: warning: expected 'ON' or 'OFF' or 'DEFAULT' in pragma
[-Wunknown-pragmas]
if on/off is upper case, no warning.
>
> dnl Check for -funroll-loops
> VLC_SAVE_FLAGS
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> http://mailman.videolan.org/listinfo/vlc-commits
Best regards,
--
KORIYAMA, Naohiro
nkoriyama at gmail.com
More information about the vlc-devel
mailing list