From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA0553858C31; Wed, 27 Mar 2024 17:01:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA0553858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711558871; bh=LQNymjFBU1hgpIQDO+C+KPl/XlFvxRfF+VOeRAWmpoE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=klZfhnswCS5hUBkIVK9aNitZ+nK538XZ/OW0VmSIvZ3AwfgBSOusa5AtP3uMUi0+0 HjW/Y+AnseuDD7vtAsV0waYxEs6mZPMX5ciNmgIFbjcfo/TZNaUkeucAsuBcCxxt8X GvcOeQvH6jCwERayjawQu5WAyqH8qNHDHWGUrzVQ= From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/114452] Functions invoked through compile-time table of function pointers not inlined Date: Wed, 27 Mar 2024 17:01:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: REOPENED 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_status resolution cf_reconfirmed_on everconfirmed 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=3D114452 Martin Jambor changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE |--- Last reconfirmed| |2024-03-27 Ever confirmed|0 |1 --- Comment #4 from Martin Jambor --- This does not look like a duplicate of PR 111573. Nevertheless, it is not quite obvious what to do here. Inlining happens before unrolling and I am not sure we'd consider unrolling in early optimizations. And without unrolling, the load from the array is not easy to fold. In this testcase all (well, both) functions referenced from the array are semantically equivalent which is recognized by ICF but making it be able to pass this information to the inliner would be non-trivial... and is this the common case worth optimizing for?=