public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Richard Guenther <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix one part of PR42108
Date: Sat, 04 Jun 2011 16:38:00 -0000	[thread overview]
Message-ID: <BANLkTimtX-S1x=UmW8yuqBJU2GcXj0YL6A@mail.gmail.com> (raw)
In-Reply-To: <6dc9ffc80912191050n227a42fbm74b5af9ce1be93c1@mail.gmail.com>

On Sat, Dec 19, 2009 at 10:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Dec 18, 2009 at 3:29 PM, Richard Guenther <rguenther@suse.de> wrote:
>>
>> This fixes one part of PR42108, the missed discovery of a full
>> redundant load.  The issue is that the SSA SCC value-numberer
>> does not visit loads and stores in a defined order.  The (or rather
>> one) fix is to properly canonicalize the virtual operand SSA names
>> we record in the expression hash tables.  The proper canonical
>> virtual operand is the def of the first dominating may-definition
>> (or a PHI node vdef, but we can as well choose a non-may-definition
>> without loss of precision and generality).
>>
>> The patch possibly slows down SCCVN a bit for examples like
>>
>>   # .MEM_2 = VDEF <.MEM_1(D)>
>>   may-def
>>  ....
>>   # VUSE <.MEM_120>
>>   ... = X;
>>   # VUSE <.MEM_120>
>>   ... = X;
>>
>> where discovering the redundant load of X needs to canonicalize
>> their VUSE SSA name twice (previously we entered the expression
>> into the hashtable with .MEM_120 so it would be found immediately).
>> Now if we had
>>
>>   # VUSE <.MEM_60>
>>   ... = X;
>>
>> inbetween the may-def and the other loads we previously discovered
>> the full redundancy only if we first visited the load with .MEM_60
>> and only after that the loads with .MEM_120.  But nothing guarantees
>> this - this is the case the patch fixes.  There are about 0.5%
>> more redundant loads discovered in tramp3d with this patch.
>>
>> This is a regression of the alias-improvements branch merge as
>> previously we had different virtual operands and thus in more
>> cases the canonical vuses were automagically chosen.
>>
>> Bootstrapped and tested on x86_64-unknown-linux-gnu.  I have patched
>> one of our SPEC / C++ testers for more testing coverage.
>>
>
> This may have caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42435
>

This also caused:

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


-- 
H.J.

      reply	other threads:[~2011-06-04 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-19  0:13 Richard Guenther
2009-12-20  2:21 ` H.J. Lu
2011-06-04 16:38   ` H.J. Lu [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='BANLkTimtX-S1x=UmW8yuqBJU2GcXj0YL6A@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).