about summary refs log tree commit diff
path: root/library/std/src/sys/windows/stack_overflow_uwp.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-21 07:16:44 +0000
committerbors <bors@rust-lang.org>2020-05-21 07:16:44 +0000
commit7f79e98c0356642db62e5113327e436c951e843d (patch)
treeb140158d00b7dfe9c34315a771816496adab9280 /library/std/src/sys/windows/stack_overflow_uwp.rs
parent963bf528292d8f97104515e32908e30c2467b6a8 (diff)
parentf50986205756075fb05a9371b94facd58cc048a6 (diff)
downloadrust-7f79e98c0356642db62e5113327e436c951e843d.tar.gz
rust-7f79e98c0356642db62e5113327e436c951e843d.zip
Auto merge of #72205 - ecstatic-morse:nrvo, r=oli-obk
Dumb NRVO

This is a very simple version of an NRVO pass, which scans backwards from the `return` terminator to see if there is an an assignment like `_0 = _1`. If a basic block with two or more predecessors is encountered during this scan without first seeing an assignment to the return place, we bail out. This avoids running a full "reaching definitions" dataflow analysis.

I wanted to see how much `rustc` would benefit from even a very limited version of this optimization. We should be able to use this as a point of comparison for more advanced versions that are based on live ranges.

r? @ghost
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow_uwp.rs')
0 files changed, 0 insertions, 0 deletions