From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A65CA3858D35; Tue, 28 Jul 2020 08:14:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A65CA3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595924097; bh=YM8Un9nyf4zJpUl9hs0A+gGBJglEo8iL3NvrUdgB1+A=; h=From:To:Subject:Date:From; b=AziPuKhASvc+htNwV9PL+2Qi+I+WUmR1pJ4GkGwk5zG8O7Xl3qopA8XI2lCxLPyQk PNdZu2OgeWpLUZoNwDG+8DINxGZOGRZjFh3b9vsaoWVZ/Zk5GBbxeP5B5Luyyoqwb2 hLBoSNFrlr/XVevRPabAwsSeNnbaLWcgIYwxfNiM= From: "rjiejie at me dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/96352] New: inflated text section with ipa inline Date: Tue, 28 Jul 2020 08:14:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rjiejie at me dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 08:14:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96352 Bug ID: 96352 Summary: inflated text section with ipa inline Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: rjiejie at me dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 48942 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48942&action=3Dedit inflated text section with ipa inline My case is compare size of object between two versions. >>From v8.3, the text section size is 3232, but from v8.4, the text section size is 5692. My test command line:=20 cc1 bitstream.i -march=3Drv64gc -mabi=3Dlp64 -O3 -o a.s as --traditional-format -march=3Drv64gc -mabi=3Dlp64 -o a.o a.s size a.o I found this issue from gcc version v8.4 and it is present at gcc version 10.2.1 also :( I have researched gcc sources and found the issue comes from edge_badness@ipa-inline.c at commit be917808aa3310d46f586e6586ef08d302837f1= e : diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 73da38c..8e34400 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1173,7 +1173,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) overall_growth +=3D 256 * 256 - 256; denominator *=3D overall_growth; } - denominator *=3D inlined_time; + denominator *=3D ipa_fn_summaries->get (caller)->self_size + growth; badness =3D - numerator / denominator;=