Skip to content

Commit c308057

Browse files
Gburylthls
andauthored
Fix bug in lazy pattern matching (#3647)
* Add new primitives to create blocks for lazy values This adds a new primitive in Lambda and Flambda2 to create a block for a (not short-circuited) lazy value. These primitives allow to more systematically handle lazy blocks correctly, for instance with respect to the value-let-rec size computation, and in flambda to better ensure that we do not track block appromixations for lazy values (without relying on the frontend to insert opaque identities). * cleanup * Update code size of Make_lazy to match Make_block * Remove allocation mode from lazy primitives * Formatting --------- Co-authored-by: Vincent Laviron <[email protected]>
1 parent 8eb1c21 commit c308057

18 files changed

+144
-22
lines changed

bytecomp/bytegen.ml

+10-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ let preserve_tailcall_for_prim = function
153153
| Pget_header _
154154
| Pignore
155155
| Pgetglobal _ | Psetglobal _ | Pgetpredef _
156-
| Pmakeblock _ | Pmakefloatblock _ | Pmakeufloatblock _ | Pmakemixedblock _
156+
| Pmakeblock _ | Pmakefloatblock _ | Pmakeufloatblock _ | Pmakemixedblock _ | Pmakelazyblock _
157157
| Pfield _ | Pfield_computed _ | Psetfield _
158158
| Psetfield_computed _ | Pfloatfield _ | Psetfloatfield _ | Pduprecord _
159159
| Pufloatfield _ | Psetufloatfield _ | Pmixedfield _ | Psetmixedfield _
@@ -741,6 +741,7 @@ let comp_primitive stack_info p sz args =
741741
| Pmakefloatblock _
742742
| Pmakeufloatblock _
743743
| Pmakemixedblock _
744+
| Pmakelazyblock _
744745
| Pprobe_is_enabled _
745746
| Punbox_float _ | Pbox_float (_, _) | Punbox_int _ | Pbox_int _
746747
->
@@ -1137,6 +1138,14 @@ and comp_expr stack_info env exp sz cont =
11371138
let cont = add_pseudo_event loc !compunit_name cont in
11381139
comp_args stack_info env args sz
11391140
(Kmakeblock(List.length args, tag) :: cont)
1141+
| Lprim (Pmakelazyblock Lazy_tag, args, loc) ->
1142+
let cont = add_pseudo_event loc !compunit_name cont in
1143+
comp_args stack_info env args sz
1144+
(Kmakeblock(List.length args, Config.lazy_tag) :: cont)
1145+
| Lprim (Pmakelazyblock Forward_tag, args, loc) ->
1146+
let cont = add_pseudo_event loc !compunit_name cont in
1147+
comp_args stack_info env args sz
1148+
(Kmakeblock(List.length args, Obj.forward_tag) :: cont)
11401149
| Lprim(Pmake_unboxed_product _, args, loc) ->
11411150
let cont = add_pseudo_event loc !compunit_name cont in
11421151
comp_args stack_info env args sz

lambda/lambda.ml

+8-2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ type region_close =
124124
| Rc_nontail
125125
| Rc_close_at_apply
126126

127+
type lazy_block_tag =
128+
| Lazy_tag
129+
| Forward_tag
130+
127131
type primitive =
128132
| Pbytes_to_string
129133
| Pbytes_of_string
@@ -137,6 +141,7 @@ type primitive =
137141
| Pmakefloatblock of mutable_flag * locality_mode
138142
| Pmakeufloatblock of mutable_flag * locality_mode
139143
| Pmakemixedblock of int * mutable_flag * mixed_block_shape * locality_mode
144+
| Pmakelazyblock of lazy_block_tag
140145
| Pfield of int * immediate_or_pointer * field_read_semantics
141146
| Pfield_computed of field_read_semantics
142147
| Psetfield of int * immediate_or_pointer * initialization_or_assignment
@@ -1823,6 +1828,7 @@ let primitive_may_allocate : primitive -> locality_mode option = function
18231828
| Pmakefloatblock (_, m) -> Some m
18241829
| Pmakeufloatblock (_, m) -> Some m
18251830
| Pmakemixedblock (_, _, _, m) -> Some m
1831+
| Pmakelazyblock _ -> Some alloc_heap
18261832
| Pfield _ | Pfield_computed _ | Psetfield _ | Psetfield_computed _ -> None
18271833
| Pfloatfield (_, _, m) -> Some m
18281834
| Pufloatfield _ -> None
@@ -2056,7 +2062,7 @@ let primitive_can_raise prim =
20562062
| Pmakefloatblock _ | Pfield _ | Pfield_computed _ | Psetfield _
20572063
| Psetfield_computed _ | Pfloatfield _ | Psetfloatfield _ | Pduprecord _
20582064
| Pmakeufloatblock _ | Pufloatfield _ | Psetufloatfield _ | Psequand | Psequor
2059-
| Pmixedfield _ | Psetmixedfield _ | Pmakemixedblock _ | Pnot | Pnegint
2065+
| Pmixedfield _ | Psetmixedfield _ | Pmakemixedblock _ | Pmakelazyblock _ | Pnot | Pnegint
20602066
| Paddint | Psubint | Pmulint | Pandint | Porint | Pxorint | Plslint | Plsrint
20612067
| Pasrint | Pintcomp _ | Pcompare_ints | Pcompare_floats _ | Pcompare_bints _
20622068
| Poffsetint _ | Poffsetref _ | Pintoffloat _
@@ -2254,7 +2260,7 @@ let primitive_result_layout (p : primitive) =
22542260
-> layout_unit
22552261
| Pgetglobal _ | Psetglobal _ | Pgetpredef _ -> layout_module_field
22562262
| Pmakeblock _ | Pmakefloatblock _ | Pmakearray _ | Pmakearray_dynamic _
2257-
| Pduprecord _ | Pmakeufloatblock _ | Pmakemixedblock _
2263+
| Pduprecord _ | Pmakeufloatblock _ | Pmakemixedblock _ | Pmakelazyblock _
22582264
| Pduparray _ | Pbigarraydim _ | Pobj_dup -> layout_block
22592265
| Pfield _ | Pfield_computed _ -> layout_value_field
22602266
| Punboxed_product_field (field, layouts) -> (Array.of_list layouts).(field)

lambda/lambda.mli

+5
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ type region_close =
104104
tail call because the outer region needs to end there.)
105105
*)
106106

107+
type lazy_block_tag =
108+
| Lazy_tag
109+
| Forward_tag
110+
107111
(* CR layouts v5: When we add more blocks of non-scannable values, consider
108112
whether some of the primitives specific to ufloat records
109113
([Pmakeufloatblock], [Pufloatfield], and [Psetufloatfield]) can/should be
@@ -121,6 +125,7 @@ type primitive =
121125
| Pmakefloatblock of mutable_flag * locality_mode
122126
| Pmakeufloatblock of mutable_flag * locality_mode
123127
| Pmakemixedblock of int * mutable_flag * mixed_block_shape * locality_mode
128+
| Pmakelazyblock of lazy_block_tag
124129
| Pfield of int * immediate_or_pointer * field_read_semantics
125130
| Pfield_computed of field_read_semantics
126131
| Psetfield of int * immediate_or_pointer * initialization_or_assignment

lambda/printlambda.ml

+5
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ let primitive ppf = function
469469
| Pmakemixedblock (tag, Mutable, abs, mode) ->
470470
fprintf ppf "make%amixedblock %i Mutable%a"
471471
locality_mode mode tag (mixed_block_shape (fun _ _ -> ())) abs
472+
| Pmakelazyblock Lazy_tag ->
473+
fprintf ppf "makelazyblock"
474+
| Pmakelazyblock Forward_tag ->
475+
fprintf ppf "makeforwardblock"
472476
| Pfield (n, ptr, sem) ->
473477
let instr =
474478
match ptr, sem with
@@ -918,6 +922,7 @@ let name_of_primitive = function
918922
| Pmakefloatblock _ -> "Pmakefloatblock"
919923
| Pmakeufloatblock _ -> "Pmakeufloatblock"
920924
| Pmakemixedblock _ -> "Pmakemixedblock"
925+
| Pmakelazyblock _ -> "Pmakelazyblock"
921926
| Pfield _ -> "Pfield"
922927
| Pfield_computed _ -> "Pfield_computed"
923928
| Psetfield _ -> "Psetfield"

lambda/tmc.ml

+3
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,9 @@ let rec choice ctx t =
910910
| Punbox_int _ | Pbox_int _
911911
| Punbox_vector _ | Pbox_vector (_, _)
912912

913+
(* it doesn't seem worth it to support lazy blocks for tmc *)
914+
| Pmakelazyblock _
915+
913916
(* we don't handle array indices as destinations yet *)
914917
| (Pmakearray _ | Pduparray _ | Pmakearray_dynamic _)
915918

lambda/translcore.ml

+4-8
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,7 @@ and transl_exp0 ~in_new_scope ~scopes sort e =
10121012
(* We don't need to wrap with Popaque: this forward
10131013
block will never be shortcutted since it points to a float
10141014
and Config.flat_float_array is true. *)
1015-
Lprim(Pmakeblock(Obj.forward_tag, Immutable, None,
1016-
alloc_heap),
1015+
Lprim(Pmakelazyblock Forward_tag,
10171016
[transl_exp ~scopes Jkind.Sort.Const.for_lazy_body e],
10181017
of_location ~scopes e.exp_loc)
10191018
| `Identifier `Forward_value ->
@@ -1023,11 +1022,8 @@ and transl_exp0 ~in_new_scope ~scopes sort e =
10231022
optimisation in Flambda, but the concept of a mutable
10241023
block doesn't really match what is going on here. This
10251024
value may subsequently turn into an immediate... *)
1026-
Lprim (Popaque Lambda.layout_lazy,
1027-
[Lprim(Pmakeblock(Obj.forward_tag, Immutable, None,
1028-
alloc_heap),
1029-
[transl_exp ~scopes Jkind.Sort.Const.for_lazy_body e],
1030-
of_location ~scopes e.exp_loc)],
1025+
Lprim(Pmakelazyblock Forward_tag,
1026+
[transl_exp ~scopes Jkind.Sort.Const.for_lazy_body e],
10311027
of_location ~scopes e.exp_loc)
10321028
| `Identifier `Other ->
10331029
transl_exp ~scopes Jkind.Sort.Const.for_lazy_body e
@@ -1053,7 +1049,7 @@ and transl_exp0 ~in_new_scope ~scopes sort e =
10531049
Lambda.layout_lazy_contents
10541050
(transl_exp ~scopes Jkind.Sort.Const.for_lazy_body e))
10551051
in
1056-
Lprim(Pmakeblock(Config.lazy_tag, Mutable, None, alloc_heap), [fn],
1052+
Lprim(Pmakelazyblock Lazy_tag, [fn],
10571053
of_location ~scopes e.exp_loc)
10581054
end
10591055
| Texp_object (cs, meths) ->

lambda/translprim.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ let lambda_primitive_needs_event_after = function
19291929
| Parray_to_iarray | Parray_of_iarray
19301930
| Pignore | Psetglobal _
19311931
| Pgetglobal _ | Pgetpredef _ | Pmakeblock _ | Pmakefloatblock _
1932-
| Pmakeufloatblock _ | Pmakemixedblock _
1932+
| Pmakeufloatblock _ | Pmakemixedblock _ | Pmakelazyblock _
19331933
| Pmake_unboxed_product _ | Punboxed_product_field _
19341934
| Parray_element_size_in_bytes _
19351935
| Pfield _ | Pfield_computed _ | Psetfield _

lambda/value_rec_compiler.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ let compute_static_size lam =
245245
| Record_inlined (_, _, (Variant_unboxed | Variant_with_null)) ->
246246
Misc.fatal_error "size_of_primitive"
247247
end
248-
| Pmakeblock _ ->
248+
| Pmakeblock _ | Pmakelazyblock _ ->
249249
(* The block shape is unfortunately an option, so we rely on the
250250
number of arguments instead.
251251
Note that flat float arrays/records use Pmakearray, so we don't need

middle_end/flambda2/from_lambda/closure_conversion.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,8 @@ let close_primitive acc env ~let_bound_ids_with_kinds named
10531053
| Patomic_fetch_add | Patomic_add | Patomic_sub | Patomic_land
10541054
| Patomic_lor | Patomic_lxor | Pdls_get | Ppoll | Patomic_load _
10551055
| Patomic_set _ | Preinterpret_tagged_int63_as_unboxed_int64
1056-
| Preinterpret_unboxed_int64_as_tagged_int63 | Ppeek _ | Ppoke _ ->
1056+
| Preinterpret_unboxed_int64_as_tagged_int63 | Ppeek _ | Ppoke _
1057+
| Pmakelazyblock _ ->
10571058
(* Inconsistent with outer match *)
10581059
assert false
10591060
in

middle_end/flambda2/from_lambda/lambda_to_flambda_primitives.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,7 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
13751375
let shape = convert_block_shape shape ~num_fields:(List.length args) in
13761376
let mutability = Mutability.from_lambda mutability in
13771377
[Variadic (Make_block (Values (tag, shape), mutability, mode), args)]
1378+
| Pmakelazyblock lazy_tag, [[arg]] -> [Unary (Make_lazy lazy_tag, arg)]
13781379
| Pmake_unboxed_product layouts, _ ->
13791380
(* CR mshinwell: this should check the unarized lengths of [layouts] and
13801381
[args] (like [Parray_element_size_in_bytes] below) *)
@@ -2485,7 +2486,7 @@ let convert_lprim ~big_endian (prim : L.primitive) (args : Simple.t list list)
24852486
| Pufloatfield _ | Patomic_load _ | Pmixedfield _
24862487
| Preinterpret_unboxed_int64_as_tagged_int63
24872488
| Preinterpret_tagged_int63_as_unboxed_int64
2488-
| Parray_element_size_in_bytes _ | Ppeek _ ),
2489+
| Parray_element_size_in_bytes _ | Ppeek _ | Pmakelazyblock _ ),
24892490
([] | _ :: _ :: _ | [([] | _ :: _ :: _)]) ) ->
24902491
Misc.fatal_errorf
24912492
"Closure_conversion.convert_primitive: Wrong arity for unary primitive \

middle_end/flambda2/parser/flambda_to_fexpr.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ let unop env (op : Flambda_primitive.unary_primitive) : Fexpr.unop =
582582
| Boolean_not -> Boolean_not
583583
| Int_as_pointer _ | Duplicate_block _ | Duplicate_array _ | Bigarray_length _
584584
| Float_arith _ | Reinterpret_64_bit_word _ | Is_boxed_float | Obj_dup
585-
| Get_header | Atomic_load _ | Peek _ ->
585+
| Get_header | Atomic_load _ | Peek _ | Make_lazy _ ->
586586
Misc.fatal_errorf "TODO: Unary primitive: %a"
587587
Flambda_primitive.Without_args.print
588588
(Flambda_primitive.Without_args.Unary op)

middle_end/flambda2/simplify/simplify_unary_primitive.ml

+7
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,12 @@ let simplify_mutable_block_load _access_kind ~field:_ ~original_prim dacc
888888
(P.result_kind' original_prim)
889889
~original_term
890890

891+
let simplify_lazy ~original_prim dacc ~original_term ~arg:_ ~arg_ty:_
892+
~result_var =
893+
SPR.create_unknown dacc ~result_var
894+
(P.result_kind' original_prim)
895+
~original_term
896+
891897
(* CR layouts v3: implement a real simplifier. *)
892898
let simplify_is_null dacc ~original_term ~arg:scrutinee ~arg_ty:scrutinee_ty
893899
~result_var =
@@ -962,5 +968,6 @@ let simplify_unary_primitive dacc original_prim (prim : P.unary_primitive) ~arg
962968
| Atomic_load block_access_field_kind ->
963969
simplify_atomic_load block_access_field_kind ~original_prim
964970
| Peek _ -> simplify_peek ~original_prim
971+
| Make_lazy _ -> simplify_lazy ~original_prim
965972
in
966973
simplifier dacc ~original_term ~arg ~arg_ty ~result_var

middle_end/flambda2/terms/code_size.ml

+1
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ let unary_prim_size prim =
380380
| Obj_dup -> needs_caml_c_call_extcall_size + 1
381381
| Get_header -> 2
382382
| Atomic_load _ | Peek _ -> 1
383+
| Make_lazy _ -> alloc_size + 1
383384

384385
let binary_prim_size prim =
385386
match (prim : Flambda_primitive.binary_primitive) with

middle_end/flambda2/terms/flambda_primitive.ml

+41-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@ type classification_for_printing =
2525
| Destructive
2626
| Neither
2727

28+
module Lazy_block_tag = struct
29+
type t = Lambda.lazy_block_tag =
30+
| Lazy_tag
31+
| Forward_tag
32+
33+
let print ppf t =
34+
match t with
35+
| Lazy_tag -> Format.fprintf ppf "Lazy_block"
36+
| Forward_tag -> Format.fprintf ppf "Forward_block"
37+
38+
let compare t1 t2 =
39+
match t1, t2 with
40+
| Lazy_tag, Lazy_tag | Forward_tag, Forward_tag -> 0
41+
| Lazy_tag, Forward_tag -> -1
42+
| Forward_tag, Lazy_tag -> 1
43+
44+
let to_tag t =
45+
match t with Lazy_tag -> Tag.lazy_tag | Forward_tag -> Tag.forward_tag
46+
end
47+
2848
module Block_kind = struct
2949
type t =
3050
| Values of Tag.Scannable.t * K.With_subkind.t list
@@ -57,7 +77,7 @@ module Block_kind = struct
5777
@[<hov 1>(shape@ @[<hov 1>(%a)@])@])@]"
5878
Tag.Scannable.print tag
5979
(Format.pp_print_list ~pp_sep:Format.pp_print_space
60-
K.print) (Array.to_list (K.Mixed_block_shape.field_kinds shape))
80+
K.print) (Array.to_list (K.Mixed_block_shape.field_kinds shape))
6181

6282
let compare t1 t2 =
6383
match t1, t2 with
@@ -1060,6 +1080,7 @@ type unary_primitive =
10601080
| Get_header
10611081
| Atomic_load of Block_access_field_kind.t
10621082
| Peek of Flambda_kind.Standard_int_or_float.t
1083+
| Make_lazy of Lazy_block_tag.t
10631084

10641085
(* Here and below, operations that are genuine projections shouldn't be eligible
10651086
for CSE, since we deal with projections through types. *)
@@ -1091,7 +1112,9 @@ let unary_primitive_eligible_for_cse p ~arg =
10911112
Simple.is_var arg
10921113
| Project_function_slot _ | Project_value_slot _ -> false
10931114
| Is_boxed_float | Is_flat_float_array -> true
1094-
| End_region _ | End_try_region _ | Obj_dup | Atomic_load _ | Peek _ -> false
1115+
| End_region _ | End_try_region _ | Obj_dup | Atomic_load _ | Peek _
1116+
| Make_lazy _ ->
1117+
false
10951118

10961119
let compare_unary_primitive p1 p2 =
10971120
let unary_primitive_numbering p =
@@ -1126,6 +1149,7 @@ let compare_unary_primitive p1 p2 =
11261149
| Atomic_load _ -> 27
11271150
| Is_null -> 28
11281151
| Peek _ -> 29
1152+
| Make_lazy _ -> 30
11291153
in
11301154
match p1, p2 with
11311155
| ( Block_load { kind = kind1; mut = mut1; field = field1 },
@@ -1212,14 +1236,16 @@ let compare_unary_primitive p1 p2 =
12121236
Bool.compare ghost1 ghost2
12131237
| Peek kind1, Peek kind2 ->
12141238
Flambda_kind.Standard_int_or_float.compare kind1 kind2
1239+
| Make_lazy lazy_tag1, Make_lazy lazy_tag2 ->
1240+
Lazy_block_tag.compare lazy_tag1 lazy_tag2
12151241
| ( ( Block_load _ | Duplicate_array _ | Duplicate_block _ | Is_int _
12161242
| Is_null | Get_tag | String_length _ | Int_as_pointer _
12171243
| Opaque_identity _ | Int_arith _ | Num_conv _ | Boolean_not
12181244
| Reinterpret_64_bit_word _ | Float_arith _ | Array_length _
12191245
| Bigarray_length _ | Unbox_number _ | Box_number _ | Untag_immediate
12201246
| Tag_immediate | Project_function_slot _ | Project_value_slot _
12211247
| Is_boxed_float | Is_flat_float_array | End_region _ | End_try_region _
1222-
| Obj_dup | Get_header | Atomic_load _ | Peek _ ),
1248+
| Obj_dup | Get_header | Atomic_load _ | Peek _ | Make_lazy _ ),
12231249
_ ) ->
12241250
Stdlib.compare (unary_primitive_numbering p1) (unary_primitive_numbering p2)
12251251

@@ -1289,6 +1315,8 @@ let print_unary_primitive ppf p =
12891315
| Peek kind ->
12901316
fprintf ppf "@[(Peek@ %a)@]"
12911317
Flambda_kind.Standard_int_or_float.print_lowercase kind
1318+
| Make_lazy lazy_tag ->
1319+
fprintf ppf "@[<hov 1>(Make_lazy@ %a)@]" Lazy_block_tag.print lazy_tag
12921320

12931321
let arg_kind_of_unary_primitive p =
12941322
match p with
@@ -1324,6 +1352,7 @@ let arg_kind_of_unary_primitive p =
13241352
| Get_header -> K.value
13251353
| Atomic_load _ -> K.value
13261354
| Peek _ -> K.naked_nativeint
1355+
| Make_lazy _ -> K.value
13271356

13281357
let result_kind_of_unary_primitive p : result_kind =
13291358
match p with
@@ -1362,6 +1391,7 @@ let result_kind_of_unary_primitive p : result_kind =
13621391
| Get_header -> Singleton K.naked_nativeint
13631392
| Atomic_load _ -> Singleton K.value
13641393
| Peek kind -> Singleton (K.Standard_int_or_float.to_kind kind)
1394+
| Make_lazy _ -> Singleton K.value
13651395

13661396
let effects_and_coeffects_of_unary_primitive p : Effects_and_coeffects.t =
13671397
match p with
@@ -1453,6 +1483,7 @@ let effects_and_coeffects_of_unary_primitive p : Effects_and_coeffects.t =
14531483
| Atomic_load _ | Peek _ ->
14541484
(* For the moment, prevent [Peek] from being moved. *)
14551485
Arbitrary_effects, Has_coeffects, Strict
1486+
| Make_lazy _ -> Only_generative_effects Mutable, No_coeffects, Strict
14561487

14571488
let unary_classify_for_printing p =
14581489
match p with
@@ -1471,6 +1502,7 @@ let unary_classify_for_printing p =
14711502
| End_region _ | End_try_region _ -> Neither
14721503
| Get_header -> Neither
14731504
| Peek _ -> Neither
1505+
| Make_lazy _ -> Constructive
14741506

14751507
let free_names_unary_primitive p =
14761508
match p with
@@ -1493,7 +1525,8 @@ let free_names_unary_primitive p =
14931525
| Is_boxed_float | Is_flat_float_array | End_region _ | End_try_region _
14941526
| Obj_dup | Get_header
14951527
| Atomic_load (_ : Block_access_field_kind.t)
1496-
| Peek (_ : Flambda_kind.Standard_int_or_float.t) ->
1528+
| Peek (_ : Flambda_kind.Standard_int_or_float.t)
1529+
| Make_lazy _ ->
14971530
Name_occurrences.empty
14981531

14991532
let apply_renaming_unary_primitive p renaming =
@@ -1515,7 +1548,8 @@ let apply_renaming_unary_primitive p renaming =
15151548
| Is_boxed_float | Is_flat_float_array | End_region _ | End_try_region _
15161549
| Project_function_slot _ | Project_value_slot _ | Obj_dup | Get_header
15171550
| Atomic_load (_ : Block_access_field_kind.t)
1518-
| Peek (_ : Flambda_kind.Standard_int_or_float.t) ->
1551+
| Peek (_ : Flambda_kind.Standard_int_or_float.t)
1552+
| Make_lazy _ ->
15191553
p
15201554

15211555
let ids_for_export_unary_primitive p =
@@ -1529,7 +1563,8 @@ let ids_for_export_unary_primitive p =
15291563
| Is_boxed_float | Is_flat_float_array | End_region _ | End_try_region _
15301564
| Project_function_slot _ | Project_value_slot _ | Obj_dup | Get_header
15311565
| Atomic_load (_ : Block_access_field_kind.t)
1532-
| Peek (_ : Flambda_kind.Standard_int_or_float.t) ->
1566+
| Peek (_ : Flambda_kind.Standard_int_or_float.t)
1567+
| Make_lazy _ ->
15331568
Ids_for_export.empty
15341569

15351570
type binary_int_arith_op =

0 commit comments

Comments
 (0)