public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Rahul Kharche" <rahul@IceraSemi.com>
To: <gcc@gcc.gnu.org>
Cc: "sdkteam-gnu" <sdkteam-gnu@IceraSemi.com>
Subject: branch probabilities on multiway branches
Date: Tue, 13 Apr 2010 16:51:00 -0000	[thread overview]
Message-ID: <4D60B0700D1DB54A8C0C6E9BE69163700E572F41@EXCHANGEVS.IceraSemi.local> (raw)

Hi All,

The following bit of code in predict.c implies branch probabilities
are strictly evenly distributed for multiway branches at present. The
comment suggests it is possible to generate better estimates for more
generic cases, apart from being involved. Could anyone point me to
the reference and/or if an implementation exists already.


/* When there is no successor or only one choice, prediction is easy. 

   We are lazy for now and predict only basic blocks with two outgoing
   edges.  It is possible to predict generic case too, but we have to
   ignore first match heuristics and do more involved combining.
Implement
   this later.  */
if (nedges != 2)
  {
    if (!bb->count)
      set_even_probabilities (bb);
    clear_bb_predictions (bb);
    if (dump_file)
      fprintf (dump_file, "%i edges in bb %i predicted to even
probabilities\n",
	       nedges, bb->index);
    return;
  }


Many Thanks,
Rahul

             reply	other threads:[~2010-04-13 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-13 16:51 Rahul Kharche [this message]
2010-04-14  0:08 ` Jan Hubicka
2010-04-15 11:56   ` Rahul Kharche
2010-04-15 11:57     ` Steven Bosscher
2010-04-15 14:54       ` Rahul Kharche
2010-04-15 16:59       ` Rahul Kharche
2010-04-15 22:54       ` Jan Hubicka
2010-04-20 18:20       ` Rahul Kharche
     [not found]         ` <l2ld17039311004211227l9c7de73ex9cb83c186a945a51@mail.gmail.com>
2010-04-22 11:29           ` Rahul Kharche
2010-05-04 12:01             ` Rahul Kharche

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=4D60B0700D1DB54A8C0C6E9BE69163700E572F41@EXCHANGEVS.IceraSemi.local \
    --to=rahul@icerasemi.com \
    --cc=gcc@gcc.gnu.org \
    --cc=sdkteam-gnu@IceraSemi.com \
    /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).