public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Richard Guenther <rguenther@suse.de>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Add DSE to early passes
Date: Wed, 22 Apr 2015 12:13:00 -0000	[thread overview]
Message-ID: <CAMe9rOqmrsr_Wq=vAZtXC0Q_1JAVT5ofBz0=ENPSUDqFGL8fug@mail.gmail.com> (raw)
In-Reply-To: <20150413100117.GA61490@kam.mff.cuni.cz>

On Mon, Apr 13, 2015 at 3:01 AM, Jan Hubicka <hubicka@ucw.cz> 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.

  parent reply	other threads:[~2015-04-22 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 10:01 Jan Hubicka
2015-04-13 12:12 ` Richard Biener
2015-04-22 12:13 ` H.J. Lu [this message]
2015-04-22 12:17   ` Jan Hubicka
2015-04-22 12:27     ` Richard Biener

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='CAMe9rOqmrsr_Wq=vAZtXC0Q_1JAVT5ofBz0=ENPSUDqFGL8fug@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --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).