From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 66B5B385841C; Tue, 7 Feb 2023 14:05:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66B5B385841C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675778708; bh=Dw+qJ6auzEMbJu9L0dAg/47feHylswycSOcQEJOcxRQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Txrl3xHVCeVjXlHpfMp35ldWXglRxNyOqwhRALs4jSKAaoEu0Nj+CjyPTTstxoSR1 AA2nVXDkqaatqwJIk1Zb2mA7jGD+g55Mv55RpQC8emoS2lrGQKoSUjYYJy54QZ9iMr P2l4G46/RRFSEzam34WOjLpn749dn4O4GcFvghU8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/103541] unnecessary spills around const functions calls Date: Tue, 07 Feb 2023 14:05:06 +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: 12.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: 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=3D103541 --- Comment #5 from CVS Commits --- The master branch has been updated by Vladimir Makarov : https://gcc.gnu.org/g:f661c0bb6371f355966a67b5ce71398e80792948 commit r13-5730-gf661c0bb6371f355966a67b5ce71398e80792948 Author: Vladimir N. Makarov Date: Tue Feb 7 08:27:36 2023 -0500 RA: Implement reuse of equivalent memory for caller saves optimization The test case shows opportunity to reuse memory with constant address f= or caller saves optimization for constant or pure function call. The patch implements the memory reuse. PR rtl-optimization/103541 gcc/ChangeLog: * ira.h (struct ira_reg_equiv_s): Add new field caller_save_p. * ira.cc (validate_equiv_mem): Check memref address variance. (update_equiv_regs): Define caller save equivalence for valid_combine. (setup_reg_equiv): Clear defined_p flag for caller save equivalence. * lra-constraints.cc (lra_copy_reg_equiv): Add new arg call_save_p. Use caller save equivalence depending on the arg. (split_reg): Adjust the call. gcc/testsuite/ChangeLog: * gcc.target/i386/pr103541.c: New.=