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]
Other format: [Raw text]

Re: How to detect whether we're inside of a loop??


> Op wo 09-04-2003, om 21:39 schreef Jan Hubicka:
> > > > We already do have branch prediction algorithm at RTL level.  I
> > > > would like to port it to tree-ssa as soon as we realize how to
> > > > maintain the profile over RTL expansion....
> > > 
> > > Yes that would be nice.  Already when I first posted the pointer to the
> > > SSA-VRP paper to Diego, it was discussed that we should figure out a way to
> > 
> > How expansive the SSA-VRP is?  All ways of doing VRP seems to be very
> > expensive and/or dificult and the value of having accurate VRP
> > information is not too well understood (at least by me), so I am not
> > sure it is wortwhile to do in the production compiler.  On the other
> > hand it is so cool toy so I would like to see it happen in any case
> > and I guess we will find use for it later.
> 
> SSA-VRP is basically an extension to SSA constant propagation, so it
> should be linear in time.  There is a link to the paper describing the
> algorithm from the tree-ssa project page.
> It's always possible to only enable it at some high optimization level
> if it turns out that it is not very useful and too slow for a production
> compiler.

Have to take a look at it!  Thinking about it it should be pretty
straighforward to do VRP on SSA...
> 
> > Note that VRP does not completely replace the existing branch prediction
> > algorithm.  Only when combined together it leads to beter prediction.
> 
> Yup.  The existing algorithm is based on heuristics, right?  VRP
> actually computes branch probabilities.

It does compute just for small percentage of the branches so it don't
get better overall hitrate.  Many of the heuristics covers branches VRP
usually does not so they seem to cooperate nicely.

Honza
> 
> > There are other showstoppers waiting - we need to replace all the passes
> > destroying CFG first - loop optimizer, sibcall, EH expansion.
> > We are working on that.
> 
> Cool.
> 
> Greetz
> Steven
> 
> 


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