From c63995394de60996ebfe52a47cf2e3a0716d7e3c 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. llvm-svn: 182638 --- llvm/test/Feature/cold.ll | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 llvm/test/Feature/cold.ll (limited to 'llvm/test/Feature') diff --git a/llvm/test/Feature/cold.ll b/llvm/test/Feature/cold.ll new file mode 100644 index 00000000000..dcf79c5ba39 --- /dev/null +++ b/llvm/test/Feature/cold.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | llvm-dis | FileCheck %s + +; CHECK: @fun() #0 +define void @fun() #0 { + ret void +} + +; CHECK: attributes #0 = { cold } +attributes #0 = { cold } -- cgit v1.2.3