Add 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.

Added analysis and code generation tests.  Added documentation for the
new attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182638 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Diego Novillo
2013-05-24 12:26:52 +00:00
parent 49a6a8d8f2
commit 77226a03dc
13 changed files with 200 additions and 1 deletions

View File

@ -166,6 +166,7 @@ typedef enum {
and the path forward agreed upon.
LLVMAddressSafety = 1ULL << 32,
LLVMStackProtectStrongAttribute = 1ULL<<33
LLVMCold = 1ULL << 34
*/
} LLVMAttribute;