]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #8270 : dotdash/rust/ret_alloca_elim, r=pcwalton
authorbors <bors@rust-lang.org>
Sat, 10 Aug 2013 11:44:13 +0000 (04:44 -0700)
committerbors <bors@rust-lang.org>
Sat, 10 Aug 2013 11:44:13 +0000 (04:44 -0700)
When there is only a single store to the ret slot that dominates the
load that gets the value for the "ret" instruction, we can elide the
ret slot and directly return the operand of the dominating store
instruction. This is the same thing that clang does, except for a
special case that doesn't seem to affect us.

Fixes #8238

1  2 
src/librustc/lib/llvm.rs
src/librustc/middle/trans/base.rs

Simple merge
Simple merge