rust/compiler
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
..
rustc
rustc_apfloat Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_arena Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_ast Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_ast_lowering Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_borrowck Rollup merge of #98415 - compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco 2022-06-29 17:59:31 +05:30
rustc_builtin_macros Auto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd 2022-06-29 09:11:29 +00:00
rustc_codegen_cranelift Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_codegen_gcc
rustc_codegen_llvm Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_codegen_ssa Auto merge of #98377 - davidv1992:add-lifetimes-to-argument-temporaries, r=oli-obk 2022-06-30 09:20:52 +00:00
rustc_const_eval Rollup merge of #98643 - voidc:valtree-ref-pretty, r=lcnr 2022-06-29 20:35:01 +02:00
rustc_data_structures Auto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd 2022-06-29 09:11:29 +00:00
rustc_driver Fix rustdoc argument error 2022-06-27 10:43:51 +02:00
rustc_error_codes Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko 2022-06-29 10:28:18 +05:30
rustc_error_messages Migrate some rustc_borrowck diagnostics to SessionDiagnostic 2022-06-28 22:41:56 +00:00
rustc_errors Migrate some rustc_borrowck diagnostics to SessionDiagnostic 2022-06-28 22:41:56 +00:00
rustc_expand Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC 2022-06-29 20:35:07 +02:00
rustc_feature
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd 2022-06-29 09:11:29 +00:00
rustc_hir_pretty
rustc_incremental
rustc_index Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_infer Rollup merge of #96727 - oli-obk:no_expect, r=lcnr 2022-06-30 00:23:50 +02:00
rustc_interface Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_lexer fix typo in comment 2022-06-28 19:59:09 +05:30
rustc_lint Rollup merge of #98420 - davidtwco:translation-lint-fixes-and-more-migration, r=compiler-errors 2022-06-28 15:30:04 +05:30
rustc_lint_defs make const_err show up in future breakage reports 2022-06-25 10:30:47 -04:00
rustc_llvm llvm-wrapper: adapt for an LLVM API change 2022-06-28 14:08:35 +00:00
rustc_log
rustc_macros macros: use typed identifiers in subdiag derive 2022-06-24 09:08:25 +01:00
rustc_metadata Auto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd 2022-06-29 09:11:29 +00:00
rustc_middle Auto merge of #98649 - RalfJung:guardians-of-mir, r=oli-obk 2022-06-30 03:50:35 +00:00
rustc_mir_build Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC 2022-06-29 20:35:07 +02:00
rustc_mir_dataflow Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_mir_transform Rollup merge of #98625 - RalfJung:retag, r=oli-obk 2022-06-29 17:59:37 +05:30
rustc_monomorphize Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_parse Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC 2022-06-29 20:35:07 +02:00
rustc_parse_format
rustc_passes avoid many &str to String conversions with MultiSpan::push_span_label 2022-06-29 21:16:43 +09:00
rustc_plugin_impl
rustc_privacy Auto merge of #98542 - jackh726:coinductive-wf, r=oli-obk 2022-06-29 03:22:47 +00:00
rustc_query_impl
rustc_query_system Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_resolve Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC 2022-06-29 20:35:07 +02:00
rustc_save_analysis
rustc_serialize Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_session various: add rustc_lint_diagnostics to diag fns 2022-06-27 08:32:06 +01:00
rustc_smir
rustc_span Auto merge of #98376 - nnethercote:improve-derive-PartialEq, r=petrochenkov 2022-06-29 00:20:57 +00:00
rustc_symbol_mangling
rustc_target rustc_target: Some more tests and fixes for linker arguments 2022-06-25 21:57:08 +03:00
rustc_trait_selection Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC 2022-06-29 20:35:07 +02:00
rustc_traits Auto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd 2022-06-29 09:11:29 +00:00
rustc_ty_utils Improve doc comment of destructure_const 2022-06-29 10:30:47 +02:00
rustc_type_ir Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00
rustc_typeck Rollup merge of #96727 - oli-obk:no_expect, r=lcnr 2022-06-30 00:23:50 +02:00