rust/src
bors 83c9732e0c Auto merge of #116270 - cjgillot:gvn-aggregate, r=oli-obk,RalfJung
See through aggregates in GVN

This PR is extracted from https://github.com/rust-lang/rust/pull/111344

The first 2 commit are cleanups to avoid repeated work. I propose to stop removing useless assignments as part of this pass, and let a later `SimplifyLocals` do it. This makes tests easier to read (among others).

The next 3 commits add a constant folding mechanism to the GVN pass, presented in https://github.com/rust-lang/rust/pull/116012. ~This pass is designed to only use global allocations, to avoid any risk of accidental modification of the stored state.~

The following commits implement opportunistic simplifications, in particular:
- projections of aggregates: `MyStruct { x: a }.x` gets replaced by `a`, works with enums too;
- projections of arrays: `[a, b][0]` becomes `a`;
- projections of repeat expressions: `[a; N][x]` becomes `a`;
- transform arrays of equal operands into a repeat rvalue.

Fixes https://github.com/rust-lang/miri/issues/3090

r? `@oli-obk`
2023-10-29 14:50:53 +00:00
..
bootstrap Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-Simulacrum 2023-10-29 12:35:00 +01:00
ci Explicitly mark which targets to distribute cg_clif for in CI 2023-10-27 18:56:46 +00:00
doc Auto merge of #117336 - workingjubilee:rollup-6negquv, r=workingjubilee 2023-10-29 03:53:36 +00:00
etc Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-Simulacrum 2023-10-29 12:35:00 +01:00
librustdoc rustdoc: Use ThinVec in GenericParamDefKind 2023-10-29 02:14:41 -04:00
llvm-project@febc39711a Update to LLVM 17.0.3 2023-10-17 10:44:45 +02:00
rustdoc-json-types rustdoc-json: Rename typedef to type alias 2023-08-21 14:02:34 -07:00
tools Auto merge of #116270 - cjgillot:gvn-aggregate, r=oli-obk,RalfJung 2023-10-29 14:50:53 +00:00
README.md
stage0.json Bump to latest beta 2023-10-08 19:57:43 -04:00
version Bump to 1.75.0 2023-09-30 19:09:22 -04:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.