From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6AA73857027; Fri, 28 Jul 2023 08:41:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6AA73857027 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690533695; bh=DBpe2ko8w5ucCAonHw8OhUo7lnNpye32qx2OjmNYaJU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Pp7As9wsT8ey1LKDRJG6sgNthajiO/OnJksCYNvYKoZxkAGRnZ1l3tYk1IOnQlcW8 p6xH7gD2WtMY8wuOET6k2WBdHe4Ir9L4fZGSbBhkJ4rO+zbCN/ukUHrrgvaMhyb+8R ckz3fJ7IJlrKKhDOEJHE/rxMaD7ghvu3Fz/T7ut8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110587] [14 regression] 96% pr28071.c compile time regression since r14-2337-g37a231cc7594d1 Date: Fri, 28 Jul 2023 08:40:49 +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: compile-time-hog, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 14.0 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=3D110587 --- Comment #17 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:095eb138f736d94dabf9a07a6671bd351be0e66a commit r14-2851-g095eb138f736d94dabf9a07a6671bd351be0e66a Author: Roger Sayle Date: Fri Jul 28 09:39:46 2023 +0100 PR rtl-optimization/110587: Reduce useless moves in compile-time hog. This patch is one of a series of fixes for PR rtl-optimization/110587, a compile-time regression with -O0, that attempts to address the underl= ying cause. As noted previously, the pathological test case pr28071.c conta= ins a large number of useless register-to-register moves that can produce quadratic behaviour (in LRA). These moves are generated during RTL expansion in emit_group_load_1, where the middle-end attempts to simpli= fy the source before calling extract_bit_field. This is reasonable if the source is a complex expression (from before the tree-ssa optimizers), or a SUBREG, or a hard register, but it's not particularly useful to copy a pseudo register into a new pseudo register. This patch eliminates th= at redundancy. The -fdump-tree-expand for pr28071.c compiled with -O0 currently contai= ns 777K lines, with this patch it contains 717K lines, i.e. saving about 6= 0K lines (admittedly of debugging text output, but it makes the point). 2023-07-28 Roger Sayle Richard Biener gcc/ChangeLog PR middle-end/28071 PR rtl-optimization/110587 * expr.cc (emit_group_load_1): Simplify logic for calling force_reg on ORIG_SRC, to avoid making a copy if the source is already in a pseudo register.=