Skip to content

Commit 284889c

Browse files
authored
flambda-backend: Add flambda2 -O3 and -Oclassic CI jobs, third attempt (#1493)
1 parent ef161b9 commit 284889c

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

lambda/matching.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ let inline_lazy_force_cond arg pos loc =
19551955
ap_result_layout = Lambda.layout_lazy_contents;
19561956
ap_region_close = pos;
19571957
ap_mode = alloc_heap;
1958-
ap_inlined = Default_inlined;
1958+
ap_inlined = Never_inlined;
19591959
ap_specialised = Default_specialise;
19601960
ap_probe=None
19611961
},

testsuite/tests/backtrace/backtrace2.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
(* TEST
2+
* skip
3+
reason = "Backtraces are broken by the use of reraise"
24
flags = "-g"
35
ocamlrunparam += ",b=1"
46
*)

testsuite/tests/lib-obj/with_tag.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let allocs =
2525

2626
let () =
2727
assert (allocs (fun () -> Obj.with_tag 1 (Obj.repr (A ("hello", 10.)))) = 0);
28-
assert (allocs (fun () -> Obj.with_tag 1 (Obj.repr (ref 10))) = 2)
28+
assert (allocs (fun [@inline never] () -> Obj.with_tag 1 (Obj.repr (ref 10))) = 2)
2929

3030
let () =
3131
print_endline "ok"

testsuite/tests/misc/ephetest2.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ type env = {
7070
varephe_false : varephe Stack.t;
7171
}
7272

73-
let new_env () = {
73+
(* Uses opaque_identity to inhibit static allocation under flambda2 *)
74+
let new_env () = Sys.opaque_identity {
7475
vars = Hashtbl.create 100;
7576
ephes = Stack.create ();
7677
varephe_true = Stack.create ();

testsuite/tests/misc/ephetest2_new.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ type env = {
6767
varephe_false : varephe Stack.t;
6868
}
6969

70-
let new_env () = {
70+
(* Uses opaque_identity to inhibit static allocation under flambda2 *)
71+
let new_env () = Sys.opaque_identity {
7172
vars = Hashtbl.create 100;
7273
ephes = Stack.create ();
7374
varephe_true = Stack.create ();

testsuite/tests/typing-local/loop_regions.ml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ let nonloc_while_body () =
7171
[offset1; !offset_loop; offset2]
7272

7373
(* Local while condition should allocate in parent *)
74-
let loc_while_cond () =
74+
let[@inline never] loc_while_cond () =
7575
let offset_loop = ref (-1) in
7676
let offset1 = local_stack_offset () in
7777
while [%exclave] (
7878
let z = local_ (Some (Sys.opaque_identity 42)) in
7979
let _ = (opaque_local z) in
8080
offset_loop := local_stack_offset ();
81-
false
81+
Sys.opaque_identity false
8282
)
8383
do
8484
()
@@ -87,22 +87,21 @@ let loc_while_cond () =
8787
[offset1; !offset_loop; offset2]
8888

8989
(* Nonlocal while condition should allocate in its own region *)
90-
let nonloc_while_cond () =
90+
let[@inline never] nonloc_while_cond () =
9191
let offset_loop = ref (-1) in
9292
let offset1 = local_stack_offset () in
9393
while
9494
let z = local_ (Some (Sys.opaque_identity 42)) in
9595
let _ = (opaque_local z) in
9696
offset_loop := local_stack_offset ();
97-
false
97+
Sys.opaque_identity false
9898
do
9999
()
100100
done;
101101
let offset2 = local_stack_offset () in
102102
[offset1; !offset_loop; offset2]
103103

104-
105-
let loc_func () =
104+
let[@inline never] loc_func () =
106105
let offset_func = ref (-1) in
107106
let fun_exclave r =
108107
[%exclave] (
@@ -116,7 +115,7 @@ let loc_func () =
116115
[offset1; !offset_func; offset2]
117116

118117

119-
let nonloc_func () =
118+
let[@inline never] nonloc_func () =
120119
let offset_func = ref (-1) in
121120
let fun_nonexclave r =
122121
let z = local_ (Some (Sys.opaque_identity 42)) in

0 commit comments

Comments
 (0)