Add 'cold' attribute to functions

Jakub Staszak kubastaszak at gmail.com
Thu Apr 11 04:25:40 PDT 2013


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.

Thanks!
- Kuba


are more
On Apr 10, 2013, at 11:33 PM, Diego Novillo <dnovillo at google.com> wrote:

> This patch adds a new function attribute 'cold' to functions.
> 
> Other than recognizing the attribute, the patch does little else.
> It changes the branch probability analyzer so that edges into
> blocks postdominated by a cold function are given low weight.
> 
> I have two follow up patches in progress.  One to add the 'cold'
> attribute to Clang and another one to propagate the cold
> attribute on the dominator tree (edges into blocks dominated by a
> cold call would be given low weight).
> 
> OK to commit?  Chandler, I will need help committing the patch as
> I don't have write access to the repo.
> 
> 
> Thanks.  Diego.
> <00.diff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list