From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 747274D79E for ; Mon, 2 Jun 2025 01:25:51 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 9A45A68CAA2; Mon, 2 Jun 2025 04:25:48 +0300 (EEST) Received: from cstnet.cn (smtp21.cstnet.cn [159.226.251.21]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C9AB368C625 for ; Thu, 29 May 2025 10:03:48 +0300 (EEST) Received: from localhost.localdomain (unknown [210.73.43.2]) by APP-01 (Coremail) with SMTP id qwCowADnWdjLBjhoZ38dAQ--.34756S2; Thu, 29 May 2025 15:03:40 +0800 (CST) From: Jiawei To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 May 2025 15:03:12 +0800 Message-ID: <20250529070312.698302-1-jiawei@iscas.ac.cn> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CM-TRANSID: qwCowADnWdjLBjhoZ38dAQ--.34756S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Aw4rZFW3KF15XFW8Zw45trb_yoW8Zr47pa yvgFy3WF48G34fKFs7ta1DKF4UW395Wa1xJF4agw17WF90kF1kuF9akw1YvFyxCwnxAw4a 9F10kry7J3WDAaUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9C14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r106r15McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxa n2IY04v7MxkF7I0En4kS14v26r1q6r43MxkIecxEwVAFwVW8CwCF04k20xvY0x0EwIxGrw CFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE 14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2 IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxK x2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI 0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUvNtsUUUUU= X-Originating-IP: [210.73.43.2] X-CM-SenderInfo: 5mld4v3l6l2u1dvotugofq/1tbiBgsRAGg33KaPeAAAsO X-Mailman-Approved-At: Mon, 02 Jun 2025 04:25:47 +0300 Subject: [FFmpeg-devel] [FFmpeg-devel, v2] gcc: Relaxing auto-vectorization limitation. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: michael@niedermayer.cc, george@nsup.org, remi@remlab.net, post@frankplowman.com, quinkblack@foxmail.com, Jiawei , martin@martin.st, kieran618@googlemail.com, andreas.rheinhardt@outlook.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This patch modifies the FFmpeg build system to remove the explicit disabling of GCC's auto-vectorization feature. Modern GCC versions have demonstrated stable auto-vectorization capabilities through extensive optimizations in loop analysis and SIMD code generation. The explicit -fno-tree-vectorize flag originally added in commit 973859f (2009) to workaround early GCC vectorization instability is no longer necessary for recent gcc versions. Key improvements justifying this change: 1. Enhanced heuristics for loop vectorization cost models 2. Mature handling of alignment and memory access patterns 3. Robust fallback mechanisms for unsupported architectures This change allows FFmpeg to benefit from automated SIMD optimizations when built with -O3 optimization level, particularly improving performance on x86_64 (AVX), ARM64 (SVE) and RISC-V(RVV) architectures. [1] https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/973859f5230e77beea7bb59dc081870689d6d191 Version log: Only allow GCC versions >= 13 to use auto-vectorization. Disscussion see: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250521061750.54882-1-jiawei@iscas.ac.cn/ --- configure | 1 - 1 file changed, 1 deletion(-) Signed-off-by: Jiawei --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 3730b0524c..91e3e107c2 100755 --- a/configure +++ b/configure @@ -7656,7 +7656,11 @@ if enabled icc; then disable aligned_stack fi elif enabled gcc; then - check_optflags -fno-tree-vectorize + gcc_version=$($cc -dumpversion) + major_version=${gcc_version%%.*} + if [ $major_version -lt 13 ]; then + check_optflags -fno-tree-vectorize + fi check_cflags -Werror=format-security check_cflags -Werror=implicit-function-declaration check_cflags -Werror=missing-prototypes -- 2.43.0 _______________________________________________ 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".