Generic Specialization Heuristics

Hi all,

From what I understand, the Swift compiler may specialize a generic function based on a set of heuristics. Where are these heuristics implemented in the source code?

https://github.com/apple/swift/blob/master/lib/SILOptimizer/Transforms/GenericSpecializer.cpp and https://github.com/apple/swift/blob/master/lib/SILOptimizer/Utils/Generics.cpp maybe?

2 Likes

Thank you! That seems to be it.

1 Like
Terms of Service

Privacy Policy

Cookie Policy