Revision a1daa793 src/liveness.ml
src/liveness.ml  

81  81 
Disjunction.CISet.empty 
82  82 
node.node_locals 
83  83  
84 
let kill_instance_variables ctx inst = 

85 
IdentDepGraph.remove_vertex ctx.dep_graph inst 

86  
84  87 
let kill_root ctx head = 
85  88 
IdentDepGraph.iter_succ (IdentDepGraph.remove_edge ctx.dep_graph head.var_id) ctx.dep_graph head.var_id 
86  89  
...  ...  
89  92 
 [evaluated] is the set of already evaluated variables, 
90  93 
wrt the scheduling 
91  94 
 does only remove edges, not variables themselves 
95 
 yet, instance variables are removed 

92  96 
*) 
93  97 
let remove_roots ctx = 
94  98 
let rem = ref true in 
...  ...  
97  101 
do 
98  102 
rem := false; 
99  103 
let all_roots = graph_roots ctx.dep_graph in 
100 
let frontier_roots = Disjunction.CISet.filter (fun v > List.mem v.var_id all_roots) !remaining in 

101 
if not (Disjunction.CISet.is_empty frontier_roots) then 

104 
let inst_roots, var_roots = List.partition (fun v > ExprDep.is_instance_var v && v <> Causality.world) all_roots in 

105 
let frontier_roots = Disjunction.CISet.filter (fun v > List.mem v.var_id var_roots) !remaining in 

106 
if not (Disjunction.CISet.is_empty frontier_roots && inst_roots = []) then 

102  107 
begin 
103  108 
rem := true; 
109 
List.iter (kill_instance_variables ctx) inst_roots; 

104  110 
Disjunction.CISet.iter (kill_root ctx) frontier_roots; 
105  111 
remaining := Disjunction.CISet.diff !remaining frontier_roots 
106  112 
end 
Also available in: Unified diff