From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120613 invoked by alias); 18 Mar 2015 10:05:38 -0000 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 Received: (qmail 120549 invoked by uid 48); 18 Mar 2015 10:05:34 -0000 From: "aoliva at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64164] [4.9/5 Regression] one more stack slot used due to one less inlining level Date: Wed, 18 Mar 2015 10:05:00 -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: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: aoliva at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: aoliva at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01780.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64164 --- Comment #18 from Alexandre Oliva --- (In reply to Jeffrey A. Law from comment #14) > So, forgive me, but is -DOPT supposed to be the good or the bad code? It's the good one. As noted in comment 12, I had that backwards in comment 6. (In reply to Richard Biener from comment #15) > Because "coalescing" them doesn't do anything. copyrename coalescing > assigns the same underlying DECL to SSA names, thus makes SSA_NAME_VAR > the same. But when both SSA_NAME_VARs are NULL this won't do anything. This may be true when you look at only one pair of SSA names, but when you have 2 such candidate pairs involving one common SSA name, it can, and it does make a difference, as described in comment 6. (In reply to Richard Biener from comment #16) > And as I analyzed in comment #3 we chose the now different coalescing because > it is more profitable (to the cost analysis we perform in out-of-SSA > coalescing). No, we don't even *consider* the coalescing performed in the -DOPT case, because, as noted in comment 13, the SSA names ended up with different base names, because copyrename wouldn't give them the same base name. (In reply to Richard Biener from comment #17) > To add to all this - IMHO copyrename should go That's fine with me. > Yes, out-of-SSA coalescing could be changed to allow coalescing of SSA names > with a user-DECL and anonymous SSA names (or SSA names with a DECL_IGNORED_P > decl). But that will make the conflict graph much larger(?). Ok, I'll give that a shot tomorrow (I'll be away for the whole day today). > might happen that we end up coalescing things in a way > that there ends up being no DECL for a register and thus we lose in debug > quality (not sure if we could compensate by inserting debug stmts on the > edges to compensate for that - we couldn't do that if it requires splitting > the edge). I'm not concerned about that. Any debug stmts needed to make this work will already be in place, after the actual assignments, and after early PHI nodes. Sure, edge insertions might separate the copies from the debug stmts inserted after the PHI nodes, but ultimately the bindings should take care of it. > So to avoid wrong debug we'd have to always coalesce to an anonymous > entity With debug stmts, we don't care what the base names are any more. All the info we need (for tracked auto variables) is in the debug stmts.