This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: passing branch prediction information to asm output


   Date: Tue, 23 Sep 1997 01:32:47 -0600
   From: Jeffrey A Law <law@hurl.cygnus.com>

   Or, look at it from another angle -- we have two notes doing
   basically the same thing.  The only difference is where the
   information comes from -- either previous runs or static branch
   prediction.

The REG_BR_PRED I added is not static always.  If REG_BR_PROB notes
were created in the RTL based upon gcov information, the REG_BR_PRED
flags will be set based upon them.

They are only static when REG_BR_PROB information is not available.

   You should add some docs to the gcc manual for the new notes --
   make sure to mention when the new predict note is valid.

Sure, I'll do this tomorrow.

   This is information I want to be able to make use of in a variety
   of ways (haifa-sched, basic block layout code and in the backend)
   -- which may mean computing it and incrementally updating it in the
   future too, so it wouldn't suprise me if some of this eventually
   changed.

On certain platforms, in particular those which do dbr scheduling, the
dbr pass will change a decent percentage of the predictions by the
time it is done.  So in the cases where this does happen, you made
decisions based upon information which is now completely different.

But yes, I can see why you'd want to use the info in other passes.

I have thought now and again about a "super scheduler" which knew how
to do the dbr stuff as well as what it does already.  And really, when
we in the future model superscalar's more accurately, such a thing
will almost be of necessity to get it right.

Later,
David "Sparc" Miller
davem@caip.rutgers.edu



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]