Commits
Chris Lattner committed 0d610cf9526
teach AllocBoxToStack to remove alloc_stack's that are artificial (or inlined)
and only stored to. With this change, we now -emit-sil this testcase:
func f() {
var a = 1
}
as:
sil @_T1t1fFT_T_ : $@thin () -> () {
bb0:
%0 = tuple ()
%1 = alloc_stack $Int64 // var a // users: %8, %7
%2 = metatype $Int64.metatype
%3 = metatype $Int64.metatype
%4 = module #Builtin
%5 = integer_literal $Builtin.Int64, 1 // user: %6
%6 = struct $Int64 (%5 : $Builtin.Int64) // user: %7
store %6 to %1#1 : $*Int64
dealloc_stack %1#0 : $*@local_storage Int64
%9 = tuple () // user: %10
return %9 : $()
}
Swift SVN r9305