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 --- test/Feature/cold.ll | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/Feature/cold.ll (limited to 'test/Feature') diff --git a/test/Feature/cold.ll b/test/Feature/cold.ll new file mode 100644 index 0000000..dcf79c5 --- /dev/null +++ b/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.1