Skip to content

Commit dcf7a10

Browse files
author
Joe Shajrawi
authored
Merge pull request #23476 from shajrawi/no_tail
ARCEntryPointBuilder: Don't mark the call instructions as tail-calls
2 parents d8df1bf + dae1598 commit dcf7a10

File tree

2 files changed

+131
-140
lines changed

2 files changed

+131
-140
lines changed

lib/LLVMPasses/ARCEntryPointBuilder.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ class ARCEntryPointBuilder {
119119

120120
// Create the call.
121121
CallInst *CI = CreateCall(getRetain(OrigI), V);
122-
CI->setTailCall(true);
123122
return CI;
124123
}
125124

@@ -129,7 +128,6 @@ class ARCEntryPointBuilder {
129128

130129
// Create the call.
131130
CallInst *CI = CreateCall(getRelease(OrigI), V);
132-
CI->setTailCall(true);
133131
return CI;
134132
}
135133

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

141139
CallInst *CI = CreateCall(getCheckUnowned(OrigI), V);
142-
CI->setTailCall(true);
143140
return CI;
144141
}
145142

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

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

@@ -164,7 +159,6 @@ class ARCEntryPointBuilder {
164159
V = B.CreatePointerCast(V, getObjectPtrTy());
165160
CallInst *CI =
166161
CreateCall(getUnknownObjectRetainN(OrigI), {V, getIntConstant(n)});
167-
CI->setTailCall(true);
168162
return CI;
169163
}
170164

@@ -173,23 +167,20 @@ class ARCEntryPointBuilder {
173167
V = B.CreatePointerCast(V, getObjectPtrTy());
174168
CallInst *CI =
175169
CreateCall(getUnknownObjectReleaseN(OrigI), {V, getIntConstant(n)});
176-
CI->setTailCall(true);
177170
return CI;
178171
}
179172

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

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

0 commit comments

Comments
 (0)