From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 276403948494; Tue, 28 Apr 2020 13:36:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 276403948494 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588080975; bh=zGa88jw280B6qolyKRvavQtfYueoDax6bccKQDoJ1ZA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xCXM4Fkbe3+/dGMezI2R0eRv+oJeDrbqkwYjC4ZIuMRE8IOQEeeij/13pPty0Mdd2 N99dRjARHccuT5tbDoPgULAuGwIEFgIl7wjqtJa17ZgU6sK9AqDerJQ1xG3SkEbO8E 0G7G9lVkyF9CL6Ja1psaEdUVezd0fjJw8t9B8dm8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/94818] GCC emits dead bodies of functions whose all calls have been eliminated by optimisations Date: Tue, 28 Apr 2020 13:36:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed cf_reconfirmed_on cc component bug_status Message-ID: In-Reply-To: References: 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 Apr 2020 13:36:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94818 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2020-04-28 CC| |marxin at gcc dot gnu.org Component|tree-optimization |ipa Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener --- Confirmed. ___builtin_constant_p is only resolved after IPA optimization a= nd at that point unreachable functions can no longer be removed reliably (foo is output before bar0 __builtin_constant_p is resolved). We could add another "IPA" sync point before RTL expansion but not sure if we really want to. We could also see there's no callers to bar0 and bar1 and resolve __builtin_constant_p earlier during IPA.=