about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-04-11 18:36:12 -0400
committerGitHub <noreply@github.com>2017-04-11 18:36:12 -0400
commit4f6f4eb7c386b01dec8c0337a600365407ba6a56 (patch)
tree3c34d9a1d4bb22373d693f0c6e5749a0ea98eaa9 /src/rustllvm/RustWrapper.cpp
parentc58c928e658d2e45f816fd05796a964aa83759da (diff)
parente18c59fd48a8387767d44fdd4d36208dfd33f762 (diff)
downloadrust-4f6f4eb7c386b01dec8c0337a600365407ba6a56.tar.gz
rust-4f6f4eb7c386b01dec8c0337a600365407ba6a56.zip
Rollup merge of #40377 - camlorn:optimization_fuel, r=eddyb
Implement optimization fuel and re-enable struct field reordering

See [this discussion](https://internals.rust-lang.org/t/rolling-out-or-unrolling-struct-field-reorderings/4485) for background.

This pull request adds two new compilation options: `-Z print-fuel=crate` prints the optimization fuel used by a crate and `-Z fuel=crate=n` sets the optimization fuel for a crate.

It also turns field reordering back on.  There is no way to test this feature without something consuming fuel.  We can roll this back if we want, but then the optimization fuel bits will be dead code.

The one notable absence from this PR is a test case.  I'm not sure how to do one that's worth having.  The only thing I can think of to test is `-Z fuel=foo=0`.  The problem with other tests is that either (1) they're so big that future optimizations will apply, thus breaking them or (2) we don't know which order the optimizations will be applied in, so we can't guess the message that will be printed.  If someone has a useful proposal for a good test, I certainly want to add one.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions