rust/compiler/rustc_codegen_ssa/src
bors 7425fb293f Auto merge of #98377 - davidv1992:add-lifetimes-to-argument-temporaries, r=oli-obk
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.

I am new to developing for the rust compiler, and as such not entirely sure, but I believe this should be sufficient to close #98156.

Also, this does not contain a test case to ensure this keeps working, primarily because I am not sure how to go about testing this. I would love some suggestions as to how that could be approached.
2022-06-30 09:20:52 +00:00
..
back Rollup merge of #98214 - petrochenkov:islike, r=compiler-errors 2022-06-24 16:43:45 +09:00
coverageinfo Remove in_band_lifetimes from rustc_codegen_ssa 2021-12-15 00:41:41 -05:00
debuginfo account for endianness in debuginfo for const args 2022-06-14 16:12:34 +02:00
mir Auto merge of #98377 - davidv1992:add-lifetimes-to-argument-temporaries, r=oli-obk 2022-06-30 09:20:52 +00:00
traits Add llvm.type.checked.load intrinsic 2022-06-14 14:50:52 +02:00
base.rs Rollup merge of #97738 - Kixiron:zst-panic, r=eddyb 2022-06-07 11:41:08 +02:00
common.rs rustc_codegen_ssa: derive copy and clone for various enums 2022-05-25 10:34:35 +02:00
glue.rs use unchecked mul to compute slice sizes 2022-06-14 17:09:07 -04:00
lib.rs Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko 2022-06-29 10:28:18 +05:30
meth.rs Add llvm.type.checked.load intrinsic 2022-06-14 14:50:52 +02:00
mono_item.rs Add codegen for global_asm! sym operands 2022-04-15 14:36:30 +01:00
target_features.rs Add some unstable target features for the wasm target codegen 2022-06-06 15:01:17 -07:00