From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11A7E3858407; Thu, 4 Aug 2022 09:53:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11A7E3858407 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/106518] Exchange/swap aware register allocation (generate xchg in reload) Date: Thu, 04 Aug 2022 09:53:37 +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: unknown X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: enhancement X-Bugzilla-Who: hubicka 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: cc 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: Thu, 04 Aug 2022 09:53:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106518 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #2 from Jan Hubicka --- We have xchg patterns in i386.md and corresponding peephole. I used to play with this long time ago and it was not giving any of performance benefits becuase xchg at that time was not well optimized in CPUs. With regstack the main problem is that RTL after reg-stack is inconsistent since we have no way to explicitly express push/pop operations that renumber the registers. Some years ago I made patch for that https://gcc.gnu.org/pipermail/gcc-patches/1999-November/021921.html Even if you make representation correct register allocation for stack based= CPU is quite different from normal registr allocation. These days I would more like to see x87 to silently die.=