Skip to content

128-bit SIMD vector primitive type #1499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 87 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
1ed1787
basic backend support for 128bit mach type
TheNumbat Jun 9, 2023
61ddd09
errors in arm64
TheNumbat Jun 9, 2023
03a30bf
rebase
TheNumbat Jun 12, 2023
060b3c3
rebase
TheNumbat Jun 13, 2023
7ea2fee
more errors on arm
TheNumbat Jun 13, 2023
1ac5460
rebase
TheNumbat Jun 14, 2023
ba82868
copy middle end changes to ocaml/
TheNumbat Jun 14, 2023
a550abc
Miscellaneous SIMD fixes and one terrible hack
mshinwell Jun 15, 2023
3e83174
integrate tests
TheNumbat Jun 15, 2023
1d4b4b3
fixes after rebase
TheNumbat Jun 15, 2023
22430d9
different register classes; linscan works
TheNumbat Jun 15, 2023
68b02cd
linscan didn't actually work
TheNumbat Jun 15, 2023
14e2247
fix mixed float/vec extcall
TheNumbat Jun 15, 2023
c311cf8
interference in linscan/irc allocators
TheNumbat Jun 16, 2023
6e386cb
Merge branch 'main' into main
TheNumbat Jun 16, 2023
aa0df1e
upstream allocator interference
TheNumbat Jun 16, 2023
642a2d2
arm build
TheNumbat Jun 16, 2023
5d15a9c
fix regalloc failures
TheNumbat Jun 20, 2023
6597a8b
format
TheNumbat Jun 20, 2023
de36940
add extcall test
TheNumbat Jun 20, 2023
1cd32cb
fix unboxed primitive args test
TheNumbat Jun 21, 2023
aec9acb
edits
TheNumbat Jun 21, 2023
87c007f
whitespace
TheNumbat Jun 21, 2023
e722670
actual fix
TheNumbat Jun 22, 2023
1a23793
add fail cases in ocaml/
TheNumbat Jun 23, 2023
e0f152e
bootstrap
TheNumbat Jun 23, 2023
d5d79e4
merge
TheNumbat Jun 23, 2023
7671337
move simd tests out of ocaml
TheNumbat Jun 23, 2023
e7e90dc
...
TheNumbat Jun 23, 2023
dc883fd
add simd dune tests
TheNumbat Jun 23, 2023
7fd59cf
fix linscan?
TheNumbat Jun 23, 2023
3289255
add more floats to simd test
TheNumbat Jun 23, 2023
a97dd4f
found missing case
TheNumbat Jun 27, 2023
bf4dc9c
fix static const kind
TheNumbat Jun 27, 2023
4e685f0
remove vec128 consts from upstream clambda
TheNumbat Jun 27, 2023
9502255
int64*int64 -> record
TheNumbat Jul 5, 2023
f12768e
address comments
TheNumbat Jul 5, 2023
c49a815
format
TheNumbat Jul 5, 2023
32292f3
merge
TheNumbat Jul 5, 2023
eddc182
back to one class
TheNumbat Jul 5, 2023
52ab32f
edits
TheNumbat Jul 5, 2023
ba608da
fix emit
TheNumbat Jul 5, 2023
e6aa4dd
reset configure changes
TheNumbat Jul 5, 2023
e5aa304
comment
TheNumbat Jul 5, 2023
0299966
xmm15f
TheNumbat Jul 5, 2023
f318fb7
remove class_of
TheNumbat Jul 5, 2023
4061d16
regalloc fixes
TheNumbat Jul 6, 2023
eb2efe7
whitespace/arm
TheNumbat Jul 6, 2023
19120e3
address middle end comments
TheNumbat Jul 6, 2023
77fb950
print vec128
TheNumbat Jul 6, 2023
18c7c17
oops
TheNumbat Jul 6, 2023
6fb9b7d
arm64 fix
TheNumbat Jul 6, 2023
d68365b
remove x87 fp regs
TheNumbat Jul 6, 2023
ca4e617
codeowners
TheNumbat Jul 6, 2023
2d370d1
preallocate phys regs
TheNumbat Jul 6, 2023
3278688
fmt
TheNumbat Jul 6, 2023
540ad8e
fix phys_reg id error
TheNumbat Jul 6, 2023
d0867d9
restore destroy v128 reg behavior
TheNumbat Jul 6, 2023
483ba78
fix probe handler spills
TheNumbat Jul 6, 2023
19fe68d
vec128 suffix
TheNumbat Jul 7, 2023
a43de38
comments
TheNumbat Jul 7, 2023
e8d3192
fmt
TheNumbat Jul 7, 2023
6d66ab0
disable simd register allocation by default
TheNumbat Jul 7, 2023
cc2ce09
fmt
TheNumbat Jul 7, 2023
c6b5096
unecessary check
TheNumbat Jul 7, 2023
eec8b62
add simd to upstream test
TheNumbat Jul 7, 2023
e333806
Merge branch 'ocaml-flambda:main' into main
TheNumbat Jul 7, 2023
6ef7047
preserve previous stack slot ordering
TheNumbat Jul 7, 2023
ad5f370
more edits
TheNumbat Jul 10, 2023
4b059cc
fix regalloc validator stack slot comparison
TheNumbat Jul 10, 2023
f393f5b
more robust fix
TheNumbat Jul 10, 2023
2fe4170
more consistent prints
TheNumbat Jul 10, 2023
bbc84cb
more refactoring
TheNumbat Jul 11, 2023
647416d
restore error message again
TheNumbat Jul 11, 2023
98d3be4
restage simd checks
TheNumbat Jul 11, 2023
f352a7c
delete unused x87 fp ops from amd64 backend
TheNumbat Jul 11, 2023
6ebabec
merge remove-x87
TheNumbat Jul 11, 2023
b7e376d
missed a merge conflict
TheNumbat Jul 11, 2023
8b1e567
delete arm64 class_of
TheNumbat Jul 11, 2023
19ca0a2
and duplicate arm64 phys_reg
TheNumbat Jul 11, 2023
22db95b
and restore printmach.loc
TheNumbat Jul 11, 2023
6aee950
Update backend/regalloc/regalloc_invariants.ml
TheNumbat Jul 12, 2023
ad350a2
final edits
TheNumbat Jul 12, 2023
b73e2c5
arm
TheNumbat Jul 12, 2023
b73c7b7
adjust emit.move
TheNumbat Jul 12, 2023
c60bd6b
merge
TheNumbat Jul 12, 2023
6649ebb
format
TheNumbat Jul 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ testsuite/flambda2-test-list @xclerc
tools/merge_archives.ml @mshinwell @xclerc
tools/merge_dot_a_files.sh @mshinwell @xclerc
tools/objinfo.ml @mshinwell @xclerc

testsuite/tests/unboxed-primitive-args @TheNumbat
tests/simd @TheNumbat
2 changes: 1 addition & 1 deletion backend/CSEgen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class cse_generic = object (self)
method class_of_operation op =
match op with
| Imove | Ispill | Ireload -> assert false (* treated specially *)
| Iconst_int _ | Iconst_float _ | Iconst_symbol _ -> Op_pure
| Iconst_int _ | Iconst_float _ | Iconst_symbol _ | Iconst_vec128 _ -> Op_pure
| Icall_ind | Icall_imm _ | Itailcall_ind | Itailcall_imm _
| Iextcall _ | Iprobe _ | Iopaque -> assert false (* treated specially *)
| Istackoffset _ -> Op_other
Expand Down
2 changes: 1 addition & 1 deletion backend/afl_instrument.ml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ and instrument = function
| Ctail e -> Ctail (instrument e)

(* these are base cases and have no logging *)
| Cconst_int _ | Cconst_natint _ | Cconst_float _
| Cconst_int _ | Cconst_natint _ | Cconst_float _ | Cconst_vec128 _
| Cconst_symbol _
| Cvar _ as c -> c

Expand Down
2 changes: 1 addition & 1 deletion backend/amd64/CSE.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ method! class_of_operation op =
| Icompf _
| Icsel _
| Ifloatofint | Iintoffloat | Ivalueofint | Iintofvalue
| Iconst_int _ | Iconst_float _ | Iconst_symbol _
| Iconst_int _ | Iconst_float _ | Iconst_symbol _ | Iconst_vec128 _
| Icall_ind | Icall_imm _ | Itailcall_ind | Itailcall_imm _ | Iextcall _
| Istackoffset _ | Iload _ | Istore _ | Ialloc _
| Iintop _ | Iintop_imm _ | Iintop_atomic _
Expand Down
9 changes: 9 additions & 0 deletions backend/amd64/arch.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ let prefetchwt1_support = ref false
(* Emit elf notes with trap handling information. *)
let trap_notes = ref true

(* Enables usage of vector registers. *)
let simd_regalloc_support = ref false

(* Machine-specific command-line options *)

let command_line_options =
Expand Down Expand Up @@ -59,6 +62,10 @@ let command_line_options =
" Emit .note.ocaml_eh section with trap handling information (default)";
"-fno-trap-notes", Arg.Clear trap_notes,
" Do not emit .note.ocaml_eh section with trap handling information";
"-fsimd", Arg.Set simd_regalloc_support,
" Enable register allocation for SIMD vectors";
"-fno-simd", Arg.Clear simd_regalloc_support,
" Disable register allocation for SIMD vectors (default)"
]

(* Specific operations for the AMD64 processor *)
Expand Down Expand Up @@ -130,6 +137,8 @@ let size_addr = 8
let size_int = 8
let size_float = 8

let size_vec128 = 16

let allow_unaligned_access = true

(* Behavior of division *)
Expand Down
Loading