diff options
| author | bors <bors@rust-lang.org> | 2025-05-26 10:29:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-26 10:29:19 +0000 |
| commit | b5eb9893f42a469d330046089539f908d4728384 (patch) | |
| tree | ebce79cf107aa332abcd8e8c3b78b972cdc616a1 /compiler/rustc_mir_transform/src | |
| parent | 95a2212587f1b8500af1ac630322b0cb2e030c61 (diff) | |
| parent | 6a9e189f53f8ad77d0cdb4a87ce02a13b89303a2 (diff) | |
| download | rust-b5eb9893f42a469d330046089539f908d4728384.tar.gz rust-b5eb9893f42a469d330046089539f908d4728384.zip | |
Auto merge of #141406 - RalfJung:less-force-allocate, r=oli-obk
interpret: do not force_allocate all return places A while ago I cleaned up our `PlaceTy` a little, but as a side-effect of that, return places had to always be force-allocated. That turns out to cause quite a few extra allocations, and for a project we are doing where we marry Miri with a model checker, that means a lot of extra work -- local variables are just so much easier to reason about than allocations. So, this PR brings back the ability to have the return place be just a local of the caller. To make this work cleanly I had to rework stack pop handling a bit, which also changes the output of Miri in some cases as the span for errors occurring during a particular phase of stack pop changed. With these changes, a no-std binary with a function of functions that just take and return scalar types and that uses no pointers now does not move *any* local variables into memory. :) r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions
