From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16050 invoked by alias); 30 Sep 2011 14:31:48 -0000 Received: (qmail 16013 invoked by uid 22791); 30 Sep 2011 14:31:46 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Sep 2011 14:31:33 +0000 From: "wschmidt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/50557] [4.7 Regression] Register pressure increase after reassociation (x86, 32 bits) Date: Fri, 30 Sep 2011 14:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wschmidt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg02401.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50557 --- Comment #5 from William J. Schmidt 2011-09-30 14:30:56 UTC --- Reassociation isn't doing anything untoward here that raises register pressure. The problem must be occurring downstream. Likely the scheduler is making a different decision that leads to more pressure. Block 9 contains the following prior to reassociation: D.3497_48 = D.3496_47 + D.3475_117; t_50 = D.3497_48 + D.3493_44; Reassociation changes this to: D.3497_48 = D.3493_44 + D.3496_47; t_50 = D.3497_48 + D.3475_117; This extends the lifetime of D.3475_117 but shortens the lifetime of D.3493_44, both of which go dead here. Register pressure is not raised at any point. There are no further changes to this code in the rest of the tree-SSA phases. Based on this, I don't see any reason to adjust the reassociation algorithm. Someone with some expertise in RTL phases could look into what happens later on to cause the additional pressure, but I don't see this as a tree-optimization issue.