Add 'cold' attribute to functions

Meador Inge meadori at codesourcery.com
Thu Apr 11 06:58:52 PDT 2013


On 04/10/2013 04:33 PM, Diego Novillo 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.

Can you please document the new attribute in the LLVM Language Reference Manual?

-- 
Meador Inge
CodeSourcery / Mentor Embedded



More information about the llvm-commits mailing list