mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Non optimizable objc_retainBlock calls are not forwarding.
Since we handle optimizable objc_retainBlocks through strength reduction in OptimizableIndividualCalls, we know that all code after that point will only see non-optimizable objc_retainBlock calls. IsForwarding is only called by functions after that point, so it is ok to just classify objc_retainBlock as non-forwarding. <rdar://problem/13249661>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -120,13 +120,10 @@ static inline bool IsAutorelease(InstructionClass Class) {
|
|||||||
/// \brief Test if the given class represents instructions which return their
|
/// \brief Test if the given class represents instructions which return their
|
||||||
/// argument verbatim.
|
/// argument verbatim.
|
||||||
static inline bool IsForwarding(InstructionClass Class) {
|
static inline bool IsForwarding(InstructionClass Class) {
|
||||||
// objc_retainBlock technically doesn't always return its argument
|
|
||||||
// verbatim, but it doesn't matter for our purposes here.
|
|
||||||
return Class == IC_Retain ||
|
return Class == IC_Retain ||
|
||||||
Class == IC_RetainRV ||
|
Class == IC_RetainRV ||
|
||||||
Class == IC_Autorelease ||
|
Class == IC_Autorelease ||
|
||||||
Class == IC_AutoreleaseRV ||
|
Class == IC_AutoreleaseRV ||
|
||||||
Class == IC_RetainBlock ||
|
|
||||||
Class == IC_NoopCast;
|
Class == IC_NoopCast;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -98,7 +98,7 @@ entry:
|
|||||||
; CHECK-NEXT: tail call i8* @objc_retainBlock(i8* %tmp) [[NUW]]
|
; CHECK-NEXT: tail call i8* @objc_retainBlock(i8* %tmp) [[NUW]]
|
||||||
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
||||||
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
||||||
; CHECK-NEXT: tail call void @objc_release(i8* %tmp) [[NUW]], !clang.imprecise_release !0
|
; CHECK-NEXT: tail call void @objc_release(i8* %tmp2) [[NUW]], !clang.imprecise_release !0
|
||||||
; CHECK-NOT: @objc
|
; CHECK-NOT: @objc
|
||||||
; CHECK: }
|
; CHECK: }
|
||||||
define void @test1_no_metadata(i8* %tmp) {
|
define void @test1_no_metadata(i8* %tmp) {
|
||||||
@@ -122,7 +122,7 @@ entry:
|
|||||||
; CHECK-NEXT: store i8* %tmp2, i8** %z
|
; CHECK-NEXT: store i8* %tmp2, i8** %z
|
||||||
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
||||||
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
; CHECK-NEXT: @use_pointer(i8* %tmp2)
|
||||||
; CHECK-NEXT: tail call void @objc_release(i8* %tmp) [[NUW]], !clang.imprecise_release !0
|
; CHECK-NEXT: tail call void @objc_release(i8* %tmp2) [[NUW]], !clang.imprecise_release !0
|
||||||
; CHECK-NOT: @objc
|
; CHECK-NOT: @objc
|
||||||
; CHECK: }
|
; CHECK: }
|
||||||
define void @test1_escape(i8* %tmp, i8** %z) {
|
define void @test1_escape(i8* %tmp, i8** %z) {
|
||||||
|
Reference in New Issue
Block a user