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 39859c6 commit ec4317fCopy full SHA for ec4317f
compiler/lib/deadcode.ml
@@ -474,4 +474,13 @@ let f ({ blocks; _ } as p : Code.program) =
474
~updates:
475
(st.deleted_instrs + st.deleted_blocks + st.deleted_params + st.block_shortcut);
476
let p = remove_unused_blocks p in
477
+ if stats ()
478
+ then (
479
+ let live = ref 0 in
480
+ Array.iter st.live ~f:(function
481
+ | 0 -> ()
482
+ | _ -> incr live);
483
+ let total = Var.count () in
484
+ let ratio = float !live /. float total *. 100. in
485
+ Format.eprintf "Stats - live variables: %d/%d = %.1f%%@." !live total ratio);
486
p, st.live
0 commit comments