rust/compiler/rustc_mir_transform
Nilstrieb eafab66096 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.
2022-08-21 21:15:28 +02:00
..
src UnreachableProp: Preserve unreachable branches for multiple targets 2022-08-21 21:15:28 +02:00
Cargo.toml Update smallvec to 1.8.1. 2022-06-27 08:48:55 +10:00