Commits

Mark Lacey committed 009c7a72425
Fix placement of alloc_stack/dealloc_stack Update the box-to-stack promotion pass to place the newly promoted allocations at the function entry, and deallocations before each return. Ideally we would scope these lifetimes down, but it's a bit challenging because: - The capture promotion pass can insert releases, and these releases are not in any particular order with respect to the box creation. - The box-to-stack promotion pass has for a while now been promoting boxes that are arguments to partial_apply when we know the partial_apply doesn't escape the current function. To correctly place the deallocs, we would need to determine the potential lifetimes of the allocated data, e.g. the last use of the partial_apply along any given path. I have opened <rdar://problem/16723128> so that we can try to improve this in the future. Fixes <rdar://problem/16242937>. Swift SVN r16852