Commits

Chris Lattner committed 5f190a8e0b2
implement cross-block load promotion in definite initialization. This allows us to diagnose things that span multiple blocks, e.g.: var xu8_3 : UInt8 = 240 // Global (cross block) analysis. for i in 0..10 {} xu8_3 += 40 // expected-error {{arithmetic operation '240 + 40' (on type 'UInt8') results in an overflow}} This doesn't do full SSA construction in that it won't generate "phi" nodes, but will promote any loads that can be substituted with a (potentially field sensitive and decomposed) single value. Given that no diagnostics passes are going to be looking through BB args anyway, this seems like the right level of sophistication for definite init. Swift SVN r9523