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 247494E937 for ; Thu, 12 Jun 2025 11:52:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 1D51568C045; Thu, 12 Jun 2025 14:52:27 +0300 (EEST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 1D9EE689D65 for ; Thu, 12 Jun 2025 14:52:19 +0300 (EEST) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-55220699ba8so875721e87.2 for ; Thu, 12 Jun 2025 04:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1749729139; x=1750333939; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=jv4SSEb2rWfgH+43SYov7pVjI7K/OBB7QhaxiVfEhOc=; b=ricQc+rtO4MIZgbicwv5q6N7vE6q2hQN7uhEUZpphdOVdYojQZMLXS/jMWRAF7e274 7gaXO5VbFnxkKOSiC1AXbkg8c0+3/wCoOmDyKmkI0rKM+liHKEhdQifveIUsXjiy/Z/4 wNxHYPR8ItkGyIS+jI+eGrjGG/YFGC76QnjQEdzFnhDHyjnPyA37vm98Qnns+6XopK36 FBp3PBEyOcII3wYICZbTjpJI2h0GJ/nx5xEs2rHKSuqVwMY5b6gT1A8dA22uAyWfwj9Y Fn7YcVnlUs1PoSn+Z9almsOjG7rJ1qpePwS79Qqe6URpD/n/+8eAlS1SYvBhffqls+O7 mv8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749729139; x=1750333939; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jv4SSEb2rWfgH+43SYov7pVjI7K/OBB7QhaxiVfEhOc=; b=s903zlaH7fHTxgoMXabqHom59GkJbFyATFbkZnmpjZ4MLNcHgB66rQEoV77TUZGV79 dXhZB088gUum5ZGaSjGA1yLNLCS0dooeMJXPqQTlpccbqHjnCj3G6+9IoM92VoO7sz51 tr3p19PyPnLcH/4G56Dk4Fm2SrPEnudZidLc7anYincHw84SXUM+atCHnawMTj4mOXz0 ttcDlz0UUJNdIHTys4QXfRZv8wy1dNHQnk7ygqY3XaqobEOgiuNXArjyKKIKRGr+/NN+ FWs0JYxa17vl18tOnzrRc6mofuoY26mPUlslrtl+GT03o15VqEzRT2wYWLWwqmXoE1B0 iwSg== X-Gm-Message-State: AOJu0YyQr8apo0JrN681RkPI4/I+1OzfqSDOber4aAOu3DcI+kFes4Fy nZXkKJIv32rqHfly+6BzGWlm+4KI6cMhn1hS78lsqExye5uWSefqps+ehw8TwJPWZQ== X-Gm-Gg: ASbGncuBESVICGVMWeudBU84MNiFvvWeR395wlvlmxHZU57ZfGC+90UrAZZ+Ixus8hG upwBCZZBzh0XCsVSVQk2n+6YkTXEVu4/7k7a2wxVKgVFDDS4tNOC+81oZmuZ//y2iRQJljVinwA Vb05uE0zDAcoY56XK8NrNlk5li+D7W0iRIc/IwyZwGCPrUiaksKR0/Bk+D8Llipymn2MgjhbPcr CuAgxG1LFve8pXugfqyYHvWiujDWwa2h6zgk08oupXhuwBzirKKZeixBwnF31CWUmiEo15l5OMr Aftz/aKTEl9tuIBtql8J9zNHEOSndmcjda52U/jV6L8T1rCxXrNoMIb2EYW/+Cnmo79LaxJZ0lF 11bctdEsoXhXbj/1DFFlWIv7rxs8oCnbs+XYXYIDQV82eD/AIu/xS1XFJsg== X-Google-Smtp-Source: AGHT+IEHdEszMC9U8vegt+LZzMlziDptGGKmuyywAU8+VJSK/ndN7HZUtcep+py5XKLxSjQCxApMMg== X-Received: by 2002:a05:6512:3ca0:b0:54f:bf00:6f38 with SMTP id 2adb3069b0e04-553a557878dmr817487e87.45.1749729138787; Thu, 12 Jun 2025 04:52:18 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553ac116755sm89982e87.13.2025.06.12.04.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 04:52:18 -0700 (PDT) Date: Thu, 12 Jun 2025 14:52:17 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: Jiawei In-Reply-To: <20250612114256.21334-1-jiawei@iscas.ac.cn> Message-ID: <7d981336-9487-d8ad-cb22-42179e315ae7@martin.st> References: <20250612114256.21334-1-jiawei@iscas.ac.cn> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v4] gcc: Don't disable '-ftree-vectorize' if gcc version higher than 13. 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, kieran618@googlemail.com, remi@remlab.net, post@frankplowman.com, quinkblack@foxmail.com, ffmpeg-devel@ffmpeg.org, andreas.rheinhardt@outlook.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".