public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/37102] [4.3/4.4 Regression] out-of-SSA is broken
Date: Thu, 04 Sep 2008 16:10:00 -0000	[thread overview]
Message-ID: <20080904160936.27066.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37102-12544@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2008-09-04 16:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13  3:46 [Bug c/37102] New: possible integer codegen bug regehr at cs dot utah dot edu
2008-08-13  9:54 ` [Bug tree-optimization/37102] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-08-13  9:55 ` rguenth at gcc dot gnu dot org
2008-08-14 10:04 ` jakub at gcc dot gnu dot org
2008-08-18 13:58 ` jsm28 at gcc dot gnu dot org
2008-08-26 13:39 ` cnstar9988 at gmail dot com
2008-08-27 22:13 ` jsm28 at gcc dot gnu dot org
2008-08-28 14:49 ` rguenth at gcc dot gnu dot org
2008-09-04 14:54 ` [Bug tree-optimization/37102] [4.3/4.4 Regression] out-of-SSA is broken rguenth at gcc dot gnu dot org
2008-09-04 16:10 ` amacleod at redhat dot com [this message]
2008-09-04 16:19 ` rguenth at gcc dot gnu dot org
2008-09-04 16:53 ` amacleod at redhat dot com
2008-09-15  1:04 ` lthode at mail dot unomaha dot edu
2008-09-17 14:26 ` rguenth at gcc dot gnu dot org
2008-09-17 14:35 ` amacleod at redhat dot com
2008-09-17 14:39 ` rguenth at gcc dot gnu dot org
2008-09-17 14:40 ` amacleod at redhat dot com
2008-09-17 14:49 ` amacleod at redhat dot com
2008-09-17 21:57 ` amacleod at redhat dot com
2008-09-18 14:01 ` amacleod at gcc dot gnu dot org
2008-09-18 20:06 ` [Bug tree-optimization/37102] [4.3 " amacleod at redhat dot com
2008-09-27 11:33 ` cnstar9988 at gmail dot com
2008-10-10  0:57 ` cnstar9988 at gmail dot com
2008-10-12 19:59 ` lthode at mail dot unomaha dot edu
2008-10-17 17:38 ` amacleod at gcc dot gnu dot org
2008-10-18 11:19 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080904160936.27066.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).