Skip to content

Commit

Permalink
Revert "Upgrade regalloc2 to 0.9.4 (#9191)" (#9193)
Browse files Browse the repository at this point in the history
This reverts commit 098430f.
  • Loading branch information
elliottt committed Aug 31, 2024
1 parent 098430f commit 7081b8f
Show file tree
Hide file tree
Showing 52 changed files with 1,422 additions and 1,271 deletions.
15 changes: 12 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-arra

# Bytecode Alliance maintained dependencies:
# ---------------------------
regalloc2 = "0.9.4"
regalloc2 = "0.9.3"

# cap-std family:
target-lexicon = "0.12.16"
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/machinst/vcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ impl<I: VCodeInst> RegallocFunction for VCode<I> {

fn block_insns(&self, block: BlockIndex) -> InstRange {
let range = self.block_ranges.get(block.index());
InstRange::new(InsnIndex::new(range.start), InsnIndex::new(range.end))
InstRange::forward(InsnIndex::new(range.start), InsnIndex::new(range.end))
}

fn block_succs(&self, block: BlockIndex) -> &[BlockIndex] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ block0(v0: i64):
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; block0:
; load_ext_name x3, TestCase(%g)+0
; mov x0, x2
; load_ext_name x3, TestCase(%g)+0
; blr x3
; mov x2, x0
; ldp fp, lr, [sp], #16
Expand All @@ -76,11 +76,11 @@ block0(v0: i64):
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; block1: ; offset 0xc
; ldr x3, #0x14
; b #0x1c
; mov x0, x2
; ldr x3, #0x18
; b #0x20
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %g 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x0, x2
; blr x3
; mov x2, x0
; ldp x29, x30, [sp], #0x10
Expand Down
8 changes: 4 additions & 4 deletions cranelift/filetests/filetests/isa/aarch64/call-pauth.clif
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ block0(v0: i64):
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; block0:
; load_ext_name x3, TestCase(%g)+0
; mov x0, x2
; load_ext_name x3, TestCase(%g)+0
; blr x3
; mov x2, x0
; ldp fp, lr, [sp], #16
Expand All @@ -77,11 +77,11 @@ block0(v0: i64):
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; block1: ; offset 0xc
; ldr x3, #0x14
; b #0x1c
; mov x0, x2
; ldr x3, #0x18
; b #0x20
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %g 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x0, x2
; blr x3
; mov x2, x0
; ldp x29, x30, [sp], #0x10
Expand Down
80 changes: 40 additions & 40 deletions cranelift/filetests/filetests/isa/aarch64/call.clif
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ block0(v0: i64):
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; block0:
; mov x1, x0
; movz x2, #42
; load_ext_name x4, TestCase(%f11)+0
; mov x1, x0
; mov x0, x2
; blr x4
; ldp fp, lr, [sp], #16
Expand All @@ -542,12 +542,12 @@ block0(v0: i64):
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; block1: ; offset 0x8
; mov x1, x0
; mov x2, #0x2a
; ldr x4, #0x14
; b #0x1c
; ldr x4, #0x18
; b #0x20
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %f11 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x1, x0
; mov x0, x2
; blr x4
; ldp x29, x30, [sp], #0x10
Expand Down Expand Up @@ -583,9 +583,9 @@ block0(v0: i64):
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; block0:
; mov x2, x0
; movz x3, #42
; load_ext_name x4, TestCase(%f12)+0
; mov x2, x0
; mov x0, x3
; blr x4
; ldp fp, lr, [sp], #16
Expand All @@ -596,12 +596,12 @@ block0(v0: i64):
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; block1: ; offset 0x8
; mov x2, x0
; mov x3, #0x2a
; ldr x4, #0x14
; b #0x1c
; ldr x4, #0x18
; b #0x20
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %f12 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x2, x0
; mov x0, x3
; blr x4
; ldp x29, x30, [sp], #0x10
Expand Down Expand Up @@ -637,9 +637,9 @@ block0(v0: i64):
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; block0:
; mov x1, x0
; movz x2, #42
; load_ext_name x4, TestCase(%f13)+0
; mov x1, x0
; mov x0, x2
; blr x4
; ldp fp, lr, [sp], #16
Expand All @@ -650,12 +650,12 @@ block0(v0: i64):
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; block1: ; offset 0x8
; mov x1, x0
; mov x2, #0x2a
; ldr x4, #0x14
; b #0x1c
; ldr x4, #0x18
; b #0x20
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %f13 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x1, x0
; mov x0, x2
; blr x4
; ldp x29, x30, [sp], #0x10
Expand Down Expand Up @@ -698,12 +698,12 @@ block0(v0: i128, v1: i64):
; mov fp, sp
; sub sp, sp, #16
; block0:
; mov x6, x2
; str x0, [sp]
; str x1, [sp, #8]
; load_ext_name x8, TestCase(%f14)+0
; mov x4, x0
; str x1, [sp, #8]
; mov x5, x1
; mov x6, x2
; load_ext_name x8, TestCase(%f14)+0
; mov x2, x4
; mov x3, x5
; blr x8
Expand All @@ -717,15 +717,15 @@ block0(v0: i128, v1: i64):
; mov x29, sp
; sub sp, sp, #0x10
; block1: ; offset 0xc
; mov x6, x2
; stur x0, [sp]
; mov x4, x0
; stur x1, [sp, #8]
; ldr x8, #0x1c
; b #0x24
; mov x5, x1
; ldr x8, #0x28
; b #0x30
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %f14 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x4, x0
; mov x5, x1
; mov x6, x2
; mov x2, x4
; mov x3, x5
; blr x8
Expand Down Expand Up @@ -770,12 +770,12 @@ block0(v0: i128, v1: i64):
; mov fp, sp
; sub sp, sp, #16
; block0:
; mov x6, x2
; str x0, [sp]
; str x1, [sp, #8]
; load_ext_name x8, TestCase(%f15)+0
; mov x4, x0
; str x1, [sp, #8]
; mov x5, x1
; mov x6, x2
; load_ext_name x8, TestCase(%f15)+0
; mov x2, x4
; mov x3, x5
; blr x8
Expand All @@ -789,15 +789,15 @@ block0(v0: i128, v1: i64):
; mov x29, sp
; sub sp, sp, #0x10
; block1: ; offset 0xc
; mov x6, x2
; stur x0, [sp]
; mov x4, x0
; stur x1, [sp, #8]
; ldr x8, #0x1c
; b #0x24
; mov x5, x1
; ldr x8, #0x28
; b #0x30
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %f15 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x4, x0
; mov x5, x1
; mov x6, x2
; mov x2, x4
; mov x3, x5
; blr x8
Expand Down Expand Up @@ -836,8 +836,8 @@ block0(v0: i64):
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; block0:
; load_ext_name x3, TestCase(%g)+0
; mov x8, x0
; load_ext_name x3, TestCase(%g)+0
; blr x3
; ldp fp, lr, [sp], #16
; ret
Expand All @@ -847,11 +847,11 @@ block0(v0: i64):
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; block1: ; offset 0x8
; ldr x3, #0x10
; b #0x18
; mov x8, x0
; ldr x3, #0x14
; b #0x1c
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %g 0
; .byte 0x00, 0x00, 0x00, 0x00
; mov x8, x0
; blr x3
; ldp x29, x30, [sp], #0x10
; ret
Expand All @@ -867,30 +867,30 @@ block0(v0: i64):
; VCode:
; stp fp, lr, [sp, #-16]!
; mov fp, sp
; str x24, [sp, #-16]!
; str x23, [sp, #-16]!
; block0:
; mov x24, x8
; mov x23, x8
; load_ext_name x2, TestCase(%g)+0
; blr x2
; mov x8, x24
; ldr x24, [sp], #16
; mov x8, x23
; ldr x23, [sp], #16
; ldp fp, lr, [sp], #16
; ret
;
; Disassembled:
; block0: ; offset 0x0
; stp x29, x30, [sp, #-0x10]!
; mov x29, sp
; str x24, [sp, #-0x10]!
; str x23, [sp, #-0x10]!
; block1: ; offset 0xc
; mov x24, x8
; mov x23, x8
; ldr x2, #0x18
; b #0x20
; .byte 0x00, 0x00, 0x00, 0x00 ; reloc_external Abs8 %g 0
; .byte 0x00, 0x00, 0x00, 0x00
; blr x2
; mov x8, x24
; ldr x24, [sp], #0x10
; mov x8, x23
; ldr x23, [sp], #0x10
; ldp x29, x30, [sp], #0x10
; ret

Expand Down
12 changes: 6 additions & 6 deletions cranelift/filetests/filetests/isa/aarch64/fma.clif
Original file line number Diff line number Diff line change
Expand Up @@ -358,28 +358,28 @@ block0(v0: f32x4, v1: f32x4, v2: f32x4):

; VCode:
; block0:
; mov v31.16b, v1.16b
; movz w6, #7452
; movk w6, w6, #7966, LSL #16
; dup v17.4s, w6
; mov v31.16b, v1.16b
; mov v30.16b, v31.16b
; tbl v19.16b, { v30.16b, v31.16b }, v17.16b
; mov v22.16b, v0.16b
; mov v23.16b, v0.16b
; mov v0.16b, v2.16b
; fmla v0.4s, v0.4s, v22.4s, v19.4s
; fmla v0.4s, v0.4s, v23.4s, v19.4s
; ret
;
; Disassembled:
; block0: ; offset 0x0
; mov v31.16b, v1.16b
; mov w6, #0x1d1c
; movk w6, #0x1f1e, lsl #16
; dup v17.4s, w6
; mov v31.16b, v1.16b
; mov v30.16b, v31.16b
; tbl v19.16b, {v30.16b, v31.16b}, v17.16b
; mov v22.16b, v0.16b
; mov v23.16b, v0.16b
; mov v0.16b, v2.16b
; fmla v0.4s, v22.4s, v19.4s
; fmla v0.4s, v23.4s, v19.4s
; ret

function %f64x2_splat0(f64x2, f64x2, f64x2) -> f64x2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ block0:
; stp x19, x20, [sp, #-16]!
; sub sp, sp, #16
; block0:
; movz x3, #10
; str x3, [sp]
; movz x2, #10
; str x2, [sp]
; movz x3, #15
; movz x4, #20
; movz x5, #25
Expand Down Expand Up @@ -295,8 +295,8 @@ block0:
; stp x19, x20, [sp, #-0x10]!
; sub sp, sp, #0x10
; block1: ; offset 0x30
; mov x3, #0xa
; stur x3, [sp]
; mov x2, #0xa
; stur x2, [sp]
; mov x3, #0xf
; mov x4, #0x14
; mov x5, #0x19
Expand Down
Loading

0 comments on commit 7081b8f

Please sign in to comment.