Skip to content

Commit

Permalink
flambda-backend: Unrevert ocaml-flambda#1131 and fix a Cmm unboxing b…
Browse files Browse the repository at this point in the history
…ug (ocaml-flambda#1284)

* Revert "Revert "Make Selectgen treat region boundaries more precisely" (ocaml-flambda#1283)"

This reverts commit abd91a9.

* Fix bad interaction between Cmm unboxing and locals

Local regions should not count as "tail" for Cmm unboxing purposes.
  • Loading branch information
stedolan authored Apr 3, 2023
1 parent c4143c3 commit 8fe089e
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 155 deletions.
16 changes: 6 additions & 10 deletions asmcomp/cmm.ml
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,10 @@ let iter_shallow_tail f = function
f e1;
f e2;
true
| Cregion e ->
f e;
true
| Ctail e ->
f e;
true
| Cexit _ | Cop (Craise _, _, _) ->
true
| Cregion _
| Ctail _
| Cconst_int _
| Cconst_natint _
| Cconst_float _
Expand Down Expand Up @@ -314,12 +310,10 @@ let map_shallow_tail ?kind f = function
| Ctrywith(e1, id, e2, dbg, kind_before) ->
Ctrywith(f e1, id, f e2, dbg,
Option.value kind ~default:kind_before)
| Cregion e ->
Cregion(f e)
| Ctail e ->
Ctail(f e)
| Cexit _ | Cop (Craise _, _, _) as cmm ->
cmm
| Cregion _
| Ctail _
| Cconst_int _
| Cconst_natint _
| Cconst_float _
Expand All @@ -331,6 +325,8 @@ let map_shallow_tail ?kind f = function

let map_tail ?kind f =
let rec loop = function
| Cregion _
| Ctail _
| Cconst_int _
| Cconst_natint _
| Cconst_float _
Expand Down
Loading

0 comments on commit 8fe089e

Please sign in to comment.