From 77226a03dca98e6237c1068f2652fe41bea7b687 Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Fri, 24 May 2013 12:26:52 +0000 Subject: 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 --- docs/LangRef.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs') diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 5e32eba7f7..e902159bf0 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -812,6 +812,11 @@ example: This attribute indicates that the inliner should attempt to inline this function into callers whenever possible, ignoring any active inlining size threshold for this caller. +``cold`` + This attribute indicates that this function is rarely called. When + computing edge weights, basic blocks post-dominated by a cold + function call are also considered to be cold; and, thus, given low + weight. ``nonlazybind`` This attribute suppresses lazy symbol binding for the function. This may make calls to the function faster, at the cost of extra program -- cgit v1.2.3