* Re: [FFmpeg-devel] [PATCH v5] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13.
[not found] <20250613083704.6858-1-jiawei@iscas.ac.cn>
@ 2025-06-13 8:42 ` Martin Storsjö
2025-06-14 22:49 ` Michael Niedermayer
0 siblings, 1 reply; 4+ messages in thread
From: Martin Storsjö @ 2025-06-13 8:42 UTC (permalink / raw)
To: Jiawei; +Cc: ffmpeg-devel
On Fri, 13 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 was originally added in commit
> 973859f5230e (2009). A previous attempt to enable `-ftree-vectorize`
> was made in commit cb8646af24bd (2016), but it was reverted in
> fd6dbc53855f. The reason for the revert was that the inline x86 CABAC
> assembly code caused compiler errors ??? the compiler would run out of
> available registers during vectorization, making it unable to compile
> some functions.
>
> In commit 182663a58a7a (2023), the problematic CABAC function was made
> non-inline. This significantly reduces the risk of register exhaustion
> caused by inlining large assembly blocks, making the vectorizer safer
> to enable for other functions.
>
> Given improvements in GCC's vectorizer and the mitigation of the
> original issue, we now re-enable `-ftree-vectorize` for GCC version 13
> and above.
>
> Version log:
> Only allow GCC versions >= 13 to use -ftree-vectorize.
> Modify the commit description.
> Add historical context and rationale for the change.
>
> Disscussion see:
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250521061750.54882-1-jiawei@iscas.ac.cn/
>
>
> Signed-off-by: Jiawei <jiawei@iscas.ac.cn>
> ---
> configure | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Thanks; I'm ok with this version. Whoever applies it can touch up the
commit message to remove the ???? word (maybe just replace it with an
"as"), it sounds reasonably right like that.
// 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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH v5] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13.
2025-06-13 8:42 ` [FFmpeg-devel] [PATCH v5] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13 Martin Storsjö
@ 2025-06-14 22:49 ` Michael Niedermayer
2025-06-16 7:37 ` Martin Storsjö
2025-06-17 22:17 ` compn
0 siblings, 2 replies; 4+ messages in thread
From: Michael Niedermayer @ 2025-06-14 22:49 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Jiawei
[-- Attachment #1.1: Type: text/plain, Size: 2471 bytes --]
Hi Martin
On Fri, Jun 13, 2025 at 11:42:11AM +0300, Martin Storsjö wrote:
> On Fri, 13 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 was originally added in commit
> > 973859f5230e (2009). A previous attempt to enable `-ftree-vectorize`
> > was made in commit cb8646af24bd (2016), but it was reverted in
> > fd6dbc53855f. The reason for the revert was that the inline x86 CABAC
> > assembly code caused compiler errors ??? the compiler would run out of
> > available registers during vectorization, making it unable to compile
> > some functions.
> >
> > In commit 182663a58a7a (2023), the problematic CABAC function was made
> > non-inline. This significantly reduces the risk of register exhaustion
> > caused by inlining large assembly blocks, making the vectorizer safer
> > to enable for other functions.
> >
> > Given improvements in GCC's vectorizer and the mitigation of the
> > original issue, we now re-enable `-ftree-vectorize` for GCC version 13
> > and above.
> >
> > Version log:
> > Only allow GCC versions >= 13 to use -ftree-vectorize.
> > Modify the commit description.
> > Add historical context and rationale for the change.
> >
> > Disscussion see:
> > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250521061750.54882-1-jiawei@iscas.ac.cn/
> >
> >
> > Signed-off-by: Jiawei <jiawei@iscas.ac.cn>
> > ---
> > configure | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
>
> Thanks; I'm ok with this version. Whoever applies it can touch up the commit
> message to remove the ???? word (maybe just replace it with an "as"), it
> sounds reasonably right like that.
the patch seems not to be on the mailing list
I have v4 in my inbox but not v5, so if the patch is ok, maybe you are
the only one who can apply it
Maybe Jiawei is not subscribed to the ML so his mails would go to the
moderation que (i didnt check)
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH v5] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13.
2025-06-14 22:49 ` Michael Niedermayer
@ 2025-06-16 7:37 ` Martin Storsjö
2025-06-17 22:17 ` compn
1 sibling, 0 replies; 4+ messages in thread
From: Martin Storsjö @ 2025-06-16 7:37 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Jiawei
On Sun, 15 Jun 2025, Michael Niedermayer wrote:
> Hi Martin
>
> On Fri, Jun 13, 2025 at 11:42:11AM +0300, Martin Storsjö wrote:
>> On Fri, 13 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 was originally added in commit
>>> 973859f5230e (2009). A previous attempt to enable `-ftree-vectorize`
>>> was made in commit cb8646af24bd (2016), but it was reverted in
>>> fd6dbc53855f. The reason for the revert was that the inline x86 CABAC
>>> assembly code caused compiler errors ??? the compiler would run out of
>>> available registers during vectorization, making it unable to compile
>>> some functions.
>>>
>>> In commit 182663a58a7a (2023), the problematic CABAC function was made
>>> non-inline. This significantly reduces the risk of register exhaustion
>>> caused by inlining large assembly blocks, making the vectorizer safer
>>> to enable for other functions.
>>>
>>> Given improvements in GCC's vectorizer and the mitigation of the
>>> original issue, we now re-enable `-ftree-vectorize` for GCC version 13
>>> and above.
>>>
>>> Version log:
>>> Only allow GCC versions >= 13 to use -ftree-vectorize.
>>> Modify the commit description.
>>> Add historical context and rationale for the change.
>>>
>>> Disscussion see:
>>> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250521061750.54882-1-jiawei@iscas.ac.cn/
>>>
>>>
>>> Signed-off-by: Jiawei <jiawei@iscas.ac.cn>
>>> ---
>>> configure | 6 +++++-
>>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> Thanks; I'm ok with this version. Whoever applies it can touch up the commit
>> message to remove the ???? word (maybe just replace it with an "as"), it
>> sounds reasonably right like that.
>
> the patch seems not to be on the mailing list
> I have v4 in my inbox but not v5, so if the patch is ok, maybe you are
> the only one who can apply it
>
> Maybe Jiawei is not subscribed to the ML so his mails would go to the
> moderation que (i didnt check)
That's possible; I don't see v3 or any of the newer versions on the
mailing list archive.
Content-wise, the patch is the same since v2 I think, it's just been work
on the commit message.
But I guess I can repost a version that I would be ok with getting
applied.
// 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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH v5] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13.
2025-06-14 22:49 ` Michael Niedermayer
2025-06-16 7:37 ` Martin Storsjö
@ 2025-06-17 22:17 ` compn
1 sibling, 0 replies; 4+ messages in thread
From: compn @ 2025-06-17 22:17 UTC (permalink / raw)
To: ffmpeg-devel
On Sun, 15 Jun 2025 00:49:42 +0200, Michael Niedermayer wrote:
> the patch seems not to be on the mailing list
> I have v4 in my inbox but not v5, so if the patch is ok, maybe you are
> the only one who can apply it
>
> Maybe Jiawei is not subscribed to the ML so his mails would go to the
> moderation que (i didnt check)
no mails in mod queue last few days, including checked right now.
-compn
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2025-06-17 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20250613083704.6858-1-jiawei@iscas.ac.cn>
2025-06-13 8:42 ` [FFmpeg-devel] [PATCH v5] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13 Martin Storsjö
2025-06-14 22:49 ` Michael Niedermayer
2025-06-16 7:37 ` Martin Storsjö
2025-06-17 22:17 ` compn
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