We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a564d26 commit f336bdaCopy full SHA for f336bda
compiler/core/lam_util.ml
@@ -45,6 +45,9 @@ let refine_let ~kind param (arg : Lam.t) (l : Lam.t) : Lam.t =
45
| Lam_primitive.Pmakeblock _ -> true
46
| _ -> false
47
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. *)
51
let is_alias_candidate (lam : Lam.t) =
52
match lam with
53
| Lvar _ | Lconst _ -> true
0 commit comments