rust/src/test
bors 05a7f25cc4 Auto merge of #39456 - nagisa:mir-switchint-everywhere, r=nikomatsakis
[MIR] SwitchInt Everywhere

Something I've been meaning to do for a very long while. This PR essentially gets rid of 3 kinds of conditional branching and only keeps the most general one - `SwitchInt`. Primary benefits are such that dealing with MIR now does not involve dealing with 3 different ways to do conditional control flow. On the other hand, constructing a `SwitchInt` currently requires more code than what previously was necessary to build an equivalent `If` terminator. Something trivially "fixable" with some constructor methods somewhere (MIR needs stuff like that badly in general).

Some timings (tl;dr: slightly faster^1 (unexpected), but also uses slightly more memory at peak (expected)):

^1: Not sure if the speed benefits are because of LLVM liking the generated code better or the compiler itself getting compiled better. Either way, its a net benefit. The CORE and SYNTAX timings done for compilation without optimisation.

```
AFTER:
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 31.50 secs
    Finished release [optimized] target(s) in 31.42 secs
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 439.56 secs
    Finished release [optimized] target(s) in 435.15 secs

CORE: 99% (24.81 real, 0.13 kernel, 24.57 user); 358536k resident
CORE: 99% (24.56 real, 0.15 kernel, 24.36 user); 359168k resident
SYNTAX: 99% (49.98 real, 0.48 kernel, 49.42 user); 653416k resident
SYNTAX: 99% (50.07 real, 0.58 kernel, 49.43 user); 653604k resident

BEFORE:
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 31.84 secs
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 451.17 secs

CORE: 99% (24.66 real, 0.20 kernel, 24.38 user); 351096k resident
CORE: 99% (24.36 real, 0.17 kernel, 24.18 user); 352284k resident
SYNTAX: 99% (52.24 real, 0.56 kernel, 51.66 user); 645544k resident
SYNTAX: 99% (51.55 real, 0.48 kernel, 50.99 user); 646428k resident
```

cc @nikomatsakis @eddyb
2017-02-13 02:32:09 +00:00
..
codegen Rebase fixups 2017-02-10 19:47:09 +02:00
codegen-units trans: Treat generics like regular functions, not like #[inline] functions during CGU partitioning. 2017-01-09 10:06:58 -05:00
compile-fail Auto merge of #39456 - nagisa:mir-switchint-everywhere, r=nikomatsakis 2017-02-13 02:32:09 +00:00
compile-fail-fulldeps Allow using inert attributes from proc_macro_derives with #![feature(proc_macro)]. 2017-02-12 07:20:04 +00:00
debuginfo Exclude top-level macro expansions from source location override. 2017-02-08 22:10:33 -08:00
incremental Auto merge of #39265 - est31:master, r=petrochenkov 2017-02-09 11:42:49 +00:00
mir-opt Rebase fixups 2017-02-10 19:47:09 +02:00
parse-fail change span_notes to notes in E0368/E0369 2017-02-09 22:45:42 +00:00
pretty Update pretty test for derive attributes 2017-02-05 12:22:29 +10:30
run-fail Warn when a #[should_panic] test has an unexpected message 2016-11-18 21:01:19 +10:30
run-fail-fulldeps Fix fallout in rustdoc and tests. 2016-11-21 12:16:46 +00:00
run-make Add tested item in the rustdoc --test output 2017-02-11 16:36:31 +01:00
run-pass Rollup merge of #39721 - whataloadofwhat:catch-unwind-bang, r=alexcrichton 2017-02-10 23:41:38 -05:00
run-pass-fulldeps Allow using inert attributes from proc_macro_derives with #![feature(proc_macro)]. 2017-02-12 07:20:04 +00:00
run-pass-valgrind Removes FIXMEs related to #22405 2017-01-31 21:27:13 -05:00
rustdoc Rollup merge of #39654 - ollie27:rustdoc_attributes, r=GuillaumeGomez 2017-02-12 19:16:28 +01:00
ui Auto merge of #39456 - nagisa:mir-switchint-everywhere, r=nikomatsakis 2017-02-13 02:32:09 +00:00