Skip to content

Commit 6afb09c

Browse files
committed
Fix missing rewrite ids when unboxing detect invalid apply conts
In some cases (e.g. a do_not_unbox decision, followed by a decision that does unbox, and that discovers that some apply conts are invalids), it could happen that the set of rewrite ids known as being invalid was dropped/reset to empty. That together with the caching of the extra args computsion (done through the rewrite ids seen) meant that we could "forget" some rewrite ids.
1 parent a23ad0e commit 6afb09c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

middle_end/flambda2/simplify/unboxing/unbox_continuation_params.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let refine_decision_based_on_arg_types_at_uses ~pass ~rewrite_ids_seen
2222
~rewrites_ids_known_as_invalid nth_arg arg_type_by_use_id
2323
(decision : U.decision) =
2424
match decision with
25-
| Do_not_unbox _ as decision -> decision, Apply_cont_rewrite_id.Set.empty
25+
| Do_not_unbox _ as decision -> decision, rewrites_ids_known_as_invalid
2626
| Unbox _ as decision ->
2727
Apply_cont_rewrite_id.Map.fold
2828
(fun rewrite_id (arg_at_use : Continuation_uses.arg_at_use)

0 commit comments

Comments
 (0)