mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove the LLVM stack promotion pass and related SIL optimization logic.
It's not needed anymore because array buffers are now allocated with alloc_ref instead of a swift_bufferAllocate runtime call.
This commit is contained in:
@@ -107,28 +107,6 @@ extern "C" HeapObject* swift_bufferAllocate(
|
||||
alignMask);
|
||||
}
|
||||
|
||||
/// \brief Another entrypoint for swift_bufferAllocate.
|
||||
/// It is generated by the compiler in some corner cases, e.g. if a serialized
|
||||
/// optimized module is imported into a non-optimized main module.
|
||||
/// TODO: This is only a workaround. Remove this function as soon as we can
|
||||
/// get rid of the llvm SwiftStackPromotion pass.
|
||||
SWIFT_RUNTIME_EXPORT
|
||||
extern "C" HeapObject* swift_bufferAllocateOnStack(
|
||||
HeapMetadata const* bufferType, size_t size, size_t alignMask) {
|
||||
return swift::SWIFT_RT_ENTRY_CALL(swift_allocObject)(bufferType, size,
|
||||
alignMask);
|
||||
}
|
||||
|
||||
/// \brief Called at the end of the lifetime of an object returned by
|
||||
/// swift_bufferAllocateOnStack.
|
||||
/// It is generated by the compiler in some corner cases, e.g. if a serialized
|
||||
/// optimized module is imported into a non-optimized main module.
|
||||
/// TODO: This is only a workaround. Remove this function as soon as we can
|
||||
/// get rid of the llvm SwiftStackPromotion pass.
|
||||
SWIFT_RUNTIME_EXPORT
|
||||
extern "C" void swift_bufferDeallocateFromStack(HeapObject *) {
|
||||
}
|
||||
|
||||
SWIFT_RUNTIME_EXPORT
|
||||
extern "C" intptr_t swift_bufferHeaderSize() { return sizeof(HeapObject); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user