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

@@ -1,6 +1,6 @@
; binary emission of 32-bit code.
test binemit
set opt_level=best
set opt_level=speed_and_size
set allones_funcaddrs
target i686 haswell

View File

@@ -1,6 +1,6 @@
; binary emission of 64-bit code.
test binemit
set opt_level=best
set opt_level=speed_and_size
set allones_funcaddrs
target x86_64 haswell

View File

@@ -1,5 +1,5 @@
test binemit
set opt_level=best
set opt_level=speed_and_size
target x86_64 baseline
; The binary encodings can be verified with the command:

View File

@@ -1,6 +1,6 @@
; binary emission of x86-32 code.
test binemit
set opt_level=best
set opt_level=speed_and_size
target i686 haswell
; The binary encodings can be verified with the command:

View File

@@ -1,6 +1,6 @@
; Binary emission of 64-bit floating point code.
test binemit
set opt_level=best
set opt_level=speed_and_size
target x86_64 haswell
; The binary encodings can be verified with the command:

View File

@@ -1,6 +1,6 @@
; binary emission of 64-bit code.
test binemit
set opt_level=best
set opt_level=speed_and_size
set is_pic
target x86_64 haswell

View File

@@ -1,6 +1,6 @@
; binary emission of x86-64 code.
test binemit
set opt_level=best
set opt_level=speed_and_size
target x86_64 haswell
; The binary encodings can be verified with the command:

View File

@@ -1,4 +1,5 @@
test compile
set opt_level=speed_and_size
target x86_64
function u0:0(i8) -> i8 fast {

View File

@@ -1,4 +1,5 @@
test compile
set opt_level=speed_and_size
target x86_64
feature !"basic-blocks"
; regex: V=v\d+

View File

@@ -1,6 +1,6 @@
; Test legalization of a non-colocated call in 64-bit non-PIC mode.
test legalizer
set opt_level=best
set opt_level=speed_and_size
target x86_64 haswell
function %call() {

View File

@@ -1,6 +1,6 @@
; Check that floating-point and integer constants equal to zero are optimized correctly.
test binemit
set opt_level=best
set opt_level=speed_and_size
target i686
function %foo() -> f32 fast {

View File

@@ -1,6 +1,6 @@
; Check that floating-point constants equal to zero are optimized correctly.
test binemit
set opt_level=best
set opt_level=speed_and_size
target x86_64
function %zero_const_32bit_no_rex() -> f32 fast {

View File

@@ -2,7 +2,7 @@ test compile
set enable_pinned_reg=true
set use_pinned_reg_as_heap_base=true
set opt_level=best
set opt_level=speed_and_size
target x86_64

View File

@@ -1,5 +1,5 @@
test compile
set opt_level=best
set opt_level=speed_and_size
set is_pic
target x86_64 haswell

View File

@@ -1,5 +1,5 @@
test binemit
set opt_level=best
set opt_level=speed_and_size
set avoid_div_traps
set baldrdash_prologue_words=3
set allones_funcaddrs

View File

@@ -1,5 +1,5 @@
test binemit
set opt_level=best
set opt_level=speed_and_size
set enable_simd
target x86_64

View File

@@ -1,5 +1,5 @@
test compile
set opt_level=best
set opt_level=speed_and_size
set probestack_enabled=false
set enable_simd
target x86_64

View File

@@ -1,5 +1,5 @@
test shrink
set opt_level=best
set opt_level=speed_and_size
target x86_64
function %test_multiple_uses(i32 [%rdi]) -> i32 {

View File

@@ -1,5 +1,5 @@
test binemit
set opt_level=best
set opt_level=speed_and_size
target x86_64
; Test that instruction shrinking eliminates REX prefixes when possible.

View File

@@ -1,6 +1,6 @@
; binary emission of stack address instructions on x86-64.
test binemit
set opt_level=fastest
set opt_level=none
target x86_64 haswell
; The binary encodings can be verified with the command:

View File

@@ -1,6 +1,6 @@
; legalization of stack load and store instructions on x86-64.
test legalizer
set opt_level=fastest
set opt_level=none
target x86_64 haswell
function %stack_load_and_store() {

View File

@@ -1,5 +1,5 @@
test binemit
set opt_level=best
set opt_level=speed_and_size
set enable_simd
target x86_64

View File

@@ -1,5 +1,5 @@
test compile
set opt_level=best
set opt_level=speed_and_size
set is_pic
target x86_64 haswell