Skip to content
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

Fix a bug in slot_offsets when two separate sets of closures have a slot in common, but not all #2649

Merged
merged 1 commit into from
Jun 19, 2024
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
15 changes: 12 additions & 3 deletions middle_end/flambda2/simplify_shared/slot_offsets.ml
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,10 @@ end = struct
| None ->
create_function_slot set state get_code_metadata function_slot
code_id
| Some s -> s
| Some s ->
s.sets <- set :: s.sets;
update_set_for_slot s set;
s
in
update_metadata_for_function_slot set s)
closure_map;
Expand Down Expand Up @@ -893,14 +896,20 @@ end = struct
let s =
match Value_slot.Map.find_opt value_slot state.unboxed_slots with
| None -> create_unboxed_slot set state value_slot size
| Some s -> s
| Some s ->
s.sets <- set :: s.sets;
update_set_for_slot s set;
s
in
update_metadata_for_unboxed_slot set s
else
let s =
match Value_slot.Map.find_opt value_slot state.value_slots with
| None -> create_value_slot set state value_slot
| Some s -> s
| Some s ->
s.sets <- set :: s.sets;
update_set_for_slot s set;
s
in
update_metadata_for_value_slot set s)
env_map
Expand Down
Loading