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/lib/IR/Verifier.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/IR/Verifier.cpp') diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index d106173b521..a94c1566a20 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -692,7 +692,8 @@ void Verifier::VerifyAttributeTypes(AttributeSet Attrs, unsigned Idx, I->getKindAsEnum() == Attribute::SanitizeMemory || I->getKindAsEnum() == Attribute::MinSize || I->getKindAsEnum() == Attribute::NoDuplicate || - I->getKindAsEnum() == Attribute::NoBuiltin) { + I->getKindAsEnum() == Attribute::NoBuiltin || + I->getKindAsEnum() == Attribute::Cold) { if (!isFunction) CheckFailed("Attribute '" + I->getKindAsString() + "' only applies to functions!", V); -- cgit v1.2.3