rust/compiler
bors 4db3d12e6f Auto merge of #128265 - DianQK:instsimplify-before-inline, r=saethlin
Perform instsimplify before inline to eliminate some trivial calls

I am currently working on #128081. In the current pipeline, we can get the following clone statements ([godbolt](https://rust.godbolt.org/z/931316fhP)):

```
    bb0: {
        StorageLive(_2);
        _2 = ((*_1).0: i32);
        StorageLive(_3);
        _3 = ((*_1).1: u64);
        _0 = Foo { a: move _2, b: move _3 };
        StorageDead(_3);
        StorageDead(_2);
        return;
    }
```

Analyzing such statements will be simple and fast. We don't need to consider branches or some interfering statements. However, this requires us to run `InstSimplify`, `ReferencePropagation`, and `SimplifyCFG` at least once. I can introduce a new pass, but I think the best place for it would be within `InstSimplify`.

I put `InstSimplify` before `Inline`, which takes some of the burden away from `Inline`.

r? `@saethlin`
2024-07-29 12:36:57 +00:00
..
rustc The rustc crate feature is called jemalloc 2024-07-15 13:01:20 -04:00
rustc_abi Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_arena Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_ir Use dep: for crate dependencies 2024-07-15 12:40:10 -04:00
rustc_ast_lowering Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_passes Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ast_pretty Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_attr Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_baked_icu_data Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
rustc_borrowck Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_builtin_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_codegen_cranelift Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_gcc Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_llvm Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_codegen_ssa Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_const_eval Rollup merge of #128277 - RalfJung:offset_from_wildcard, r=oli-obk 2024-07-29 11:42:34 +02:00
rustc_data_structures Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_driver Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
rustc_driver_impl Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_error_codes Rollup merge of #127853 - folkertdev:naked-function-error-messages, r=bjorn3 2024-07-28 08:57:16 +02:00
rustc_error_messages Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_errors Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_expand Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_feature Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_fluent_macro Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_fs_util Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_graphviz Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_analysis Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_pretty Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_hir_typeck Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_incremental Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_index Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_index_macros Remove usage of specialization from newtype_index! 2024-06-30 16:42:53 +00:00
rustc_infer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_interface Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_lexer Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_lint Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_lint_defs Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_llvm Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_log Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_middle Rollup merge of #128304 - Zalathar:thir-pat-display, r=Nadrieril 2024-07-29 11:42:34 +02:00
rustc_mir_build Rollup merge of #128304 - Zalathar:thir-pat-display, r=Nadrieril 2024-07-29 11:42:34 +02:00
rustc_mir_dataflow Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_mir_transform Perform instsimplify before inline to eliminate some trivial calls 2024-07-29 18:14:35 +08:00
rustc_monomorphize Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_next_trait_solver Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_parse Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_parse_format Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_passes Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_pattern_analysis Rollup merge of #128304 - Zalathar:thir-pat-display, r=Nadrieril 2024-07-29 11:42:34 +02:00
rustc_privacy Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_query_impl Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_query_system Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_resolve Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_sanitizers Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_serialize Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_session Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_smir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_span Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_symbol_mangling Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_target Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
rustc_trait_selection Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_traits Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_transmute Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_ty_utils Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_type_ir Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustc_type_ir_macros Reformat use declarations. 2024-07-29 08:26:52 +10:00
stable_mir Reformat use declarations. 2024-07-29 08:26:52 +10:00