Reorganise optimisation level settings, and make the insn shrink pass optional (#1044)

This patch:

* removes the "default" opt level, on the basis that it has no definition and
  is referred to nowhere in the compiler.

* renames the "fastest" level to "none".  The resulting set of transformations
  is unchanged.

* renames the "best" level to "speed_and_size".  The resulting set of
  transformations is unchanged.

* adds a new level, "speed".  This is the same as "speed_and_size" except that
  it omits transformations aimed only at reducing code size.  Currently it
  omits only the insn shrinking pass.
This commit is contained in:
julian-seward1
2019-09-19 18:51:25 +02:00
committed by GitHub
parent 59139c6c46
commit 9e088e4164
27 changed files with 46 additions and 39 deletions

View File

@@ -162,7 +162,7 @@ impl SubTest for TestBinEmit {
recipe_constraints.satisfied(inst, &divert, &func)
});
if opt_level == OptLevel::Best {
if opt_level == OptLevel::SpeedAndSize {
// Get the smallest legal encoding
legal_encodings
.min_by_key(|&e| encinfo.byte_size(e, inst, &divert, &func))