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 1f29da6 commit 854b1f4Copy full SHA for 854b1f4
compiler/lib/global_deadcode.ml
@@ -246,6 +246,15 @@ let liveness prog pure_funs (global_info : Global_flow.info) =
246
| Stop | Branch _ | Poptrap _ | Pushtrap _ -> ()
247
in
248
Addr.Map.iter (fun _ block -> live_block block) prog.blocks;
249
+ Code.traverse
250
+ { Code.fold = Code.fold_children }
251
+ (fun pc () ->
252
+ match Addr.Map.find pc prog.blocks with
253
+ | { branch = Return x, _; _ } -> add_top x
254
+ | _ -> ())
255
+ prog.start
256
+ prog.blocks
257
+ ();
258
live_vars
259
260
(* Returns the set of variables given a table of variables. *)
0 commit comments