add support for the cold function attribute
This allows a function to marked as infrequently called, resulting in any branch calling it to be considered colder.
This commit is contained in:
@@ -365,6 +365,11 @@ extern "C" void LLVMRemoveReturnAttribute(LLVMValueRef Fn, LLVMAttribute PA) {
|
||||
AttributeSet::get(A->getContext(), AttributeSet::ReturnIndex, B));
|
||||
}
|
||||
|
||||
extern "C" void LLVMAddColdAttribute(LLVMValueRef Fn) {
|
||||
Function *A = unwrap<Function>(Fn);
|
||||
A->addAttribute(AttributeSet::FunctionIndex, Attribute::Cold);
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef LLVMBuildAtomicLoad(LLVMBuilderRef B,
|
||||
LLVMValueRef source,
|
||||
const char* Name,
|
||||
|
||||
Reference in New Issue
Block a user