public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] Perform anonymous constant propagation during inlining
Date: Fri, 01 May 2015 16:44:00 -0000	[thread overview]
Message-ID: <3882455.jixBbSixVe@polaris> (raw)
In-Reply-To: <0ADD2F35-3576-4FDE-8473-17ADED030B92@gmail.com>

> Yeah, I think that's a way better place for the hack.

OK, how aggressive then?  We could as well do the substitution for all copies:

      /* For EXPAND_INITIALIZER try harder to get something simpler.
	 Otherwise, substitute copies on the RHS, this can propagate
	 constants at -O0 and thus simplify arithmetic operations.  */
      if (g == NULL
	  && !SSA_NAME_IS_DEFAULT_DEF (exp)
	  && (optimize || DECL_IGNORED_P (SSA_NAME_VAR (exp)))
	  && (modifier == EXPAND_INITIALIZER
	      || (modifier != EXPAND_WRITE
		  && gimple_assign_copy_p (SSA_NAME_DEF_STMT (exp))))
	  && stmt_is_replaceable_p (SSA_NAME_DEF_STMT (exp)))
	g = SSA_NAME_DEF_STMT (exp);

-- 
Eric Botcazou

  reply	other threads:[~2015-05-01 16:44 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 [this message]
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
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=3882455.jixBbSixVe@polaris \
    --to=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).