Skip to content

ARCEntryPointBuilder: Don't mark the call instructions as tail-calls #23476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions lib/LLVMPasses/ARCEntryPointBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class ARCEntryPointBuilder {

// Create the call.
CallInst *CI = CreateCall(getRetain(OrigI), V);
CI->setTailCall(true);
return CI;
}

Expand All @@ -129,7 +128,6 @@ class ARCEntryPointBuilder {

// Create the call.
CallInst *CI = CreateCall(getRelease(OrigI), V);
CI->setTailCall(true);
return CI;
}

Expand All @@ -139,23 +137,20 @@ class ARCEntryPointBuilder {
V = B.CreatePointerCast(V, getObjectPtrTy());

CallInst *CI = CreateCall(getCheckUnowned(OrigI), V);
CI->setTailCall(true);
return CI;
}

CallInst *createRetainN(Value *V, uint32_t n, CallInst *OrigI) {
// Cast just to make sure that we have the right object type.
V = B.CreatePointerCast(V, getObjectPtrTy());
CallInst *CI = CreateCall(getRetainN(OrigI), {V, getIntConstant(n)});
CI->setTailCall(true);
return CI;
}

CallInst *createReleaseN(Value *V, uint32_t n, CallInst *OrigI) {
// Cast just to make sure we have the right object type.
V = B.CreatePointerCast(V, getObjectPtrTy());
CallInst *CI = CreateCall(getReleaseN(OrigI), {V, getIntConstant(n)});
CI->setTailCall(true);
return CI;
}

Expand All @@ -164,7 +159,6 @@ class ARCEntryPointBuilder {
V = B.CreatePointerCast(V, getObjectPtrTy());
CallInst *CI =
CreateCall(getUnknownObjectRetainN(OrigI), {V, getIntConstant(n)});
CI->setTailCall(true);
return CI;
}

Expand All @@ -173,23 +167,20 @@ class ARCEntryPointBuilder {
V = B.CreatePointerCast(V, getObjectPtrTy());
CallInst *CI =
CreateCall(getUnknownObjectReleaseN(OrigI), {V, getIntConstant(n)});
CI->setTailCall(true);
return CI;
}

CallInst *createBridgeRetainN(Value *V, uint32_t n, CallInst *OrigI) {
// Cast just to make sure we have the right object type.
V = B.CreatePointerCast(V, getBridgeObjectPtrTy());
CallInst *CI = CreateCall(getBridgeRetainN(OrigI), {V, getIntConstant(n)});
CI->setTailCall(true);
return CI;
}

CallInst *createBridgeReleaseN(Value *V, uint32_t n, CallInst *OrigI) {
// Cast just to make sure we have the right object type.
V = B.CreatePointerCast(V, getBridgeObjectPtrTy());
CallInst *CI = CreateCall(getBridgeReleaseN(OrigI), {V, getIntConstant(n)});
CI->setTailCall(true);
return CI;
}

Expand Down
Loading