]> git.lizzy.rs Git - rust.git/commit
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)
commite804a3cf256106c097d44f6e0212cd183122da07
treeee0c23f123fdce8f175e348b79c92e5184bf1f7c
parent271d048523b6c1b0e773d9e5cc76bbb997cc180c
parent06acf16cdb23dad19b9cf816a55df24d4084823c
Auto merge of #35168 - scottcarr:deaggregation, r=nikomatsakis

[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.
src/librustc_driver/driver.rs