[swift-dev] [swift] master: Turn on dynamic super method dispatch by default (bd8d85d)

Chris Lattner clattner at apple.com
Mon Jan 18 13:33:51 CST 2016


> On Jan 17, 2016, at 2:49 PM, David Farler <dfarler at apple.com> wrote:
> 
>>>   Turn on dynamic super method dispatch by default
>>> 
>>>   This removes the -use-native-super-method flag and turns on dynamic
>>>   dispatch for native method invocations on super by default.
>>> 
>>>   rdar://problem/22749732 <rdar://problem/22749732>
>> 
>> Random question: does this still use static dispatch when the superclass is within the same resilience domain, or is it the SIL optimizer’s job to handle that?
>> 
>> -Chris
> 
> In SILGen, when the method isn't final, it does always emits a super_method instruction, but Roman added devirtualizer support for these, and it does look like they are getting optimized down to static dispatch when the nearest implementation is in the same module.

Good news, thanks.  Would it make sense for -O0 perf to have SILGen generate the static dispatch when possible, or is it too much trouble for the benefit?

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160118/c4c753e4/attachment.html>


More information about the swift-dev mailing list