Skip to content

Commit

Permalink
guarded lambda traversal for specific clflag (ocaml#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keryan-dev committed Jun 18, 2021
1 parent 65779a7 commit af40273
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion middle_end/flambda/from_lambda/cps_conversion.ml
Expand Up @@ -1420,7 +1420,12 @@ and cps_function env ~fid ~stub
Closure_id.wrap (Compilation_unit.get_current_exn ())
(Variable.create_with_same_name_as_ident fid)
in
let contains_closures = contains_functions body in
let contains_closures =
(* only useful with this flag *)
if !Clflags.Flambda.Expert.fallback_inlining_heuristic
then contains_functions body
else false
in
let body = fun acc ccenv ->
cps_tail acc new_env ccenv body body_cont body_exn_cont
in
Expand Down

0 comments on commit af40273

Please sign in to comment.