[FFmpeg-devel] [PATCH 2/2] configure: Enable GCC vectorization on ≥4.9

Ronald S. Bultje rsbultje at gmail.com
Sun May 8 15:44:26 CEST 2016


Hi,

On Fri, May 6, 2016 at 8:02 PM, James Almer <jamrial at gmail.com> wrote:

> On 5/6/2016 8:48 PM, Timothy Gu wrote:
> > On Fri, May 06, 2016 at 12:08:14PM +0200, Hendrik Leppkes wrote:
> >>
> >> Just to document it, this has caused build breakage in various
> >> scenarios, even in GCC 5.3 (6.1 not tested).
> >>
> >> The latest reported on IRC just today here:
> >> libavcodec/sbrdsp.c: In function 'sbr_neg_odd_64_c':
> >> libavcodec/sbrdsp.c:47:13: internal compiler error: in
> >> vect_analyze_data_ref_accesses, at tree-vect-data-refs.c:2596
> >>  static void sbr_neg_odd_64_c(float *x)
> >>
> >> There are various other cases which usually involve inline asm when
> >> building with SIMD (ie. --cpu=host) and the optimizer running out of
> >> registers, for example:
> >> libavcodec/x86/cabac.h:192:5: error: 'asm' operand has impossible
> constraints
> >>
> >> IMHO this feature is not quite ready to be enabled unconditionally in
> >> our code base, and we should re-evaluate this change.
> >
> > I don't have a problem with reverting this commit, but as James
> mentioned I do
> > prefer the bug to be reported to GCC if possible.
> >
> > Have you also considered the possibility to enable this feature only if
> inline
> > assembly is not enabled?
>
> Nobody disables inline asm when using GCC, so it'd be the same as removing
> tree
> vectorization altogether to begin with.
>
> This feature gives some nice speed boost on parts of the code that don't
> have
> hand written asm, so I'd very much rather keep it and try to get GCC to
> fix bugs
> on their compilers.


Which codepaths are sped up _specifically_? If there's anything where it's
significant and important, we can hand-write assembly for it.

Ronald


More information about the ffmpeg-devel mailing list