add a -Z flag to guarantee that MIR is generated for all functions #38217

Merged
merged 5 commits into from Dec 10, 2016

Projects

None yet

4 participants

@oli-obk
Contributor
oli-obk commented Dec 7, 2016

r? @eddyb

cc @solson

@eddyb eddyb was assigned by rust-highfive Dec 7, 2016
@eddyb
Member
eddyb commented Dec 7, 2016

Could this be -Z instead? To avoid it being insta-stable. LGTM otherwise.

@oli-obk oli-obk add a -Z flag to guarantee that MIR is generated for all functions 87a9ae2
@oli-obk
Contributor
oli-obk commented Dec 7, 2016

done

@eddyb eddyb changed the title from add a -C flag to guarantee that MIR is generated for all functions to add a -Z flag to guarantee that MIR is generated for all functions Dec 7, 2016
@eddyb
Member
eddyb commented Dec 7, 2016

@bors r+

@bors
Contributor
bors commented Dec 7, 2016

📌 Commit 87a9ae2 has been approved by eddyb

@eddyb
Member
eddyb commented Dec 8, 2016

@bors r-

oli-obk added some commits Dec 8, 2016
@oli-obk oli-obk also generate MIR for statics 9e158c5
@oli-obk oli-obk remove double negation in comment acfb06f
@oli-obk oli-obk enable checking for const fn without needing to go through `entry` 910c369
@oli-obk oli-obk move the check for instantiation from metadata encoding to the actual…
… decision site

before it was assumed that anything that had a MIR was fair game for local instatiation
d74d153
@oli-obk
Contributor
oli-obk commented Dec 9, 2016

This now produces a working compiler (stage2 is building right now) without the flag enabled. It also allows me to compile miri and all its dependencies with the flag enabled (not that there's any point, but I didn't want to wait for an entire compiler to build with the flag enabled). So this is basically working now. I know it has no tests yet. I promise I will write them on monday. Would it be possible to r+ this PR without the tests?

@solson
Member
solson commented Dec 9, 2016

I successfully built stage2 with the newest code in this PR and the flag hardcoded to true.

@eddyb
Member
eddyb commented Dec 10, 2016

@oli-obk Testing this seems tricky, probably impossible w/o writing a plugin.
@bors r+

@bors
Contributor
bors commented Dec 10, 2016

📌 Commit d74d153 has been approved by eddyb

@bors
Contributor
bors commented Dec 10, 2016

⌛️ Testing commit d74d153 with merge d53f39e...

@bors bors added a commit that referenced this pull request Dec 10, 2016
@bors bors Auto merge of #38217 - oli-obk:mir-for-all-and-all-for-mir, r=eddyb
add a -Z flag to guarantee that MIR is generated for all functions

r? @eddyb

cc @solson
d53f39e
@bors bors merged commit d74d153 into rust-lang:master Dec 10, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment