Revision d50b0dc0
Added by Teme Kahsai almost 9 years ago
src/causality.ml  

28  28 
by duplication of some mem vars into local node vars. 
29  29 
Thus, cylic dependency errors may only arise between nomem vars. 
30  30 
nonmem variables are: 
31 
 inputs: not needed for causality/scheduling, needed only for detecting useless vars 

31 
 constants/inputs: not needed for causality/scheduling, needed only for detecting useless vars


32  32 
 read mems (fake vars): same remark as above. 
33  33 
 outputs: decoupled from mems, if necessary 
34  34 
 locals 
...  ...  
133  133 
let node_local_variables nd = 
134  134 
List.fold_left (fun locals v > ISet.add v.var_id locals) ISet.empty nd.node_locals 
135  135  
136 
let node_constant_variables nd = 

137 
List.fold_left (fun locals v > if v.var_dec_const then ISet.add v.var_id locals else locals) ISet.empty nd.node_locals 

138  
136  139 
let node_output_variables nd = 
137  140 
List.fold_left (fun outputs v > ISet.add v.var_id outputs) ISet.empty nd.node_outputs 
138  141  
...  ...  
533  536  
534  537 
let global_dependency node = 
535  538 
let mems = ExprDep.node_memory_variables node in 
536 
let inputs = ExprDep.node_input_variables node in 

539 
let inputs = 

540 
ISet.union 

541 
(ExprDep.node_input_variables node) 

542 
(ExprDep.node_constant_variables node) in 

537  543 
let outputs = ExprDep.node_output_variables node in 
538  544 
let node_vars = ExprDep.node_variables node in 
539  545 
let (g_non_mems, g_mems) = ExprDep.dependence_graph mems inputs node_vars node in 
Also available in: Unified diff
sync