From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29026 invoked by alias); 4 Sep 2008 16:10:56 -0000 Received: (qmail 27067 invoked by uid 48); 4 Sep 2008 16:09:36 -0000 Date: Thu, 04 Sep 2008 16:10:00 -0000 Message-ID: <20080904160936.27066.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/37102] [4.3/4.4 Regression] out-of-SSA is broken In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amacleod at redhat dot com" 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: 2008-09/txt/msg00545.txt.bz2 ------- Comment #8 from amacleod at redhat dot com 2008-09-04 16:09 ------- out of ssa generally expects that there is no dead code. I think the original logic was that you never want to generate code for dead statements, so DCE would be run just before out of ssa. It assumes any conflicts caused by any copies which will be inserted are already covered in the conflict graph. In this particular case, if the PHI results was live for even a statement or two, it would conflict with the use of a_lsm.27_5 in the next statement, and then the coalesce would happen with a_lsm.27_1 instead. We'd still get the dead copy, but the code would work fine. That's a reasonable example of why we don't want to feed dead code into outofssa. Figuring out which PHI parameter is TRULY available would be a tricky proposition to catch this case. And its a waste. So we either run dead code just before out of ssa, or take PHI's with no uses and discard them at the same time we discard virtual PHIs (this would be trivial). I wonder if we might eventually find a similar circumstance with a dead PHI cycle that would not be easy to detect without the same logic as a DCE tho. I'd say a DCE pass is generally a better approach, and should be documented as a requirement, or even wired in. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37102