This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/3] Simplify the simple_return handling


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(-)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]