mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AccessStorageAnalysis: ignore _swift_stdlib_malloc_size and _swift_stdlib_has_malloc_size runtime calls
Those runtime calls are used in the Array implementation and prevented access optimizations. rdar://87853551
This commit is contained in:
@@ -380,6 +380,19 @@ bool FunctionAccessStorage::summarizeFunction(SILFunction *F) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FunctionAccessStorage::summarizeCall(FullApplySite fullApply) {
|
||||
assert(accessResult.isEmpty() && "expected uninitialized results.");
|
||||
|
||||
if (SILFunction *callee = fullApply.getReferencedFunctionOrNull()) {
|
||||
if (callee->getName() == "_swift_stdlib_malloc_size" ||
|
||||
callee->getName() == "_swift_stdlib_has_malloc_size") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
SILAnalysis *swift::createAccessStorageAnalysis(SILModule *) {
|
||||
return new AccessStorageAnalysis();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user