Convert some ObjC retain/release msgSends to runtime calls.
It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions.
Differential Revision: https://reviews.llvm.org/D55869
Reviewed By: rjmccall
llvm-svn: 349952
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index f0d72af..75679d1 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -138,6 +138,10 @@
/// id objc_autorelease(id);
llvm::Constant *objc_autorelease;
+ /// id objc_autorelease(id);
+ /// Note this is the runtime method not the intrinsic.
+ llvm::Constant *objc_autoreleaseRuntimeFunction;
+
/// id objc_autoreleaseReturnValue(id);
llvm::Constant *objc_autoreleaseReturnValue;
@@ -162,6 +166,10 @@
/// id objc_retain(id);
llvm::Constant *objc_retain;
+ /// id objc_retain(id);
+ /// Note this is the runtime method not the intrinsic.
+ llvm::Constant *objc_retainRuntimeFunction;
+
/// id objc_retainAutorelease(id);
llvm::Constant *objc_retainAutorelease;
@@ -177,6 +185,10 @@
/// void objc_release(id);
llvm::Constant *objc_release;
+ /// void objc_release(id);
+ /// Note this is the runtime method not the intrinsic.
+ llvm::Constant *objc_releaseRuntimeFunction;
+
/// void objc_storeStrong(id*, id);
llvm::Constant *objc_storeStrong;