public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: gcc-patches@gcc.gnu.org
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Subject: [PATCH 0/4] bb-reorder: Add the "simple" algorithm
Date: Wed, 23 Sep 2015 22:09:00 -0000	[thread overview]
Message-ID: <cover.1443028412.git.segher@kernel.crashing.org> (raw)

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

             reply	other threads:[~2015-09-23 22:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 22:09 Segher Boessenkool [this message]
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

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=cover.1443028412.git.segher@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.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).