Commits
Chris Lattner committed df967027ec3
Implement a first hack at (limited) alloc_stack to register promotion. This pass is destined to be somewhat different than LLVM's mem2reg pass: - Because we can't break debug information, this won't remove alloc_stack (and the stores to it) for allocations with location info. - Because this gates other dataflow diagnostics, we don't want a value being pinned to the stack to prevent promotion. Instead, we promote all loads that we can, even if some end up being blocked by a [byref] "may" store. Lots of caveats herein: - This doesn't do cross block promotion yet. - This doesn't remove the allocation even when it is allowed to. - This causes a few IRGen test failures, including an irgen crash. - This should be split out to its own file, its own pass, and its own testcase. Because of these caveats, this is disabled by default right now. Pass -enable-stack-promotion to get it. Swift SVN r6454