From: Martin Jambor <mjambor@suse.cz>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] No SRA debug replacements for variables that cannot be removed
Date: Tue, 15 Jan 2013 15:52:00 -0000 [thread overview]
Message-ID: <20130115155216.GA22390@virgil.suse> (raw)
Hi,
as discussed in PR 55920, this patch prevents SRA from creating debug
replacements and debug statements for aggregate variables which cannot
be scalarized away. Jakub bootstrapped and tested the patch and I
suppose he is OK with it too so I will commit is shortly.
Thanks,
Martin
2013-01-11 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/55920
* tree-sra.c (analyze_access_subtree): Do not mark non-removable
accesses as grp_to_be_debug_replaced.
Index: src/gcc/tree-sra.c
===================================================================
--- src.orig/gcc/tree-sra.c
+++ src/gcc/tree-sra.c
@@ -2199,7 +2199,9 @@ analyze_access_subtree (struct access *r
{
if (allow_replacements
&& scalar && !root->first_child
- && (root->grp_scalar_write || root->grp_assignment_write))
+ && (root->grp_scalar_write || root->grp_assignment_write)
+ && !bitmap_bit_p (cannot_scalarize_away_bitmap,
+ DECL_UID (root->base)))
{
gcc_checking_assert (!root->grp_scalar_read
&& !root->grp_assignment_read);
next reply other threads:[~2013-01-15 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 15:52 Martin Jambor [this message]
2013-01-15 16:05 ` Jakub Jelinek
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=20130115155216.GA22390@virgil.suse \
--to=mjambor@suse.cz \
--cc=gcc-patches@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).