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: Branch prediction


> Is there any documentation for what gcc does with branch prediction
> information it gets from profiling?  I am interested in this for
> modern Pentium processors where you can no longer give hints.

The profile feedback drives optimizations (i.e. decision what to optimize for
speed and what for size or if it is worth to pesimize one path through program
helping another) and it also affects code layout.  Somewhat old writeups are at
http://www.ucw.cz/~hubicka/papers/proj.pdf and
http://gccsummit.org/2005/2005-GCC-Summit-Proceedings.pdf#page=113 These are
still +- accurate to what is happening. Number of optimizations driven by the
profile grew over the years.  For example, we now enable aggressive inlining,
vectorization, loop unrolling/peeling and other fancy stuff on parts of program
we know is important by the feedback.

Honza
> 
> Specifically I am interested in whether there are in fact any
> optimisations that work reliably from this information.
> 
> Raphael


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