Files
swift-mirror/lib/SILOptimizer/Transforms/PerformanceInliner.cpp
Andrew Trick a296ced6df Generic inline (#5467)
* [sil-performance-inliner] Re-factor the isProfitableToInline logic. NFC.

* [sil-performance-inliner] Introduce a pre-filter to decide of a generic function should be inlined

This logic is unconditional and is does not require any complex cost models.
The outcome of the check is one of:
- yes, inline this generic function
- no, do not inline this generic function
- None, don't know if it should be inline. Further more complex checks are required.

* [sil-performance-inliner] Handle inlining of generic functions into cold blocks

Generic functions should be inlined into cold blocks only if they should be unconditionally inlined (e.g. when they are always_inline or transparent).

* Allow generic inlining under -sil-inline-generics.
2016-10-25 17:27:02 -07:00

26 KiB