This is the mail archive of the gcc-patches@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: Predict recursive calls as unlikely


Jan Hubicka <hubicka@ucw.cz> writes:

> Hi,
> this is first of two patches for getting more realistic predictions of
> recursive functions.  It is clear that in order for recursion to finish, the
> sum of frequencies of recursive calls should not exceed sum of frequencies of
> the function entry block.  This global condition is however bit hard to achieve
> by local predictors.

How would this handle tail recursion?

In this case it may just be a funky way to write a loop, but not
predicting it as taken would be bad.

-Andi


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