Add 'cold' attribute to functions

Diego Novillo dnovillo at google.com
Tue May 14 12:31:33 PDT 2013


On 2013-04-11 07:25 , Jakub Staszak wrote:
> Hi Diego,
>
> calcColdCallHeuristics is called before calcLoopBranchHeuristics, so if CC compute the weight, the Loop Heuristics are skipped. I believe (although I might be wrong) that LH are more reliable and they should be called first.

Perhaps.  But the working assumption here is that if the user has marked 
a function as cold, then every time we see a call to it, we should 
really de-prioritize any paths through it.  I don't have a specific test 
case that would help convince me one way or the other, though.

I'm not really used to the way this analysis works, however.  I was 
expecting some sort of aggregate weight computation that would leave 
weights in the edges.  But this will choose exactly one.

Chandler, any thoughts on this?


Diego.



More information about the llvm-commits mailing list