Skip to content

Commit 53aa84a

Browse files
committed
[sil-prespecialization] Whitelist the Swift._allocateUninitializedArray
When pre-specialization was introduced I forgot to whitelist the _allocateUninitializedArray. As a result, the creation of an array with elements of builtin types was using a generic code. Moreover, due to use of generics, a lot of getGenericMetadata runtime calls were performed, resulting in increased memory usage. With this change, the memory usage of a "hello, world" Swift-app is down to 5.7KB. Swift SVN r31322
1 parent db07476 commit 53aa84a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SILPasses/Utils/Generics.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ bool swift::isWhitelistedSpecialization(StringRef SpecName) {
8585
"_ContiguousArrayBuffer",
8686
"Range",
8787
"RangeGenerator",
88+
"_allocateUninitializedArray",
8889
"UTF8",
8990
"UTF16",
9091
"String",

0 commit comments

Comments
 (0)