Received: by 2002:a17:90a:728b:0:0:0:0 with SMTP id e11csp8883351pjg; Fri, 8 May 2020 05:09:28 -0700 (PDT) X-Google-Smtp-Source: APiQypKT7dVzR1lf7oSztgg9ajtlzrtgaOaMDBdX+q5EoPeO+6+0e9qj3d2QMhzW1hoqaHkfGbG+ X-Received: by 2002:a17:907:361:: with SMTP id rs1mr1624403ejb.228.1588939768501; Fri, 08 May 2020 05:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588939768; cv=none; d=google.com; s=arc-20160816; b=uG96IuNjshEUVEGLzvOmjhlD/2+qcLs5Qiv42oj2wq4/DtNIt7PeqeLl9qiAZDBhIe jTf2592pUraEYgfAdG/UnX9JIB+5bhmwK+Jdj4taeSNXxtG6VZPGWMwcoLr8op69CBQN 7sHW06Rh236hO0lF8teB0k+IkLqvJheOi7uJXVtiNAN8n0pvot9Kaz6ZRvpEr7W5i52h 0CzHuOwQ0O1qs/9bn0dg9x/KR/3Ghv0o38zHyQ8S+isYGXyi+ykdjaeszyNpRfu3XQLa u2R+98iUAeH2RaYVhPU+2Qk0seFjSN++WF3FMiGx2bUY19lCqRS2aZyZ81kVqlHql6OL Ds5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JNZzUeY2aFUFxS9/1EsLjQhFGwXz4+OIMoE5ZyKLgsk=; b=pvBZ2nbqjX8Yr5FS+lgynCF7O/B9JdlWfwiTsf2VJzy/5jPy5+7CePfy/l3r3flkr6 NIAG5LtLJvZUO0IIIkss5bfg+FzqVkq4wLbXYdpvkEBiYgDsj1e+g2u8JA2CM1brAco+ dpBIfAJF5I8EgqSv4tzYPUQAK0aadCAlotajWPW5suB95VeiWCiP9STsASUQUdLELzmv 9IZwOpkLlJdvzPsZFQVV4u+8olqfRXmhgvIYN+2nxIeeNGfg1rKRBU3E1laF5yzkuyjT dXVnstvptyJrVYwd1esx2Q5H+Ig75yeYd8Uh4q5W+pPH2vuphYQos56kBW9Ht/eMJFVD Ma3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=I6vmXTbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si790686edu.229.2020.05.08.05.08.40; Fri, 08 May 2020 05:09:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=I6vmXTbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726922AbgEHMHP (ORCPT + 99 others); Fri, 8 May 2020 08:07:15 -0400 Received: from mail.zx2c4.com ([192.95.5.64]:60091 "EHLO mail.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726616AbgEHMHP (ORCPT ); Fri, 8 May 2020 08:07:15 -0400 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 76154c00 for ; Fri, 8 May 2020 11:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=DRgmOZ/pXwQ/5lwVfB4YHbJj45o=; b=I6vmXT bN5MOJ0Iiit/gr1I5M01cRzInKwgUcr2MpIOqYfNc3rjh/Wp2etLj/9MdEFcmku/ PPPCR8w+jzUzLaUMqvoYPjhnGSZogzAdUH8JPImWNju3YglhsTBSpkOVwW5krRkl Ah4QCz6HoC6ykmihbgyaS1JXZAM8tkPJt7i7yUQ1q7LskWruczxeb8wP1FG3vhYQ egQDWtsp+RibqBD7lyUk+O0/agdVIWZxsYm500cisMvcuc3tNbvOHdxnCdKYsXJ9 5yha71h54ZxQ275cQhjRzkDnVN/wrvjKoveaN/GaPkQFhEsYV53AVz/dBp1qFZHw o8CGEBf4hPVSTsdQ== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 9f0bd178 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 8 May 2020 11:54:18 +0000 (UTC) Received: by mail-il1-f172.google.com with SMTP id m5so1147837ilj.10 for ; Fri, 08 May 2020 05:07:14 -0700 (PDT) X-Gm-Message-State: AGi0PuaLi//ItJBxzmHH+s0rezCa9W4rldWPZkU11JYu61WSuyxgDdVn T+bCgmIQTRxtuwCpwYdAn4DLypL36FQV9L+H1ug= X-Received: by 2002:a92:5c82:: with SMTP id d2mr2428758ilg.231.1588939633367; Fri, 08 May 2020 05:07:13 -0700 (PDT) MIME-Version: 1.0 References: <20200507224530.2993316-1-Jason@zx2c4.com> <20200508090202.7s3kcqpvpxx32syu@butterfly.localdomain> <20200508113336.2vdfdnc6tqyx4pu6@butterfly.localdomain> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 8 May 2020 06:07:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Kconfig: default to CC_OPTIMIZE_FOR_PERFORMANCE_O3 for gcc >= 10 To: Arnd Bergmann Cc: Oleksandr Natalenko , LKML , X86 ML , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 8, 2020 at 5:56 AM Arnd Bergmann wrote: > > On Fri, May 8, 2020 at 1:33 PM Oleksandr Natalenko wrote: > > > > On Fri, May 08, 2020 at 05:21:47AM -0600, Jason A. Donenfeld wrote: > > > > Should we untangle -O3 from depending on ARC first maybe? > > > > > > Oh, hah, good point. Yes, I'll do that for a v2, but will wait another > > > day for feedback first. > > > > Just keep in mind that my previous attempt [1] failed because of too > > many false positive warnings despite -O3 really uncovered a couple of > > bugs in the codebase. > > I think my warning fixes were mostly picked up in the meantime, but > if there are any remaining, they would be mixed in with random other > fixes in my testing tree, so it's hard to know for sure. > > I also want to hear the feedback from the gcc developers about what > the general recommendations are between O2 and O3, and how > they may have changed over time. According to the gcc-10 documentation, > the difference between -O2 and -O3 is exactly this set of options: > > -fgcse-after-reload > -fipa-cp-clone > -floop-interchange > -floop-unroll-and-jam > -fpeel-loops > -fpredictive-commoning > -fsplit-loops > -fsplit-paths > -ftree-loop-distribution > -ftree-loop-vectorize > -ftree-partial-pre > -ftree-slp-vectorize > -funswitch-loops > -fvect-cost-model > -fvect-cost-model=dynamic > -fversion-loops-for-strides The other significant thing -- and what prompted this patchset -- is it looks like gcc 10 has lowered the inlining degree for -O2, and put gcc 9's inlining parameters from -O2 into gcc-10's -O3.