Skip to content

Commit f336bda

Browse files
committed
Comment
1 parent a564d26 commit f336bda

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/core/lam_util.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ let refine_let ~kind param (arg : Lam.t) (l : Lam.t) : Lam.t =
4545
| Lam_primitive.Pmakeblock _ -> true
4646
| _ -> false
4747
in
48+
(* Helper for spotting RHS expressions that are safe to inline everywhere.
49+
These are the obviously pure shapes where substituting the original value
50+
cannot introduce extra work or side effects. *)
4851
let is_alias_candidate (lam : Lam.t) =
4952
match lam with
5053
| Lvar _ | Lconst _ -> true

0 commit comments

Comments
 (0)