public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/61034] Optimizing takes too many passes
Date: Thu, 08 May 2014 10:00:00 -0000	[thread overview]
Message-ID: <bug-61034-4-cEo9HoVxyt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61034-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 7 May 2014, glisse at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61034
> 
> --- Comment #11 from Marc Glisse <glisse at gcc dot gnu.org> ---
> The committed patch doesn't seem to optimize as well as the hack. fre2 (- is
> the hack and + is the new trunk, unless I confused my directories):
> 
> -  _8 = _98;
> +  _8 = MEM[(const struct I &)b_9(D)].o;
> 
> -  _224 = _201;
> +  _224 = _18->count;
> 
> etc
> 
> I assume that's because call_may_clobber_ref_p_1 sometimes says that free
> clobbers its argument while the hack was assuming it never does. "free" is
> strange, somehow here we would want call_may_clobber_ref_p_1 to return false
> (we can't be reading after a free, so we must have taken another path, this
> free didn't run and didn't clobber anything) even when stmt_kills_ref_p_1 would
> return true, but that would confuse other parts of gcc.

Yeah, I know.  call_may_clobber_ref_p_1 has to guard against sinking
a load across it as well.

I'm working on improving value-numbering in other ways at the moment,
we can come back and special-case free and va_end builtins later
in SCCVN.


      parent reply	other threads:[~2014-05-08 10:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 10:52 [Bug tree-optimization/61034] New: " glisse at gcc dot gnu.org
2014-05-05 10:25 ` [Bug tree-optimization/61034] " rguenth at gcc dot gnu.org
2014-05-05 10:33 ` rguenth at gcc dot gnu.org
2014-05-05 10:48 ` rguenth at gcc dot gnu.org
2014-05-05 11:56 ` glisse at gcc dot gnu.org
2014-05-05 12:19 ` rguenther at suse dot de
2014-05-05 13:41 ` glisse at gcc dot gnu.org
2014-05-07 11:08 ` rguenth at gcc dot gnu.org
2014-05-07 11:50 ` rguenth at gcc dot gnu.org
2014-05-07 14:19 ` rguenth at gcc dot gnu.org
2014-05-07 15:14 ` glisse at gcc dot gnu.org
2014-05-08 10:00 ` rguenther at suse dot de [this message]

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-61034-4-cEo9HoVxyt@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).