File tree 2 files changed +10
-10
lines changed 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -253,15 +253,6 @@ let liveness prog pure_funs (global_info : Global_flow.info) =
253
253
| Stop | Branch _ | Poptrap _ | Pushtrap _ -> ()
254
254
in
255
255
Addr.Map. iter (fun _ block -> live_block block) prog.blocks;
256
- Code. traverse
257
- { Code. fold = Code. fold_children }
258
- (fun pc () ->
259
- match Addr.Map. find pc prog.blocks with
260
- | { branch = Return x , _ ; _ } -> add_top x
261
- | _ -> () )
262
- prog.start
263
- prog.blocks
264
- () ;
265
256
live_vars
266
257
267
258
(* Returns the set of variables given a table of variables. *)
Original file line number Diff line number Diff line change @@ -233,7 +233,16 @@ let expr_deps blocks st x e =
233
233
cont_deps blocks st cont
234
234
| Field (y , _ , _ ) -> add_dep st x y
235
235
236
- let program_deps st { blocks; _ } =
236
+ let program_deps st { start; blocks; _ } =
237
+ Code. traverse
238
+ { Code. fold = Code. fold_children }
239
+ (fun pc () ->
240
+ match Addr.Map. find pc blocks with
241
+ | { branch = Return x , _ ; _ } -> do_escape st Escape x
242
+ | _ -> () )
243
+ start
244
+ blocks
245
+ () ;
237
246
Addr.Map. iter
238
247
(fun _ block ->
239
248
List. iter block.body ~f: (fun (i , _ ) ->
You can’t perform that action at this time.
0 commit comments