From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116395 invoked by alias); 22 Apr 2015 12:13:15 -0000 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 Received: (qmail 116386 invoked by uid 89); 22 Apr 2015 12:13:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f179.google.com Received: from mail-ob0-f179.google.com (HELO mail-ob0-f179.google.com) (209.85.214.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 22 Apr 2015 12:13:13 +0000 Received: by obbeb7 with SMTP id eb7so168053966obb.3 for ; Wed, 22 Apr 2015 05:13:12 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.56.196 with SMTP id c4mr23632270obq.26.1429704792031; Wed, 22 Apr 2015 05:13:12 -0700 (PDT) Received: by 10.76.54.14 with HTTP; Wed, 22 Apr 2015 05:13:11 -0700 (PDT) In-Reply-To: <20150413100117.GA61490@kam.mff.cuni.cz> References: <20150413100117.GA61490@kam.mff.cuni.cz> Date: Wed, 22 Apr 2015 12:13:00 -0000 Message-ID: Subject: Re: Add DSE to early passes From: "H.J. Lu" To: Jan Hubicka Cc: Richard Guenther , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01290.txt.bz2 On Mon, Apr 13, 2015 at 3:01 AM, Jan Hubicka wrote: > Hi, > this patch adds DSE to early optimizations and handles testuiste fallout. > As discussed in PR 65076 this reduces number of CLOBBER statements in tramp3d > to 50% (and those accounts 29% of all code previously). The pass also quite > often kills real stores reducing Firefox binary by over 2% due to > better inline decisions. > > Bootstrapped/regtested ppc64-linux, OK? > > Honza > > * passes.def (early_optimizations): Add pass_dse. > > * g++.dg/tree-ssa/pr61034.C: Update template. > * g++.dg/warn/Warray-bounds.C: Harden for DSE. > * gcc.dg/Warray-bounds-11.c: Likewise. > * gcc.dg/Warray-bounds.c: Likewise. > Index: passes.def > =================================================================== > --- passes.def (revision 222016) > +++ passes.def (working copy) > @@ -89,6 +89,7 @@ along with GCC; see the file COPYING3. > NEXT_PASS (pass_build_ealias); > NEXT_PASS (pass_fre); > NEXT_PASS (pass_merge_phi); > + NEXT_PASS (pass_dse); > NEXT_PASS (pass_cd_dce); > NEXT_PASS (pass_early_ipa_sra); > NEXT_PASS (pass_tail_recursion); > Index: testsuite/g++.dg/tree-ssa/pr61034.C > =================================================================== > --- testsuite/g++.dg/tree-ssa/pr61034.C (revision 222016) > +++ testsuite/g++.dg/tree-ssa/pr61034.C (working copy) > @@ -42,6 +42,6 @@ bool f(I a, I b, I c, I d) { > // This works only if everything is inlined into 'f'. > > // { dg-final { scan-tree-dump-times ";; Function" 1 "fre2" } } > -// { dg-final { scan-tree-dump-times "free" 19 "fre2" } } > +// { dg-final { scan-tree-dump-times "free" 18 "fre2" } } > // { dg-final { scan-tree-dump-times "unreachable" 11 "fre2" } } > // { dg-final { cleanup-tree-dump "fre2" } } I got FAIL: g++.dg/tree-ssa/pr61034.C -std=gnu++11 scan-tree-dump-times fre2 "free" 18 FAIL: g++.dg/tree-ssa/pr61034.C -std=gnu++14 scan-tree-dump-times fre2 "free" 18 FAIL: g++.dg/tree-ssa/pr61034.C -std=gnu++98 scan-tree-dump-times fre2 "free" 18 on Linux/x86. -- H.J.