public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/9] separate shrink-wrapping
@ 2016-06-08  1:48 Segher Boessenkool
  2016-06-08  1:48 ` [PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc Segher Boessenkool
                   ` (11 more replies)
  0 siblings, 12 replies; 60+ messages in thread
From: Segher Boessenkool @ 2016-06-08  1:48 UTC (permalink / raw)
  To: gcc-patches; +Cc: dje.gcc, Segher Boessenkool

This patch series introduces separate shrink-wrapping.

There are many things the prologue/epilogue of a function do, and most of
those things can be done independently.  For example, most of the time,
for many targets, the save of callee-saved registers can be done later
than the "main" prologue.

Doing so helps quite a bit because the prologue is expensive for functions
that do not need everything it does done for every path through the
function; often, the hot paths do not need much at all, e.g. not those
things the prologue needs to do for the function to call other functions.

The first patch creates a command-line flag, some hooks, a status flag
("is this function wrapped separately", used by later passes), and
documentation for these things.

The next six patches are to prevent later passes from mishandling the
epilogue instructions that now appear before the epilogue: mostly, you
cannot do much to instructions with a REG_CFA_RESTORE note without
confusing dwarf2cfi.  The cprop one is for prologue instructions.

Then, the main patch.  And finally a patch for PowerPC that implements
separate wrapping for GPRs and LR.

Tested on powerpc64-linux (-m32/-m64, -mlra/-mno-lra), and on
powerpc64le-linux.  Previous versions of this series also tested on
x86_64-linux.

Is this okay for trunk?


Segher


Segher Boessenkool (9):
  separate shrink-wrap: New command-line flag, status flag, hooks, and doc
  cfgcleanup: Don't confuse CFI when -fshrink-wrap-separate
  dce: Don't dead-code delete separately wrapped restores
  regrename: Don't rename restores
  regrename: Don't run if function was separately shrink-wrapped
  sel-sched: Don't mess with register restores
  cprop: Leave RTX_FRAME_RELATED_P instructions alone
  shrink-wrap: shrink-wrapping for separate concerns
  rs6000: Separate shrink-wrapping

 gcc/cfgcleanup.c           |   5 +
 gcc/common.opt             |   4 +
 gcc/config/rs6000/rs6000.c | 257 ++++++++++++++++--
 gcc/dce.c                  |   9 +
 gcc/doc/invoke.texi        |  11 +-
 gcc/doc/tm.texi            |  53 ++++
 gcc/doc/tm.texi.in         |  29 ++
 gcc/emit-rtl.h             |   4 +
 gcc/function.c             |  15 +-
 gcc/regcprop.c             |   3 +
 gcc/regrename.c            |  12 +-
 gcc/sel-sched-ir.c         |   1 +
 gcc/shrink-wrap.c          | 647 +++++++++++++++++++++++++++++++++++++++++++++
 gcc/shrink-wrap.h          |   1 +
 gcc/target.def             |  56 ++++
 15 files changed, 1088 insertions(+), 19 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2016-09-19 16:56 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08  1:48 [PATCH 0/9] separate shrink-wrapping Segher Boessenkool
2016-06-08  1:48 ` [PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc Segher Boessenkool
2016-06-08  1:48 ` [PATCH 2/9] cfgcleanup: Don't confuse CFI when -fshrink-wrap-separate Segher Boessenkool
2016-06-08  1:48 ` [PATCH 3/9] dce: Don't dead-code delete separately wrapped restores Segher Boessenkool
2016-06-08  1:53 ` [PATCH 6/9] sel-sched: Don't mess with register restores Segher Boessenkool
2016-06-08  1:53 ` [PATCH 4/9] regrename: Don't rename restores Segher Boessenkool
2016-06-08  1:54 ` [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped Segher Boessenkool
2016-06-08  9:18   ` Bernd Schmidt
2016-09-09 18:41     ` Jeff Law
2016-09-09 20:56       ` Segher Boessenkool
2016-09-09 23:12         ` Jeff Law
2016-09-10  6:59           ` Segher Boessenkool
2016-09-12 16:36             ` Jeff Law
     [not found]               ` <CAGWvny=fHHZtKF4_D2098+3PTPPzxtg3EjKDWHyJwUxz8g_tEA@mail.gmail.com>
     [not found]                 ` <CAGWvnymZVg_FR_PHqhwkgrAkHDntVMEiG4shfst_GA9OnZKvWg@mail.gmail.com>
     [not found]                   ` <CAGWvnykQ3oz0UpcF6U1WYivbJww65h2EH5n3FocQ8JGY9hrOrA@mail.gmail.com>
2016-09-12 17:04                     ` Jeff Law
2016-09-14 13:08               ` Segher Boessenkool
2016-09-14 13:18                 ` Bernd Schmidt
2016-09-14 14:01                   ` Segher Boessenkool
2016-09-14 14:54                     ` Bernd Schmidt
2016-09-14 16:33                       ` Segher Boessenkool
2016-09-14 19:10                       ` Jeff Law
2016-09-14 17:55                     ` Jeff Law
2016-09-14 19:13                       ` Segher Boessenkool
2016-09-14 19:36                         ` Jeff Law
2016-09-14 18:21                 ` Jeff Law
2016-09-14 19:13                   ` Segher Boessenkool
2016-09-14 19:38                     ` Jeff Law
2016-09-14 22:34                       ` Segher Boessenkool
2016-09-15 17:28                         ` Jeff Law
2016-09-19 17:11                       ` Segher Boessenkool
2016-09-14 20:04                     ` Jeff Law
2016-09-14 22:51                       ` Segher Boessenkool
2016-06-08  1:54 ` [PATCH 7/9] cprop: Leave RTX_FRAME_RELATED_P instructions alone Segher Boessenkool
2016-06-08  2:03 ` [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns Segher Boessenkool
2016-07-15 12:42   ` Bernd Schmidt
2016-07-18 16:34     ` Segher Boessenkool
2016-07-18 17:03       ` Bernd Schmidt
2016-07-19 14:46         ` Segher Boessenkool
2016-07-19 14:49           ` Bernd Schmidt
2016-07-19 15:35             ` Segher Boessenkool
2016-07-20 11:23               ` Bernd Schmidt
2016-07-20 15:06                 ` Segher Boessenkool
2016-06-08  2:04 ` [PATCH 9/9] rs6000: Separate shrink-wrapping Segher Boessenkool
2016-06-08 11:56 ` [PATCH 0/9] separate shrink-wrapping Bernd Schmidt
2016-06-08 12:45   ` Eric Botcazou
2016-06-08 15:16   ` Segher Boessenkool
2016-06-08 16:43     ` Bernd Schmidt
2016-06-08 17:26       ` Segher Boessenkool
2016-06-29 23:06         ` Bernd Schmidt
2016-06-29 23:24           ` Segher Boessenkool
2016-07-04  8:57             ` Segher Boessenkool
2016-06-14 21:24       ` Segher Boessenkool
2016-07-08 10:42         ` Bernd Schmidt
2016-07-08 12:11           ` Segher Boessenkool
2016-07-08 13:16             ` David Malcolm
2016-07-08 13:45               ` Segher Boessenkool
2016-07-08 14:35                 ` Bill Schmidt
2016-06-09 16:12 ` Jeff Law
2016-06-09 19:57   ` Segher Boessenkool
2016-06-28  0:22 ` PING " Segher Boessenkool
2016-07-07 10:16   ` PING x2 " Segher Boessenkool

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