public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/4] bb-reorder: Add the "simple" algorithm
@ 2015-09-23 22:09 Segher Boessenkool
  2015-09-23 22:09 ` [PATCH 1/4] bb-reorder: Split out STC Segher Boessenkool
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Segher Boessenkool @ 2015-09-23 22:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

The current basic block reordering always uses the "software trace cache"
algorithm.  That has a few problems:

1) It increases code size substantially; this makes it not suitable for
-O1 or -Os, and not at all for some architectures;
2) but it is enabled for -Os and all targets;
3) and -O1 gets nothing, resulting in pretty jumpy code.

This patch set adds a new simple greedy basic block reordering algorithm,
adds a flag -freorder-blocks-algorithm=, and sets things up so that -O1
and -Os use the simple algo.

Split into a few pieces for easier review.  Every intermediate step works.

Bootstrapped and tested on powerpc64-linux.  There are two new fails in
guality testresults for -Os.

Is this okay for mainline?


Segher


Segher Boessenkool (4):
  bb-reorder: Split out STC
  bb-reorder: Add the "simple" algorithm
  bb-reorder: Add -freorder-blocks-algorithm= and wire it up
  bb-reorder: Documentation updates

 gcc/bb-reorder.c    | 196 +++++++++++++++++++++++++++++++++++++++++++++++++---
 gcc/common.opt      |  13 ++++
 gcc/doc/invoke.texi |  23 ++++--
 gcc/flag-types.h    |   7 ++
 gcc/opts.c          |   4 +-
 5 files changed, 227 insertions(+), 16 deletions(-)

-- 
1.8.1.4

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

end of thread, other threads:[~2015-11-02 21:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 22:09 [PATCH 0/4] bb-reorder: Add the "simple" algorithm Segher Boessenkool
2015-09-23 22:09 ` [PATCH 1/4] bb-reorder: Split out STC Segher Boessenkool
2015-09-24 16:12   ` Steven Bosscher
2015-09-23 22:10 ` [PATCH 2/4] bb-reorder: Add the "simple" algorithm Segher Boessenkool
2015-09-24 11:13   ` Bernd Schmidt
2015-09-24 13:48     ` Segher Boessenkool
2015-09-24 15:19       ` Segher Boessenkool
2015-09-24 16:35   ` Steven Bosscher
2015-09-24 17:22     ` Segher Boessenkool
2015-09-25 14:31   ` [PATCH 2/4 v2] " Segher Boessenkool
2015-09-25 16:09     ` Peter Bergner
2015-09-25 16:15       ` Segher Boessenkool
2015-09-29 13:19     ` Bernd Schmidt
2015-09-23 23:01 ` [PATCH 3/4] bb-reorder: Add -freorder-blocks-algorithm= and wire it up Segher Boessenkool
2015-09-24 11:00   ` Bernd Schmidt
2015-09-24 14:06     ` Segher Boessenkool
2015-09-24 15:21   ` Andi Kleen
2015-09-24 15:49     ` Segher Boessenkool
2015-09-24 17:16       ` Segher Boessenkool
     [not found]   ` <56377569.7010904@arm.com>
2015-11-02 15:14     ` Alan Lawrence
2015-11-02 21:04     ` Segher Boessenkool
2015-09-23 23:36 ` [PATCH 4/4] bb-reorder: Documentation updates Segher Boessenkool
2015-09-24 10:33 ` [PATCH 0/4] bb-reorder: Add the "simple" algorithm Bernd Schmidt
2015-09-24 13:32   ` 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).