public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/54551] DF resets some DEBUG_INSNs unnecessarily
Date: Wed, 12 Sep 2012 05:56:00 -0000	[thread overview]
Message-ID: <bug-54551-4-vZYYuSMWtE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54551-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54551

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-12 05:54:29 UTC ---
If there is a death point of the pseudo that dominates bbs with uses in some
debug insns, then I think best is to insert the debug temporary immediately
before the death point.  If the death point of the pseudo doesn't dominate the
bb with debug uses, or if there are multiple death point in different branches,
but if the setter of the pseudo dominates the bb with debug uses or if there is
some bb where the pseudo is live, isn't changed afterwards and that spot
dominates the debug uses, then the best spot to insert the debug temporary is
probably before the conditional jump/whatever other control changing insn at
the end of that bb.  E.g. for:
+---+      |
|set|     / \
+---+  +---++---+
  |    |set||set|
 / \   +---++---+
 | |      | |
 \ /      \ /
 (1)       |
+-----+   (2)
|death|   / \
+-----+  |   \
  |   +-----+ \
 / \  |death| +-----+
 |  | +-----+ |death|
 | / \      | +-----+
 | | |      \ /
 | \ /       |
 |  |        +------+
 | +------+  |dbguse|
 | |dbguse|  +------+
 | +------+

I think we want to insert the debug temp at (1) resp. (2).  If there is no such
spot, I think we have to give up, trying to build (if_then_else (condition)
D#1234 D#2345) would bloat the debug info too much. Still handling even the
dominating cases would be better than what we have right now.

Perhaps we could handle single setters first if DF has computed that already.
Perhaps this handling could be keyed off some new DF flag which would only be
set in the first cse pass.


  parent reply	other threads:[~2012-09-12  5:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 14:40 [Bug debug/54551] New: " jakub at gcc dot gnu.org
2012-09-11 21:21 ` [Bug debug/54551] " aoliva at gcc dot gnu.org
2012-09-12  5:56 ` jakub at gcc dot gnu.org [this message]
2012-09-12  7:40 ` jakub at gcc dot gnu.org
2012-09-23 11:36 ` aoliva at gcc dot gnu.org
2012-10-02 20:06 ` aoliva at gcc dot gnu.org
2012-10-02 20:17 ` aoliva at gcc dot gnu.org
2012-10-29 19:28 ` aoliva at gcc dot gnu.org
2012-10-30 23:48 ` aoliva at gcc dot gnu.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=bug-54551-4-vZYYuSMWtE@http.gcc.gnu.org/bugzilla/ \
    --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).