public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	 gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 0/3] Simplify the simple_return handling
Date: Tue, 03 May 2016 15:03:00 -0000	[thread overview]
Message-ID: <5728BDBC.60500@foss.arm.com> (raw)
In-Reply-To: <cover.1462256244.git.segher@kernel.crashing.org>

Hi Segher,

On 03/05/16 07:59, Segher Boessenkool wrote:
> This series teaches cfgcleanup how to optimize jumps and branches to and
> around return statements, after which the shrink-wrap code doesn't have
> to deal with it anymore.  The simplified code also catches a few more
> cases.
>
> Tested on powerpc64-linux (-m32 and -m64, all languages), and also on
> x86_64-linux (actually, still in progress with the most recent version
> of the patchset).  Is this okay for trunk?
>

I tried make check on gcc on aarch64 and I didn't see any fallout.
I also had a quick look on SPECINT and there seems to be a consistent
small reduction in code size on them, mostly from redundant returns
being eliminated, for example:

     bgt    .L70
     ret
.L62:
     ret
.L76:

into:

     bgt    .L70
.L62:
     ret

So I think this should be a win overall.

Thanks,
Kyrill

> Segher
>
>
>    cfgcleanup: Bugfix
>    cfgcleanup: Fold jumps and conditional branches with returns
>    shrink-wrap: Remove complicated simple_return manipulations
>
>   gcc/cfgcleanup.c  | 124 +++++++++++++++++++++++++++++++
>   gcc/function.c    | 213 +-----------------------------------------------------
>   gcc/shrink-wrap.c | 171 ++++---------------------------------------
>   gcc/shrink-wrap.h |   6 --
>   4 files changed, 140 insertions(+), 374 deletions(-)
>

      parent reply	other threads:[~2016-05-03 15:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03  7:02 Segher Boessenkool
2016-05-03  7:03 ` [PATCH 2/3] cfgcleanup: Fold jumps and conditional branches with returns Segher Boessenkool
2016-05-10 19:34   ` Christophe Lyon
2016-05-10 23:26     ` Segher Boessenkool
2016-05-11  8:17       ` Christophe Lyon
2016-05-03  7:03 ` [PATCH 3/3] shrink-wrap: Remove complicated simple_return manipulations Segher Boessenkool
2016-05-09 13:54   ` Christophe Lyon
2016-05-09 15:08     ` Segher Boessenkool
2016-05-11 11:52       ` Jiong Wang
2016-06-14 14:54         ` [Patch, cfg] Improve jump to return optimization for complex return Jiong Wang
2016-06-14 20:30           ` Segher Boessenkool
2016-06-15 17:01             ` Jiong Wang
2016-05-03  7:03 ` [PATCH 1/3] cfgcleanup: Bugfix in try_simplify_condjump Segher Boessenkool
2016-05-03 20:29   ` Steven Bosscher
2016-05-03 21:09     ` Segher Boessenkool
2016-05-03 12:53 ` [PATCH 0/3] Simplify the simple_return handling Bernd Schmidt
2016-05-03 13:31   ` Segher Boessenkool
2016-05-03 13:46     ` Bernd Schmidt
2016-05-04  0:10   ` Segher Boessenkool
2016-05-04 12:37     ` Bernd Schmidt
2016-05-03 15:03 ` Kyrill Tkachov [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=5728BDBC.60500@foss.arm.com \
    --to=kyrylo.tkachov@foss.arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.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).