rust/src/librustc_driver
Alex Crichton 2af8155bee rollup merge of #19898: Aatch/issue-19684
#16081 fixed an issue where a nested return statement would cause incorrect behaviour due to the inner return writing over the return stack slot that had already been written too. However, the check was very broad and picked many cases that wouldn't ever be affected by this issue.

As a result, the number of allocas increased dramatically and therefore stack-size increased. LLVM is not able to remove all of the extraneous allocas. Any code that had multiple return values in a compound expression at the end of a function (including loops) would be hit by the issue.

The check now uses a control-flow graph to only consider the case when the inner return is executed conditionally. By itself, this narrowed definition causes #15763 to return, so the control-flow graph is also used to avoid passing the return slot as a destination when the result won't be used.

This change allows the stack-size of the main rustc task to be reduced to 8MB from 32MB.
2014-12-21 09:26:41 -08:00
..
driver.rs Split resolve from rustc::middle into rustc_resolve. 2014-12-20 07:28:47 +02:00
lib.rs rollup merge of #19898: Aatch/issue-19684 2014-12-21 09:26:41 -08:00
mod.rs
pretty.rs librustc_driver: use #[deriving(Copy)] 2014-12-19 10:51:00 -05:00
test.rs Split resolve from rustc::middle into rustc_resolve. 2014-12-20 07:28:47 +02:00