From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 125AC385841A; Thu, 7 Mar 2024 15:55:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 125AC385841A Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kam.mff.cuni.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 125AC385841A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709826936; cv=none; b=ntb94E6cbTT7mkFuu7eQFz2eaKwYda9JA/prJsfsvg9gs7u7EeWT+Gfh9ajlI3DEK9asr7YuW6ZsM4JAAaXGR+MW7ORWgLlZRWPz2lvCVA5sPG449gZ0rRbMRzmiK8xWi3f//APwkFluKenr45250t8lks4PU/oXqlGmqy2NAm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709826936; c=relaxed/simple; bh=65YRXWvq/ClCXTRoHdhoMW4PhJH4eacpnXOoTk3QryA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=K5r41TviFK4AfP8iWISedg5YcFldil+Q7ZoMs+DtK6sD6RdbRBr5AmpnOJ7rI8QS7aOzCwZXKsvR33es50QsHM7sNusrAa9J19IkSwERuyx7116aJD0m6uYnYPY/+DEi4cELRZipyFWisbpxPtAVfh25y1x1mSrlEeF5W6fWT6c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 67E9028453B; Thu, 7 Mar 2024 16:55:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1709826933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=65YRXWvq/ClCXTRoHdhoMW4PhJH4eacpnXOoTk3QryA=; b=PwNbQ5ntW2RQWBNeiEu3HIy8lNO6VADMM45o7ZUdZe69Fq1huXNsFCOM8FQMBd7AnwObvC o6p5/s7gZF6PrOpFhG8KHnF/Y+iYxA+f4ZKqcl3mCPhmKZm9fBb6qz/GO2cTE5j5JQQHqB u7d7VbfV6BP+J+zdLu6d6ltqvioYJeM= Date: Thu, 7 Mar 2024 16:55:33 +0100 From: Jan Hubicka To: "pinskia at gcc dot gnu.org" Cc: gcc-bugs@gcc.gnu.org Subject: Re: [Bug ipa/114262] Over-inlining when optimizing for size with gnu_inline function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > Note GCC has not retuned its -Os heurstics for a long time because it has been > decent enough for most folks and corner cases like this is almost never come > up. There were quite few changes to -Os heuristics :) One of bigger challenges is that we do see more and more C++ code built with -Os which relies on certain functions to be inlined and optimized in context, so we had to get more optimistic in a hope that inlined code will optimize well. COMDAT functions are more likely inlined because statistics shows that many of them are not really shared between translations units (see -param=comdat-sharing-probability parameter). This was necessary to get reasonable code for Firefox approx 15 years ago.