]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #35168 - scottcarr:deaggregation, r=nikomatsakis
authorbors <bors@rust-lang.org>
Thu, 4 Aug 2016 10:01:37 +0000 (03:01 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Aug 2016 10:01:37 +0000 (03:01 -0700)
[MIR] Deaggregate structs to enable further optimizations

Currently, we generate MIR like:

```
tmp0 = ...;
tmp1 = ...;
tmp3 = Foo { a: ..., b: ... };
```

This PR implements "deaggregation," i.e.:

```
tmp3.0 = ...
tmp3.1 = ...
```

Currently, the code only deaggregates structs, not enums.  My understanding is that we do not have MIR to set the discriminant of an enum.

1  2 
src/librustc_driver/driver.rs

Simple merge