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.
32 lines
734 B
Plaintext
32 lines
734 B
Plaintext
test compile
|
|
set opt_level=speed_and_size
|
|
target x86_64
|
|
feature !"basic-blocks"
|
|
; regex: V=v\d+
|
|
; regex: EBB=ebb\d+
|
|
|
|
function u0:0(i64) system_v {
|
|
ss0 = explicit_slot 1
|
|
jt0 = jump_table [ebb1]
|
|
|
|
ebb0(v0: i64):
|
|
v1 = stack_addr.i64 ss0
|
|
v2 = load.i8 v1
|
|
br_table v2, ebb2, jt0
|
|
; check: $(oob=$V) = ifcmp_imm $(idx=$V), 1
|
|
; nextln: brif uge $oob, ebb2
|
|
; nextln: fallthrough $(inb=$EBB)
|
|
; check: $inb:
|
|
; nextln: $(final_idx=$V) = uextend.i64 $idx
|
|
; nextln: $(base=$V) = jump_table_base.i64 jt0
|
|
; nextln: $(rel_addr=$V) = jump_table_entry $final_idx, $base, 4, jt0
|
|
; nextln: $(addr=$V) = iadd $base, $rel_addr
|
|
; nextln: indirect_jump_table_br $addr, jt0
|
|
|
|
ebb2:
|
|
jump ebb1
|
|
|
|
ebb1:
|
|
return
|
|
}
|