Add a new function attribute 'cold' to functions.
authorDiego Novillo <dnovillo@google.com>
Fri, 24 May 2013 12:26:52 +0000 (12:26 +0000)
committerDiego Novillo <dnovillo@google.com>
Fri, 24 May 2013 12:26:52 +0000 (12:26 +0000)
commit77226a03dca98e6237c1068f2652fe41bea7b687
tree3a8cb78a478d9e82735484091ae29647e3ec9002
parent49a6a8d8f2994249c81b7914b07015714748a55c
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
13 files changed:
docs/LangRef.rst
include/llvm-c/Core.h
include/llvm/Analysis/BranchProbabilityInfo.h
include/llvm/IR/Attributes.h
lib/Analysis/BranchProbabilityInfo.cpp
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLToken.h
lib/IR/Attributes.cpp
lib/IR/Verifier.cpp
test/Analysis/BranchProbabilityInfo/basic.ll
test/CodeGen/X86/block-placement.ll
test/Feature/cold.ll [new file with mode: 0644]