public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/53791] Branches not re-ordered using profile-information
Date: Thu, 28 Jun 2012 12:05:00 -0000	[thread overview]
Message-ID: <bug-53791-4-u1AoAq7F4m@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53791-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53791

--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-06-28 12:05:38 UTC ---
(In reply to comment #1)
> The other trivially obvious possibility is to pattern-match this open-coded
> switch/case and transform it back to switch/case early.

The test case is a simplified example. More complex predicates may not be
transformed to a switch. Also, the point is that this kind of code results from
lowering of switches to the series of if-branches.

(What my emit_case_bit_tests patch does, actually, is to output the branch with
the highest count first. But that means I have to lower after reading in the
profile.)

I'm looking at "Efficient and effective branch reordering using profile data"
(2002) to see if this is something that could be implemented for GCC...


      parent reply	other threads:[~2012-06-28 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 23:25 [Bug tree-optimization/53791] New: " steven at gcc dot gnu.org
2012-06-28  9:52 ` [Bug tree-optimization/53791] " rguenth at gcc dot gnu.org
2012-06-28 12:05 ` steven at gcc dot gnu.org [this message]

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=bug-53791-4-u1AoAq7F4m@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).