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/54971] SRA pessimizes debug info by not creating debug stmts for fields without replacements
Date: Thu, 18 Oct 2012 13:35:00 -0000 [thread overview]
Message-ID: <bug-54971-4-3UekQfBUlZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54971-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54971
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-18 13:35:05 UTC ---
>From quick skimming of tree-sra.c, I'd say we could add another bool flag like
grp_to_be_replaced (say grp_to_be_debug_replaced), and in the else block of
if (allow_replacements && scalar && !root->first_child
&& (root->grp_hint
|| ((root->grp_scalar_read || root->grp_assignment_read)
&& (root->grp_scalar_write || root->grp_assignment_write))))
do something like
if (MAY_HAVE_DEBUG_STMTS && allow_replacements
&& scalar && !root->first_child
&& (root->grp_scalar_write || root->grp_assignment_write))
root->grp_to_be_debug_replaced = 1;
(in addition to what the else block already does) and then in the actual
modification of stmts for grp_to_be_debug_replaced prepend a debug stmt before
the statement (or in the middle of statements).
For the two stmts that modify such grp_to_be_debug_replaced = 1; access,
a[0] = 1;
and
MEM[(char * {ref-all})&a] = MEM[(char * {ref-all})&D.1719];
we would have:
DEBUG a$0 => 1 // Newly added stmt
a[0] = 1;
and
SR.2_14 = 4;
# DEBUG SR.2 => SR.2_14
SR.3_13 = 5;
# DEBUG SR.3 => SR.3_13
SR.4_12 = 6;
# DEBUG SR.4 => SR.4_12
# DEBUG a$0 => SR.2_14 // Newly added stmt
a$1_9 = SR.3_13;
# DEBUG a$1 => a$1_9
a$2_4 = SR.4_12;
# DEBUG a$2 => a$2_4
Martin, is that possible, does it make sense and where are all the places in
the sra_modify_* etc. code that would need to be tweaked?
next prev parent reply other threads:[~2012-10-18 13:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 9:48 [Bug debug/54971] New: " jakub at gcc dot gnu.org
2012-10-18 13:35 ` jakub at gcc dot gnu.org [this message]
2012-10-18 17:37 ` [Bug debug/54971] " jamborm at gcc dot gnu.org
2012-10-19 16:01 ` jamborm at gcc dot gnu.org
2012-10-22 14:56 ` jamborm at gcc dot gnu.org
2012-10-22 15:09 ` jakub at gcc dot gnu.org
2012-10-22 15:14 ` jamborm at gcc dot gnu.org
2012-10-22 16:19 ` jakub at gcc dot gnu.org
2012-10-22 20:00 ` jakub at gcc dot gnu.org
2012-10-26 9:33 ` jamborm at gcc dot gnu.org
2012-10-26 16:13 ` jamborm at gcc dot gnu.org
2012-10-26 19:20 ` jakub at gcc dot gnu.org
2012-10-27 17:30 ` jakub at gcc dot gnu.org
2012-10-29 8:36 ` jakub at gcc dot gnu.org
2012-10-29 15:20 ` rguenth at gcc dot gnu.org
2012-10-29 15:26 ` jakub at gcc dot gnu.org
2012-11-05 14:37 ` jakub at gcc dot gnu.org
2013-01-04 14:41 ` jamborm 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-54971-4-3UekQfBUlZ@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).