[vlc-devel] [PATCH 15/16] Change compiler options

Serg Chernyavskiy glenvt18 at gmail.com
Tue Jul 7 05:17:09 CEST 2015


This option use is questionable. It gains performance on x86 with gcc 4.8
and gcc 4.9, has no or slightly negative effect with gcc 4.8 on ARM and
some positive effect on ARM with gcc 4.9. With arm-gcc 4.7 I got 15%
performance decrease with or without it. arm-gcc 4.7 is just a bad arm
compiler (but much better than gcc 4.6). It's all about ~5% performance
deviation.
We could as well run
CFLAGS=-funroll-loops ./configure ...
and add flags in configure.ac. For now it just works better out-of-the-box
with gcc-4.9. But it may change in the future. Can't say anything about
other compilers (not gcc). I hope that newer compilers (in general) will
handle loop unrolling smarter.

2015-07-06 19:15 GMT+03:00 Jean-Baptiste Kempf <jb at videolan.org>:

> Sure, but this should be tested before being enabled.
>
> On 26 Jun, glenvt18 wrote :
> > -funroll-loops adds 2-3% on x86 and 5% on arm with gcc-4.9.
> > ---
> >  configure.ac | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index f978a02..c3c9c7d 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -6,7 +6,7 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING(--enable-debug,
> [Enable debug]), enable_debu
> >  if test "$enable_debug" = "yes" ; then
> >      GCC_CFLAGS="$CFLAGS -g -DDVBCSA_DEBUG -D_XOPEN_SOURCE=600"
> >  else
> > -    GCC_CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -D_XOPEN_SOURCE=600"
> > +    GCC_CFLAGS="$CFLAGS -O3 -funroll-loops -fomit-frame-pointer
> -D_XOPEN_SOURCE=600"
> >  fi
> >
> >  AC_ARG_ENABLE(uint32, AC_HELP_STRING(--enable-uint32, [Use native 32
> bits integers for bitslice]), enable_uint32=$enableval, enable_uint32=no)
> > --
> > 1.9.1
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
>
> --
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150707/e3424e77/attachment.html>


More information about the vlc-devel mailing list