From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 695D33858D28 for ; Wed, 8 Dec 2021 09:11:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 695D33858D28 Received: by mail-wr1-x434.google.com with SMTP id u17so2879918wrt.3 for ; Wed, 08 Dec 2021 01:11:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ejgU6azBZYVT4cNj1ULfrYKpWby5UKGj1uXZ9sapJqU=; b=lbFlSBN7AdqVO7u3tqfKbIS/e/FMU7ifYcObf6+Rb2aP/cQZ6jyxLXv+EtF2FX4bR+ ewHp8M6kk8JOBB3fNWQV3R8GYITdPrWZ5A5EjwOPpeZMJ1cYm0X8kqhGCil6ZqR0fMVQ nDfIPt55p2RcVoTv98Ib9op7iXBT+oYI3UijlXn3FyMKAUV1mnIZyI3sDYfpf1Fyjyob USRK2PieoP8XWE+NpUWWFr9cy95FY7b4sMDX5b7i6G6W8wYwAnLjfasWWv0Qplh/T9g/ K0f6C+GflT1j/0TV8nlHuUmsoGIreElb6dR+Dwa9hcGpiqd9V5ZvnaQG7Vz3ReBqwhdc TE5A== X-Gm-Message-State: AOAM531c2EOOfa7lNaCrZYDAa/sdnY1i5cje/Nblto2xougijFDcAPIC RgX31vKkA7Gd6qQ7/u8MWDg= X-Google-Smtp-Source: ABdhPJwBFuaF7XNBlSEgNdL4z014iRofgwvfpzEXw6TcfOWSVGyV/75RT+FOcNWGerXkFCiweJbWiQ== X-Received: by 2002:a5d:4889:: with SMTP id g9mr58469802wrq.455.1638954662390; Wed, 08 Dec 2021 01:11:02 -0800 (PST) Received: from nbbrfq (91-119-98-250.dsl.dynamic.surfer.at. [91.119.98.250]) by smtp.gmail.com with ESMTPSA id z6sm2074164wrm.93.2021.12.08.01.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 01:11:02 -0800 (PST) Date: Wed, 8 Dec 2021 10:10:58 +0100 From: Bernhard Reutner-Fischer To: Jan Hubicka via Gcc-patches Cc: rep.dot.nop@gmail.com, Jan Hubicka , mjambor@suse.cz Subject: Re: Limit inlining functions called once Message-ID: <20211208101058.6346d8a9@nbbrfq> In-Reply-To: <20211207150701.GK18150@kam.mff.cuni.cz> References: <20211207150701.GK18150@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2021 09:11:09 -0000 On Tue, 7 Dec 2021 16:07:01 +0100 Jan Hubicka via Gcc-patches wrote: > Hi, > as dicussed in PR ipa/103454 there are several benchmarks that regresses > for -finline-functions-called once. Runtmes: > - tramp3d with -Ofast. 31% > - exchange2 with -Ofast 11-21% > - roms O2 9%-10% > - tonto 2.5-3.5% with LTO > Build times: > - specfp2006 41% (mostly wrf that builds 71% faster) > - specint2006 1.5-3% > - specfp2017 64% (again mostly wrf) > - specint2017 2.5-3.5% > > > This patch adds two params to tweak the behaviour: > 1) max-inline-functions-called-once-loop-depth limiting the loop depth > (this is useful primarily for exchange where the inlined function is in > loop depth 9) > 2) max-inline-functions-called-once-insns > We already have large-function-insns/growth parameters, but these are > limiting also inlining small functions, so reducing them will regress > very large functions that are hot. > > Because inlining functions called once is meant just as a cleanup pass > I think it makes sense to have separate limit for it. > > I set the parmaeters to 6 and 4000. > 4000 was chosen to make fatigue benchmark happy and that seems to be only one > holding the value pretty high. I opened > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103585 to track this. > > I plan to reduce the value during before christmas after bit more testing since > it seems to be overall win even if we trade fatigue2 performance, but I would > like to get more testing on larger C++ APPs first. Will this hurt -Os -finline-limit=0 ? thanks,