rust/src
bors 015a824f2d Auto merge of #99762 - Nilstrieb:unreachable-prop, r=oli-obk
UnreachableProp: Preserve unreachable branches for multiple targets

Before, UnreachablePropagation removed all unreachable branches. This was a pessimization, as it removed information about reachability that was used later in the optimization pipeline.

For example, this code
```rust
pub enum Two { A, B }
pub fn identity(x: Two) -> Two {
    match x {
        Two::A => Two::A,
        Two::B => Two::B,
    }
}
```

basically has `switchInt() -> [0: 0, 1: 1, otherwise: unreachable]` for the match. This allows it to be transformed into a simple `x`. If we remove the unreachable branch, the transformation becomes illegal.

This was the problem keeping `UnreachablePropagation` from being enabled, so we can enable it now.

Something similar already happened in #77800, but it did not show a perf improvement there. Let's try it again anyways!

Fixes #68105, although that issue has been fixed for a long time (see #77680).
2022-08-22 20:28:16 +00:00
..
bootstrap Auto merge of #100536 - Alexendoo:bootstrap-tls-model, r=Mark-Simulacrum 2022-08-21 01:34:05 +00:00
ci Auto merge of #99967 - Mark-Simulacrum:download-llvm-ci, r=jyn514 2022-08-20 22:49:36 +00:00
doc Rollup merge of #100637 - andrewpollack:fuchsia-docs-adjustments, r=tmandry 2022-08-18 05:10:45 +02:00
etc Auto merge of #98393 - michaelwoerister:new-cpp-like-enum-debuginfo, r=wesleywiser 2022-08-15 12:59:53 +00:00
librustdoc Auto merge of #100668 - nnethercote:use-AttrVec-more, r=spastorino 2022-08-22 00:34:02 +00:00
llvm-project@e3be3f64ec Patch lld for older toolchains 2022-08-11 15:51:59 -07:00
rustdoc-json-types Rollup merge of #100335 - aDotInTheVoid:rdj-resolved-path, r=GuillaumeGomez 2022-08-13 21:06:48 -07:00
test Auto merge of #99762 - Nilstrieb:unreachable-prop, r=oli-obk 2022-08-22 20:28:16 +00:00
tools Auto merge of #100671 - Xiretza:tidy-fluent-files, r=davidtwco 2022-08-22 03:02:50 +00:00
README.md
stage0.json Bump bootstrap compiler 2022-08-12 16:27:26 -04:00
version Bump to 1.65.0 2022-08-05 11:32:46 -04:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

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