From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 651373858C31; Wed, 28 Jun 2023 10:01:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 651373858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687946464; bh=+2MJF+6lMRXW52Ej+opbYIdGUHZvDA9Xnv3iNtmxb7s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MYYu2CDrQr6ZSJvN/beoGwqLVvrUvB1IC0yyHx+4mP+7Pg5NjleT3d2k20JFVNZf9 QitcwCahIYXkAyFuLMet/Ps3MI284pwL3T26chi+WwJ6qY5Ty4OcZ20GpduNo2Lzuu 3Tvyq5/T2L+dqa1g79nCiv6BxexNN2MLBS1gxN00= From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/110334] [13/14 Regresssion] unused functions not eliminated before LTO streaming Date: Wed, 28 Jun 2023 10:00:59 +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: 13.1.1 X-Bugzilla-Keywords: lto, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz 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: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110334 --- Comment #14 from Jan Hubicka --- >=20 > why disallow caller->indirect_calls? See testcase in comment #9 >=20 > > + return false; > > + for (cgraph_edge *e2 =3D callee->callees; e2; e2 =3D e2->next_ca= llee) >=20 > I don't think this flys - it looks quadratic. Can we compute this > in the inline summary once instead? I guess I can place a cache there. I think this check will become more global over time so it more fits IMO here. >=20 > As for indirect calls, can we maybe mark initial direct GIMPLE call > stmts as "always-inline" and only look at that marking, thus an > indirect call will never become "always-inline"? Iff cgraph edges > prevail during all early inlining we could mark call edges for > this purpose? I also think we need call site specific info. Tagging gimple call statements and copying the info to gimple edges will probably be needed here. We want to keep the info from early inlining to late inlining since we output errors late. We already have plenty of GF_CALL_ flags, so adding one should be easy? Honza=