3 ms·
> GCC can use whole program optimization to replace virtual dispatch with a series of if statements. Would you happen to have a sharable example of this occurr
by hermitdev 5y ago
> GCC can use whole program optimization to replace virtual dispatch with a series of if statements.
Would you happen to have a sharable example of this occurring? I'd be curious to see what heuristics GCC is using. Also, what the conditional is on...is it still on the vtable, but just avoiding the indirect call?
- Kranar 5y agoJan Hubička worked on much of the devirtualization in GCC and posted a blog about how it works here: http://hubicka.blogspot.com/2014/01/devirtualization-in-c-part-1.html http://hubicka.blogspot.com/2014/01/devirtualization-in-c-pa...