public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* branch probabilities on multiway branches
@ 2010-04-13 16:51 Rahul Kharche
  2010-04-14  0:08 ` Jan Hubicka
  0 siblings, 1 reply; 10+ messages in thread
From: Rahul Kharche @ 2010-04-13 16:51 UTC (permalink / raw)
  To: gcc; +Cc: sdkteam-gnu

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

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

end of thread, other threads:[~2010-05-04 12:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-13 16:51 branch probabilities on multiway branches Rahul Kharche
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

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