From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31865 invoked by alias); 4 Jun 2011 16:38:25 -0000 Received: (qmail 31738 invoked by uid 22791); 4 Jun 2011 16:38:24 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Jun 2011 16:38:06 +0000 Received: by qyk27 with SMTP id 27so1429058qyk.20 for ; Sat, 04 Jun 2011 09:38:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.106.34 with SMTP id v34mr2360017qco.111.1307205485662; Sat, 04 Jun 2011 09:38:05 -0700 (PDT) Received: by 10.229.39.78 with HTTP; Sat, 4 Jun 2011 09:38:05 -0700 (PDT) In-Reply-To: <6dc9ffc80912191050n227a42fbm74b5af9ce1be93c1@mail.gmail.com> References: <6dc9ffc80912191050n227a42fbm74b5af9ce1be93c1@mail.gmail.com> Date: Sat, 04 Jun 2011 16:38:00 -0000 Message-ID: Subject: Re: [PATCH] Fix one part of PR42108 From: "H.J. Lu" To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00317.txt.bz2 On Sat, Dec 19, 2009 at 10:50 AM, H.J. Lu wrote: > On Fri, Dec 18, 2009 at 3:29 PM, Richard Guenther wro= te: >> >> This fixes one part of PR42108, the missed discovery of a full >> redundant load. =A0The issue is that the SSA SCC value-numberer >> does not visit loads and stores in a defined order. =A0The (or rather >> one) fix is to properly canonicalize the virtual operand SSA names >> we record in the expression hash tables. =A0The 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 >> >> =A0 # .MEM_2 =3D VDEF <.MEM_1(D)> >> =A0 may-def >> =A0.... >> =A0 # VUSE <.MEM_120> >> =A0 ... =3D X; >> =A0 # VUSE <.MEM_120> >> =A0 ... =3D 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 >> >> =A0 # VUSE <.MEM_60> >> =A0 ... =3D 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. =A0But nothing guarantees >> this - this is the case the patch fixes. =A0There 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. =A0I 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=3D42435 > This also caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D49279 --=20 H.J.