Commits

Roman Levenstein committed a2d78373688
[sil-global-opt] Add a new pass "let-properties-opt" to propagate values of non-static let properties with compile-time known const values into their uses The new pass is very similar to the global-opt pass, which performs propagation of global/static let variables with compile-time known constant values into their uses. In fact, these two passed share a lot of code. The common parts were moved into utils/Local.cpp, so that they can be used by both passes. In the ideal case, it would be nice if the pass would remove the propagated let properties or mark them as having no storage, which would allow for saving memory inside each instance of a type containing such a property. But this is not possible yet. Once the required machinery is in place, it should be trivial to extend this implementation to support this feature. rdar://18302056 Swift SVN r31875