From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 38AF343C5A for ; Wed, 27 Jul 2022 17:39:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 04EA468B8DC; Wed, 27 Jul 2022 20:39:33 +0300 (EEST) Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C325668B7CA for ; Wed, 27 Jul 2022 20:39:26 +0300 (EEST) Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-f2a4c51c45so23421085fac.9 for ; Wed, 27 Jul 2022 10:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=v59bquCZdSmTIKa9DSQ8eSO3Lp1IiociuurFzzadM8w=; b=BirTncwMksXyo61h7WiNV52hQDW1KRWTbsmW+y/OG+JzuTpFTi6LxtchTx34X3vZi4 6JGStPQhdJsNVxA27YnGlp2Y12tfD1PuWnUbNvsuPef+Ag4JePgcPVXsRc5TfZJy7aEg XtoJGXq0XUywv0UBaB+3JXptbX01cFNz7yKJXaMlxwupzEh6jbAQtTuRiS78ugBhEJS/ GOIns/sqv7dLx+Kp+04OmeiSaOiGQV310Ucho6gob0iTKgj2MAVT/PqJ+B6OmFQ4XDl/ nu1gA/1pmYuKTNLuqxPiibe4bb+K9BwE2SCzvRGaSShbRh4tEPNKPeM9H3cvipZYvvJO bWyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=v59bquCZdSmTIKa9DSQ8eSO3Lp1IiociuurFzzadM8w=; b=tjybtaA4MwX7Ow5pU3XY3q0NZLijw01N5Yv/ILMed3aO22++3JQsz5DbdGzY1ZJs8a 9ueF39rFqdWqa92ZLWLqfXE7oLsWdXZgcuGSTF6ec5rtkcFd3c2hCkFgnibs/lVpy69z 5S/3vda5J/waIEv1hKE7DVolOq3riJnMFBJMmYCvieXAK23rkppvNr6yBuehp2HVf8Z0 MpGPGyPtiBzHKUUWo0SrIm4FORoS0G/4L5uGxefUzBw+UfNVHzORcBodJ7G6fLflrF/F B7oOK/3bZgDwZLd6tCtQdNDzZmac/Bbv8ovcH6cNzfqrYsvagRjmTHrWRTAorkYMO4c8 TvcQ== X-Gm-Message-State: AJIora+CpDGYHA72vieiVdfyODXfMRgs2reiD+STlI6Si42ky+GzXY5y 0ASdQ0rYxRmfR1oPO/V0ltp5IBte+W22yA== X-Google-Smtp-Source: AGRyM1upaYMWHNj/2p8O4dtt/OyRjjzVD8K09jFnltYDub7gUtTPxKCbk/tSjgrD8iepS9Tgo/HBUw== X-Received: by 2002:a05:6870:c1cd:b0:fe:1295:6e34 with SMTP id i13-20020a056870c1cd00b000fe12956e34mr2783229oad.137.1658943564628; Wed, 27 Jul 2022 10:39:24 -0700 (PDT) Received: from [192.168.0.11] ([186.136.131.204]) by smtp.gmail.com with ESMTPSA id f24-20020a9d6c18000000b0061c731fc92bsm7555862otq.64.2022.07.27.10.39.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jul 2022 10:39:23 -0700 (PDT) Message-ID: Date: Wed, 27 Jul 2022 14:39:22 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <05a46152f1b2458ea326edd9cfb6d817@amazon.com> From: James Almer In-Reply-To: <05a46152f1b2458ea326edd9cfb6d817@amazon.com> Subject: Re: [FFmpeg-devel] [PATCH] enable auto vectorization for gcc 7 and higher 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 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 7/27/2022 2:34 PM, Swinney, Jonathan wrote: > I recognize that this patch is going to be somewhat controversial. I'm submitting it mostly to see what the opinions are and evaluate options. I am working on improving performance for aarch64. On that architecture, there are fewer hand written assembly implementations of hot functions than there are for x86_64 and allowing gcc to auto-vectorize yields noticeable improvements. > > Gcc vectorization has improved recently and it hasn't been evaluated on the mailing list for a few years. This is the latest discussion I found in my searches: http://ffmpeg.org/pipermail/ffmpeg-devel/2016-May/193977.html Every time this was done, it was inevitably reverted after complains and crash reports started piling up because gcc can't really handle all the inline code our codebase has, among other things. > > If the community is not comfortable accepting a patch like this outright, would you be willing to accept a new option to the configure script, something like --enable-auto-vectorization? --extra-cflags can be used for this. > > Thanks! > > Signed-off-by: Jonathan Swinney > --- > configure | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/configure b/configure > index 6629d14099..c63c9348ad 100755 > --- a/configure > +++ b/configure > @@ -7173,7 +7173,9 @@ if enabled icc; then > disable aligned_stack > fi > elif enabled gcc; then > - check_optflags -fno-tree-vectorize > + case $gcc_basever in > + 2|2.*|3.*|4.*|5.*|6.*) check_optflags -fno-tree-vectorize ;; > + esac > check_cflags -Werror=format-security > check_cflags -Werror=implicit-function-declaration > check_cflags -Werror=missing-prototypes _______________________________________________ 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".