| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-05-17 | rustc_codegen_ssa: only create backend `BasicBlock`s as-needed. | Eduard-Mihai Burtescu | -3/+3 | |
| 2019-11-21 | Introduce MIR optimizations for simplifying `x?` on `Result`s. | Mazdak Farrokhzad | -3/+5 | |
| This optimization depends on inlining for the identity conversions introduced by the lowering of the `?`. To take advantage of `SimplifyArmIdentity`, `-Z mir-opt-level=2` is required because that triggers the inlining MIR optimization. | ||||
| 2019-06-13 | Create fewer basic blocks in match MIR lowering | Matthew Jasper | -2/+2 | |
| 2019-02-21 | Fix codegen test | Matthew Jasper | -2/+2 | |
| 2018-12-25 | Remove licenses | Mark Rousskov | -10/+0 | |
| 2018-02-20 | rustc_mir: always run the deaggregator. | Eduard-Mihai Burtescu | -3/+3 | |
| 2017-11-14 | always add an unreachable branch on matches to give more info to llvm about ↵ | Djzin | -3/+6 | |
| which values are possible | ||||
| 2017-02-10 | Rebase fixups | Simonas Kazlauskas | -1/+1 | |
| 2017-02-10 | Fix codegen test | Simonas Kazlauskas | -3/+7 | |
| 2015-09-25 | Tell LLVM when a match is exhaustive | Björn Steinbrink | -0/+30 | |
| By putting an "unreachable" instruction into the default arm of a switch instruction we can let LLVM know that the match is exhaustive, allowing for better optimizations. For example, this match: ```rust pub enum Enum { One, Two, Three, } impl Enum { pub fn get_disc(self) -> u8 { match self { Enum::One => 0, Enum::Two => 1, Enum::Three => 2, } } } ``` Currently compiles to this on x86_64: ```asm .cfi_startproc movzbl %dil, %ecx cmpl $1, %ecx setne %al testb %cl, %cl je .LBB0_2 incb %al movb %al, %dil .LBB0_2: movb %dil, %al retq .Lfunc_end0: ``` But with this change we get: ```asm .cfi_startproc movb %dil, %al retq .Lfunc_end0: ``` | ||||
