This PR switches Cranelift over to the new register allocator, regalloc2. See [this document](https://gist.github.com/cfallin/08553421a91f150254fe878f67301801) for a summary of the design changes. This switchover has implications for core VCode/MachInst types and the lowering pass. Overall, this change brings improvements to both compile time and speed of generated code (runtime), as reported in #3942: ``` Benchmark Compilation (wallclock) Execution (wallclock) blake3-scalar 25% faster 28% faster blake3-simd no diff no diff meshoptimizer 19% faster 17% faster pulldown-cmark 17% faster no diff bz2 15% faster no diff SpiderMonkey, 21% faster 2% faster fib(30) clang.wasm 42% faster N/A ```
135 lines
2.0 KiB
Plaintext
135 lines
2.0 KiB
Plaintext
test compile precise-output
|
|
target s390x
|
|
|
|
function %atomic_store_i64(i64, i64) {
|
|
block0(v0: i64, v1: i64):
|
|
atomic_store.i64 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; stg %r2, 0(%r3)
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_i64_sym(i64) {
|
|
gv0 = symbol colocated %sym
|
|
block0(v0: i64):
|
|
v1 = symbol_value.i64 gv0
|
|
atomic_store.i64 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; stgrl %r2, %sym + 0
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_imm_i64(i64) {
|
|
block0(v0: i64):
|
|
v1 = iconst.i64 12345
|
|
atomic_store.i64 v1, v0
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; mvghi 0(%r2), 12345
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_i32(i32, i64) {
|
|
block0(v0: i32, v1: i64):
|
|
atomic_store.i32 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; st %r2, 0(%r3)
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_i32_sym(i32) {
|
|
gv0 = symbol colocated %sym
|
|
block0(v0: i32):
|
|
v1 = symbol_value.i64 gv0
|
|
atomic_store.i32 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; strl %r2, %sym + 0
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_imm_i32(i64) {
|
|
block0(v0: i64):
|
|
v1 = iconst.i32 12345
|
|
atomic_store.i32 v1, v0
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; mvhi 0(%r2), 12345
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_i16(i16, i64) {
|
|
block0(v0: i16, v1: i64):
|
|
atomic_store.i16 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; sth %r2, 0(%r3)
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_i16_sym(i16) {
|
|
gv0 = symbol colocated %sym
|
|
block0(v0: i16):
|
|
v1 = symbol_value.i64 gv0
|
|
atomic_store.i16 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; sthrl %r2, %sym + 0
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_imm_i16(i64) {
|
|
block0(v0: i64):
|
|
v1 = iconst.i16 12345
|
|
atomic_store.i16 v1, v0
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; mvhhi 0(%r2), 12345
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_i8(i8, i64) {
|
|
block0(v0: i8, v1: i64):
|
|
atomic_store.i8 v0, v1
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; stc %r2, 0(%r3)
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|
|
function %atomic_store_imm_i8(i64) {
|
|
block0(v0: i64):
|
|
v1 = iconst.i8 123
|
|
atomic_store.i8 v1, v0
|
|
return
|
|
}
|
|
|
|
; block0:
|
|
; mvi 0(%r2), 123
|
|
; bcr 14, 0
|
|
; br %r14
|
|
|