[SR-3074] When call direct call of generic function is 30x slower than indirect call #45664
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
crash
Bug: A crash, i.e., an abnormal termination of software
performance
Additional Detail from JIRA
md5: 37a90ca57b69b7234d6a6ac8081ade13
Issue Description:
I have this generic function
when called directly it's slow
when called indirectly, it's fast
when tried add
@_specialize(Array<UInt8>) to "update()", swiftc crash.
0 swift 0x0000000108912a3d PrintStackTraceSignalHandler(void*) + 45
1 swift 0x0000000108912466 SignalHandler(int) + 470
2 libsystem_platform.dylib 0x00007fff808da52a _sigtramp + 26
3 libsystem_platform.dylib 0x00007febcdbb2308 _sigtramp + 1294827000
4 swift 0x0000000105ff828d swift::SILPassManager::runOneIteration() + 8749
5 swift 0x0000000105ffc776 swift::runSILOptimizationPasses(swift::SILModule&) + 3462
6 swift 0x0000000105cbfe15 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) + 20117
7 swift 0x0000000105cb8f70 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 17856
8 swift 0x0000000105c7593e main + 8302
9 libdyld.dylib 0x00007fff885375ad start + 1
10 libdyld.dylib 0x00000000000000fc start + 2007796560
Stack dump:
0. Program arguments: .....
unsafeUnwrap
calls. #2 SILModuleTransform "Eager Specializer".The text was updated successfully, but these errors were encountered: