From: "Martin Storsjö" <martin@martin.st> To: Jiawei <jiawei@iscas.ac.cn> Cc: michael@niedermayer.cc, george@nsup.org, kieran618@googlemail.com, remi@remlab.net, post@frankplowman.com, quinkblack@foxmail.com, ffmpeg-devel@ffmpeg.org, andreas.rheinhardt@outlook.com Subject: Re: [FFmpeg-devel] [PATCH v4] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13. Date: Thu, 12 Jun 2025 14:52:17 +0300 (EEST) Message-ID: <7d981336-9487-d8ad-cb22-42179e315ae7@martin.st> (raw) In-Reply-To: <20250612114256.21334-1-jiawei@iscas.ac.cn> 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".
parent reply other threads:[~2025-06-12 11:52 UTC|newest] Thread overview: expand[flat|nested] mbox.gz Atom feed [parent not found: <20250612114256.21334-1-jiawei@iscas.ac.cn>]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7d981336-9487-d8ad-cb22-42179e315ae7@martin.st \ --to=martin@martin.st \ --cc=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=george@nsup.org \ --cc=jiawei@iscas.ac.cn \ --cc=kieran618@googlemail.com \ --cc=michael@niedermayer.cc \ --cc=post@frankplowman.com \ --cc=quinkblack@foxmail.com \ --cc=remi@remlab.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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