* Re: [FFmpeg-devel] [PATCH v4] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13.
[not found] <20250612114256.21334-1-jiawei@iscas.ac.cn>
@ 2025-06-12 11:52 ` Martin Storsjö
0 siblings, 0 replies; only message in thread
From: Martin Storsjö @ 2025-06-12 11:52 UTC (permalink / raw)
To: Jiawei
Cc: michael, george, kieran618, remi, post, quinkblack, ffmpeg-devel,
andreas.rheinhardt
On Thu, 12 Jun 2025, Jiawei wrote:
> This patch modifies the FFmpeg build system to allow GCC to use the
> `-ftree-vectorize` flag when the compiler version is 13 or newer.
> Enabling this flag can improve performance through better loop analysis
> and auto-vectorization (SIMD) opportunities in modern GCC versions.
>
> The explicit -fno-tree-vectorize flag originally added in commit
> 973859f5230e (2009). And a previous attempt to enable '-ftree-vectorize'
> was made in commit cb8646af24bd (2016) but was reverted in
> fd6dbc53855f due to performance regressions. The regressions were
> primarily caused by the complicated inline x86 CABAC assembly code,
> which nearly exhausted all available registers under vectorization
> passes.
No, it wasn't because of performance regressions - it was because the
inline x86 CABAC caused compiler errors, when the compiler was unable to
compile functions due to running out of registers (because of the inline
assembly).
> However, in commit 182663a58a7a (2023), the problematic CABAC function
> was made non-inline. This change significantly reduces the risk of
> register exhaustion during vectorization and means the original problem
> that prompted the revert is no longer as impactful.
>
> This patch contains historical background and rationale by Martin Storsj??,
> who explained why the vectorizer is now try to re-enabled after previously
> failing. Thanks for his summary.
No need to include this paragraph in the commit message - but thanks for
considering attributing the information.
// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-12 11:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20250612114256.21334-1-jiawei@iscas.ac.cn>
2025-06-12 11:52 ` [FFmpeg-devel] [PATCH v4] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13 Martin Storsjö
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git