File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ module Domain : sig
42
42
43
43
val top : t
44
44
45
+ val live_block : t
46
+
45
47
val live_field : int -> t -> t
46
48
47
49
val join : t -> t -> t
@@ -74,6 +76,8 @@ end = struct
74
76
75
77
let depth_treshold = 4
76
78
79
+ let live_block = Live IntMap. empty
80
+
77
81
let live_field i l =
78
82
(* We need to limit the depth of the liveness information,
79
83
otherwise the information can get more and more precise without
@@ -385,11 +389,13 @@ let propagate defs scoped_live_vars ~state ~dep:y ~target:x ~action:usage_kind =
385
389
vars;
386
390
! live
387
391
| Expr (Field (_ , i , _ )) -> Domain. live_field i l
392
+ | Expr (Prim (IsInt, _ )) -> Domain. live_block
388
393
| _ -> Domain. top)
389
394
(* If y is top and y is a field access, x depends only on that field *)
390
395
| Top -> (
391
396
match Var.Tbl. get defs y with
392
397
| Expr (Field (_ , i , _ )) -> Domain. live_field i Domain. top
398
+ | Expr (Prim (IsInt, _ )) -> Domain. live_block
393
399
| _ -> Domain. top))
394
400
(* If x is used as an argument for parameter y, then contribution is liveness of y *)
395
401
| Propagate { scope; src } ->
You can’t perform that action at this time.
0 commit comments