mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The devirtualizer performs two optimizations: - If a value is known to have an exact class type, ie it is the result of an alloc_ref, we can devirtualize calls of *non-final* methods, because we know we’re calling that specific method and not an override. - If a method is known to be “effectively final” (it is not open, and there are no overrides inside the module) we can devirtualize it. However the second optimization needs to be disabled if a function is inlinable (F->getResilienceExpansion() == ResilienceExpansion::Minimal).
3.6 KiB
3.6 KiB