about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorDavid Venhoek <david@venhoek.nl>2022-06-22 11:24:34 +0200
committerDavid Venhoek <david@venhoek.nl>2022-06-22 11:47:22 +0200
commita174d65709744f9d88fbf8807a605f7ac15c2255 (patch)
tree4cd6ed2214190f72f42010f0b8816417e76cdfe9 /compiler/rustc_codegen_gcc
parent3d829a0922d865d7a77fb284424fd8ba6afaea3b (diff)
downloadrust-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