We currently run the generic specialize after the devirtualizer because
devirtualization can unblock generic specialization. This patch saves the
newly created ApplyInsts and attempts to specialize only them.
Swift SVN r25576
Devirtualizer should not even try to devirt calls where a class instance is of an unbound generic type, because there is no support for it yet.
This fixes rdar://19912272
Swift SVN r25491
In case when a base method and an overriding derived method differ in the optionality of the return type, devirt should perform the required wrapping after devirtualizing the class_method call.
rdar://19619832
Swift SVN r24768
Fixes rdar://problem/19477863.
Again, no real perf diff here, probably because the next round of
inlining was already inlining these (most of the hits are on setters,
getters, etc. which tend to be quite small).
Having this fixed will be useful in a future where we do some trivial
devirtualization during inlining, in particular mandatory
inlining (rdar://problem/19418937).
Swift SVN r24491
This patch provides a more robust way to find proper substitutions for generic classes during devirtualization. It fixes test-cases which were resulting in a compiler crash before. New tests are added to the test-suite to avoid this in the future.
Swift SVN r24040
The new simplified design was inspired by a discussion with Michael. Thanks!
This implementation is much simpler and smaller than the old one. The tests are extended to check for more complex cases.
Swift SVN r23909
This patch improves handling of generic parameters and implements proper handling of metatypes, which were blocking correct devirtualization of inherited and specialized conformances. It enables a corresponding test, because all its blocking issues are resolved now.
Fixes rdar://17823742, rdar://17823746 and rdar://16847192
Swift SVN r23882
without a valid SILDebugScope. An assertion in IRGenSIL prevents future
optimizations from regressing in this regard.
Introducing SILBuilderWithScope and SILBuilderwithPostprocess to ease the
transition.
This patch is large, but mostly mechanical.
<rdar://problem/18494573> Swift: Debugger is not stopping at the set breakpoint
Swift SVN r22978
conformance.
Revert r19137 and keep the testing case. Commit a fix that combines
substitutions from the specialized protocol conformance and substitutions from
the ApplyInst; then uses the full substitution list in substGenericArgs.
I had a small SIL testing case that runs "sil-opt -devirtualize", but due to
rdar://18120894, the testing case failed to work.
rdar://17440222
Performance -----
Before:
Totals,54,114129,114129,114129,0,0 (O)
Totals,54,81957,81957,81957,0,0 (Ounchecked)
Totals,54,83157,83157,83157,0,0 (run 2 of Ounchecked)
After:
Totals,54,109847,109847,109847,0,0 (O)
Totals,54,80301,80301,80301,0,0 (Ounchecked)
Swift SVN r21442