This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 0/3] Simplify the simple_return handling
- From: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 03 May 2016 16:03:24 +0100
- Subject: Re: [PATCH 0/3] Simplify the simple_return handling
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1462256244 dot git dot segher at kernel dot crashing dot 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(-)