Project

General

Profile

« Previous | Next » 

Revision 7d62bf41

Added by Pierre-Loïc Garoche almost 5 years ago

Merged code

View differences:

src/scheduling.ml
15 15
open Graph
16 16
open Causality
17 17

  
18
type eq_schedule_t = ident list list
19
  
18 20
type schedule_report =
19 21
{
20 22
  (* the scheduled node *)
21 23
  node : node_desc;
22 24
  (* a schedule computed wrt the dependency graph *)
23
  schedule : ident list list;
25
  schedule : eq_schedule_t;
24 26
  (* the set of unused variables (no output or mem depends on them) *)
25 27
  unused_vars : ISet.t;
26 28
  (* the table mapping each local var to its in-degree *)
......
31 33
  (*reuse_table : (ident, var_decl) Hashtbl.t*)
32 34
}
33 35

  
36
type t = schedule_report IMap.t
37

  
38
let get_node_schedule node node_schs = Utils.IMap.find node.node_id node_schs
39

  
40
let fold_eq_schedule = List.fold_left
41
  
34 42
(* Topological sort with a priority for variables belonging in the same equation lhs.
35 43
   For variables still unrelated, standard compare is used to choose the minimal element.
36 44
   This priority is used since it helps a lot in factorizing generated code.

Also available in: Unified diff