Skip to content

Commit 0052ebb

Browse files
committed
Squashed commit of the following:
commit d1acc48 Author: Jacob Van Buren <[email protected]> Date: Thu Jan 2 14:53:51 2025 -0500 Squashed commit of the following: commit c9d7aa6 Author: Jacob Van Buren <[email protected]> Date: Thu Jan 2 14:49:45 2025 -0500 cleaned up div/mod commit 4d9f427 Author: Jacob Van Buren <[email protected]> Date: Thu Jan 2 14:45:42 2025 -0500 address feedback and simplify division interface commit 625a416 Author: Jacob Van Buren <[email protected]> Date: Tue Dec 31 11:00:07 2024 -0500 unified unboxed field getters/setters. This will be useful once we have unboxed integers of different sizes commit 37b4e82 Author: Jacob Van Buren <[email protected]> Date: Tue Dec 31 09:40:53 2024 -0500 formatted commit 1746aa8 Author: Jacob Van Buren <[email protected]> Date: Mon Dec 30 11:37:33 2024 -0500 updated cmm_helpers interface to be more amenable to adding other integer sizes commit 9e7c322 Author: Greta Yorsh <[email protected]> Date: Tue Dec 31 12:01:21 2024 +0000 Separate test for vectorizer in the CI (#3414) * Separate test for vectorizer in the CI * Remove vectorizer from "gi" CI job commit e1a5fe4 Author: Xavier Clerc <[email protected]> Date: Tue Dec 31 10:54:43 2024 +0000 CI: simplify the regalloc jobs (#3389) commit ab229fc Author: Greta Yorsh <[email protected]> Date: Tue Dec 31 10:42:37 2024 +0000 ASR 64-bit lane not available in sse instruction (#3413) commit 8b99545 Author: Thomas Del Vecchio <[email protected]> Date: Mon Dec 30 14:26:48 2024 -0500 Fix case where parser drops attributes in packed module types. (#3262) * Demonstrate dropped attributes in test. Signed-off-by: Thomas Del Vecchio <[email protected]> * Syntax error on misplaced attribute in packed module types. Signed-off-by: Thomas Del Vecchio <[email protected]> --------- Signed-off-by: Thomas Del Vecchio <[email protected]> commit fe97beb Author: Aspen Smith <[email protected]> Date: Sat Dec 28 11:47:55 2024 -0500 Add attributes to (unsafely) skip jkind check (#3385) * Add attributes to (unsafely) skip jkind check Add a pair of attributes, [@@unsafe_allow_any_kind_in_intf] and [@@unsafe_allow_any_kind_in_impl], which if set on both the impl and the intf respectively, skip checking the jkind of the type in a signature against the jkind of the type in a struct entirely. This is a more-selective version of the `--allow-illegal-crossing` flag, and likely eventually subsumes it. Signed-off-by: Aspen Smith <[email protected]> * Emit a warning when unsafe_allow_any_kind is added unnecessarily Note that this is /only/ done if the attribute is set in both signatures but not used - also this is a little over-sensitive (sadly) since this is done during sigature inclusion too. A new test covers the over-sensitivity. Signed-off-by: Aspen Smith <[email protected]> --------- Signed-off-by: Aspen Smith <[email protected]> commit 862ced2 Author: dkalinichenko-js <[email protected]> Date: Thu Dec 26 15:20:06 2024 -0500 Add `Variant_with_null` and `Null` variant constructors (#2870) * `Variant_with_null` * `Null` tagged constructors * precise value kind * No private re-export --------- Co-authored-by: Diana Kalinichenko <[email protected]> commit 1eeed87 Author: Mark Shinwell <[email protected]> Date: Thu Dec 26 15:00:49 2024 +0000 Revert "Implement %makearray_dynamic{,_uninit}" (#3408) Revert "Implement %makearray_dynamic{,_uninit} (#3317)" This reverts commit 6da1dde. commit 2358e09 Author: Mark Shinwell <[email protected]> Date: Tue Dec 24 15:54:06 2024 +0000 Upload core files etc upon CI failure (#3405) commit dc6e300 Author: Xavier Clerc <[email protected]> Date: Tue Dec 24 10:06:20 2024 +0100 Fix IRC and Greedy allocators (arm64) (#3388) commit 65c0596 Author: Max Slater <[email protected]> Date: Mon Dec 23 16:49:37 2024 -0500 Convert float32 constants to int32 in first stage compiler (#3371) * convert float32 constants in bytecode output * edit * edit * blocks + test * compare against float64 constants * tests check proper custom ops --------- Co-authored-by: Diana Kalinichenko <[email protected]>
1 parent a7b1f51 commit 0052ebb

File tree

101 files changed

+1102
-12915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1102
-12915
lines changed

.github/workflows/build.yml

+63-10
Original file line numberDiff line numberDiff line change
@@ -78,39 +78,57 @@ jobs:
7878
config: --enable-middle-end=flambda2 --disable-warn-error
7979
os: macos-latest
8080

81+
- name: flambda2_macos_arm64_irc
82+
config: --enable-middle-end=flambda2 --disable-warn-error
83+
os: macos-latest
84+
build_ocamlparam: '_,w=-46,regalloc=irc'
85+
ocamlparam: '_,w=-46,regalloc=irc'
86+
87+
- name: flambda2_macos_arm64_ls
88+
config: --enable-middle-end=flambda2 --disable-warn-error
89+
os: macos-latest
90+
build_ocamlparam: '_,w=-46,regalloc=ls'
91+
ocamlparam: '_,w=-46,regalloc=ls'
92+
93+
- name: flambda2_macos_arm64_gi
94+
config: --enable-middle-end=flambda2 --disable-warn-error
95+
os: macos-latest
96+
build_ocamlparam: '_,w=-46,regalloc=gi'
97+
ocamlparam: '_,w=-46,regalloc=gi'
98+
8199
- name: irc
82100
config: --enable-middle-end=flambda2
83101
os: ubuntu-latest
84-
build_ocamlparam: '_,w=-46,regalloc=irc,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=IRC_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1'
85-
ocamlparam: '_,w=-46,regalloc=irc,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=IRC_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1'
102+
build_ocamlparam: '_,w=-46,regalloc=irc'
103+
ocamlparam: '_,w=-46,regalloc=irc'
86104
check_arch: true
87105

88106
- name: irc_polling
89107
config: --enable-middle-end=flambda2 --enable-poll-insertion
90108
os: ubuntu-latest
91-
build_ocamlparam: '_,w=-46,regalloc=irc,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=IRC_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1'
92-
ocamlparam: '_,w=-46,regalloc=irc,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=IRC_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1'
109+
build_ocamlparam: '_,w=-46,regalloc=irc'
110+
ocamlparam: '_,w=-46,regalloc=irc'
93111
check_arch: true
94112

95113
- name: irc_frame_pointers
96114
config: --enable-middle-end=flambda2 --enable-frame-pointers
97115
os: ubuntu-latest
98-
build_ocamlparam: '_,w=-46,regalloc=irc,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=IRC_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1'
99-
ocamlparam: '_,w=-46,regalloc=irc,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=IRC_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1'
116+
build_ocamlparam: '_,w=-46,regalloc=irc'
117+
ocamlparam: '_,w=-46,regalloc=irc'
100118
check_arch: true
101119

102120
- name: ls
103121
config: --enable-middle-end=flambda2
104122
os: ubuntu-latest
105-
build_ocamlparam: '_,w=-46,regalloc=ls,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=LS_ORDER:layout,regalloc-validate=1'
106-
ocamlparam: '_,w=-46,regalloc=ls,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=LS_ORDER:layout,regalloc-validate=1'
123+
build_ocamlparam: '_,w=-46,regalloc=ls'
124+
ocamlparam: '_,w=-46,regalloc=ls'
107125
check_arch: true
108126

109127
- name: gi
110128
config: --enable-middle-end=flambda2
111129
os: ubuntu-latest
112-
build_ocamlparam: '_,w=-46,regalloc=gi,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=GI_PRIORITY_HEURISTICS:interval-length,regalloc-param=GI_SELECTION_HEURISTICS:first-available,regalloc-param=GI_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1,cfg-cse-optimize=1'
113-
ocamlparam: '_,w=-46,regalloc=gi,regalloc-param=SPLIT_LIVE_RANGES:on,regalloc-param=GI_PRIORITY_HEURISTICS:interval-length,regalloc-param=GI_SELECTION_HEURISTICS:first-available,regalloc-param=GI_SPILLING_HEURISTICS:flat-uses,regalloc-validate=1,cfg-cse-optimize=1'
130+
build_ocamlparam: '_,w=-46,regalloc=gi,cfg-cse-optimize=1'
131+
ocamlparam: '_,w=-46,regalloc=gi,cfg-cse-optimize=1'
114132
check_arch: true
115133

116134
- name: cfg-selection
@@ -120,6 +138,13 @@ jobs:
120138
ocamlparam: '_,w=-46,regalloc=cfg,cfg-cse-optimize=1,cfg-selection=1,cfg-zero-alloc-checker=1'
121139
check_arch: true
122140

141+
- name: vectorizer
142+
config: --enable-middle-end=flambda2
143+
os: ubuntu-latest
144+
build_ocamlparam: '_,w=-46,regalloc=cfg,vectorize=1'
145+
ocamlparam: '_,w=-46,regalloc=cfg,vectorize=1'
146+
check_arch: true
147+
123148
env:
124149
J: "3"
125150
run_testsuite: "true"
@@ -229,11 +254,20 @@ jobs:
229254
--with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune \
230255
${{ matrix.config }}
231256
257+
- name: Setup for saving core files (not for macOS at the moment)
258+
if: matrix.os != 'macos-latest'
259+
run: |
260+
sudo mkdir /cores
261+
sudo chmod 777 /cores
262+
# Core filenames will be of the form executable.pid.timestamp:
263+
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'
264+
232265
- name: Build, install and test Flambda backend
233266
working-directory: flambda_backend
234267
run: |
235268
if [ $run_testsuite = true ]; then target=ci; else target=compiler; fi
236269
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
270+
ulimit -c unlimited
237271
make $target \
238272
|| (if [ $expected_fail = true ]; then exit 0; else exit 1; fi);
239273
env:
@@ -247,6 +281,25 @@ jobs:
247281
if: matrix.check_arch == true
248282
run: |
249283
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make check_all_arches
284+
285+
- uses: actions/upload-artifact@v3
286+
if: ${{ failure() }} && matrix.os != 'macos-latest'
287+
with:
288+
name: cores
289+
path: /cores
290+
291+
- uses: actions/upload-artifact@v3
292+
if: ${{ failure() }} && matrix.os != 'macos-latest'
293+
with:
294+
name: _build
295+
path: $GITHUB_WORKSPACE/_build
296+
297+
- uses: actions/upload-artifact@v3
298+
if: ${{ failure() }} && matrix.os != 'macos-latest'
299+
with:
300+
name: _runtest
301+
path: $GITHUB_WORKSPACE/_runtest
302+
250303
concurrency:
251304
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
252305
cancel-in-progress: true

backend/amd64/simd_selection.ml

+7-6
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,14 @@ let vectorize_operation (width_type : Vectorize_utils.Width_in_bits.t)
589589
let sse_op =
590590
match width_type with
591591
| W128 -> assert false
592-
| W64 -> assert false
593-
| W32 -> SRA_i32
594-
| W16 -> SRA_i16
595-
| W8 -> assert false
592+
| W64 -> None
593+
| W32 -> Some SRA_i32
594+
| W16 -> Some SRA_i16
595+
| W8 -> None
596596
in
597-
Operation.Specific (Isimd (SSE2 sse_op))
598-
|> make_default ~arg_count ~res_count
597+
Option.bind sse_op (fun sse_op ->
598+
Operation.Specific (Isimd (SSE2 sse_op))
599+
|> make_default ~arg_count ~res_count)
599600
| Icomp (Isigned intcomp) -> (
600601
match intcomp with
601602
| Ceq ->

backend/cmm_builtins.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ let transl_builtin name args dbg typ_res =
512512
| "caml_unsigned_int64_mulh_unboxed" ->
513513
mulhi ~signed:false Unboxed_int64 args dbg
514514
| "caml_int32_unsigned_to_int_trunc_unboxed_to_untagged" ->
515-
Some (zero_extend ~bits:32 (one_arg name args) dbg)
515+
Some (zero_extend ~bits:32 ~dbg (one_arg name args))
516516
| "caml_csel_value" | "caml_csel_int_untagged" | "caml_csel_int64_unboxed"
517517
| "caml_csel_int32_unboxed" | "caml_csel_nativeint_unboxed" ->
518518
(* Unboxed float variant of csel intrinsic is not currently supported. It

0 commit comments

Comments
 (0)