diff options
| author | David Venhoek <david@venhoek.nl> | 2022-06-22 11:24:34 +0200 |
|---|---|---|
| committer | David Venhoek <david@venhoek.nl> | 2022-06-22 11:47:22 +0200 |
| commit | a174d65709744f9d88fbf8807a605f7ac15c2255 (patch) | |
| tree | 4cd6ed2214190f72f42010f0b8816417e76cdfe9 /compiler/rustc_codegen_gcc | |
| parent | 3d829a0922d865d7a77fb284424fd8ba6afaea3b (diff) | |
| download | rust-a174d65709744f9d88fbf8807a605f7ac15c2255.tar.gz rust-a174d65709744f9d88fbf8807a605f7ac15c2255.zip | |
Added llvm lifetime annotations to function call argument temporaries.
The goal of this change is to ensure that llvm will do stack slot
optimization on these temporaries. This ensures that in code like:
```rust
const A: [u8; 1024] = [0; 1024];
fn copy_const() {
f(A);
f(A);
}
```
we only use 1024 bytes of stack space, instead of 2048 bytes.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
