From: Richard Biener <richard.guenther@gmail.com>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] Perform anonymous constant propagation during inlining
Date: Tue, 05 May 2015 05:43:00 -0000 [thread overview]
Message-ID: <2D4B40F1-0670-48E8-8FE9-C686EF953F79@gmail.com> (raw)
In-Reply-To: <6508064.T36Z3tQFqI@polaris>
On May 4, 2015 11:38:42 PM GMT+02:00, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> 2015-05-01 Eric Botcazou <ebotcazou@adacore.com>
>>
>> * expr.c (expand_expr_real_1) <SSA_NAME>: Try to substitute
>constants
>> on the RHS of expressions.
>> * gimple-expr.h (is_gimple_constant): Reorder.
>
>Bummer. This breaks C++ debugging:
>
>+FAIL: gdb.cp/class2.exp: print alpha at marker return 0
>+FAIL: gdb.cp/class2.exp: print beta at marker return 0
>+FAIL: gdb.cp/class2.exp: print * aap at marker return 0
>+FAIL: gdb.cp/class2.exp: print * bbp at marker return 0
>+FAIL: gdb.cp/class2.exp: print * abp at marker return 0, s-p-o off
>+FAIL: gdb.cp/class2.exp: print * (B *) abp at marker return 0
>+FAIL: gdb.cp/class2.exp: p acp
>+FAIL: gdb.cp/class2.exp: p acp->c1
>+FAIL: gdb.cp/class2.exp: p acp->c2
>
>because C++ is apparently relying on the assignment to the anonymous
>return
>object to preserve the debug info attached to a return statement.
>
>Would you be OK with a slight variation of your earlier idea, i.e.
>calling
>fold_stmt with a specific valueizer from fold_marked_statements instead
>of the
>implicit no_follow_ssa_edges in the inliner? Something like:
>
>tree
>follow_anonymous_single_use_edges (tree val)
>{
> if (TREE_CODE (val) == SSA_NAME
> && (!SSA_NAME_VAR (val) || DECL_IGNORED_P (SSA_NAME_VAR (var)))
> && has_single_use (val))
> return val
> return NULL_TREE;
>}
Yes, that works for me as well.
Richard.
next prev parent reply other threads:[~2015-05-05 5:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 10:23 Eric Botcazou
2015-04-29 12:06 ` Richard Biener
2015-05-01 10:29 ` Eric Botcazou
2015-05-01 14:19 ` Richard Biener
2015-05-01 16:44 ` Eric Botcazou
2015-05-01 18:11 ` Eric Botcazou
2015-05-04 8:46 ` Richard Biener
2015-05-04 9:32 ` Eric Botcazou
2015-05-04 21:40 ` Eric Botcazou
2015-05-05 5:43 ` Richard Biener [this message]
2015-05-11 14:07 ` Eric Botcazou
2015-05-12 8:46 ` Richard Biener
2015-04-29 13:29 ` Jan Hubicka
2015-04-29 13:50 ` Richard Biener
2015-04-29 14:31 ` Jan Hubicka
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=2D4B40F1-0670-48E8-8FE9-C686EF953F79@gmail.com \
--to=richard.guenther@gmail.com \
--cc=ebotcazou@adacore.com \
--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).