Skip to content

Fix split_default_wrapper which did not trigger anymore with flambda2 #970

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 1 commit into from
Nov 22, 2022
Merged
Changes from all commits
Commits
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
17 changes: 1 addition & 16 deletions ocaml/lambda/simplif.ml
Original file line number Diff line number Diff line change
Expand Up @@ -740,22 +740,7 @@ let split_default_wrapper ~id:fun_id ~kind ~params ~return ~body
| Llet(Strict, k, id,
(Lifthenelse(Lprim (Pisint _, [Lvar optparam], _), _, _, _) as def),
rest) when
(not (Clflags.is_flambda2 ()))
&& Ident.name optparam = "*opt*" && List.mem_assoc optparam params
&& not (List.mem_assoc optparam map)
->
let wrapper_body, inner = aux ((optparam, id) :: map) add_region rest in
Llet(Strict, k, id, def, wrapper_body), inner
| Llet(Strict, k, id,
(Lswitch(Lvar optparam,
{sw_numconsts = 1;
sw_consts = [_];
sw_numblocks = 1;
sw_blocks = [_];
sw_failaction = None}, _dbg, _)
as def), rest) when
Clflags.is_flambda2 ()
&& Ident.name optparam = "*opt*" && List.mem_assoc optparam params
Ident.name optparam = "*opt*" && List.mem_assoc optparam params
&& not (List.mem_assoc optparam map)
->
let wrapper_body, inner = aux ((optparam, id) :: map) add_region rest in
Expand Down