Commits
Chris Lattner committed 71916015693
enhance the optimizer to delete release(allocate()) pairs. This is enough to zap 2 of
them from the stdlib: ine from Format.printString.String, and one from Char.printFormatted.
This is also enough to resolve rdar://11542743, allowing us to optimize:
func maxtest(x : Int) -> Int {
return max(x, 0)
}
into:
define i64 @_T1t7maxtestFT1xNSs5Int64_S0_(i64 %x) nounwind {
entry:
%0 = icmp sgt i64 %x, 0
%x.y.i = select i1 %0, i64 %x, i64 0
ret i64 %x.y.i
}
Instead of the mess of retains and releases shown in 11542743.
Swift SVN r2037