[vlc-commits] Enable some FPU optimizations via standard pragma by default

Rémi Denis-Courmont git at videolan.org
Wed Mar 7 17:23:25 CET 2012


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
+])
 
   dnl Check for -funroll-loops
   VLC_SAVE_FLAGS



More information about the vlc-commits mailing list