diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-11-08 22:43:54 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-11-08 22:43:54 +0100 |
commit | bd04128b033c8a623cceca31de072053837ad888 (patch) | |
tree | e8bcc0c4d1057e160d097439899b7736f683beb6 /sched/scheduler.ml | |
parent | 7a651609a8f40e8040cffa92f9965df02b0f52cd (diff) | |
download | SystDigit-Projet-bd04128b033c8a623cceca31de072053837ad888.tar.gz SystDigit-Projet-bd04128b033c8a623cceca31de072053837ad888.zip |
More optimizations.
Diffstat (limited to 'sched/scheduler.ml')
-rw-r--r-- | sched/scheduler.ml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sched/scheduler.ml b/sched/scheduler.ml index 34ce3aa..d079f64 100644 --- a/sched/scheduler.ml +++ b/sched/scheduler.ml @@ -23,6 +23,25 @@ let read_exp eq = in aux eq +let read_exp_all eq = + let add_arg x l = match x with + | Avar(f) -> f::l + | Aconst(_) -> l + in + let aux = function + | Earg(x) -> add_arg x [] + | Ereg(i) -> [i] + | Enot(x) -> add_arg x [] + | Ebinop(_, x, y) -> add_arg x (add_arg y []) + | Emux(a, b, c) -> add_arg a (add_arg b (add_arg c [])) + | Erom(_, _, a) -> add_arg a [] + | Eram(_, _, a, b, c, d) -> add_arg a (add_arg b (add_arg c (add_arg d []))) + | Econcat(u, v) -> add_arg u (add_arg v []) + | Eslice(_, _, a) -> add_arg a [] + | Eselect(_, a) -> add_arg a [] + in + aux eq + let prog_eq_map p = List.fold_left (fun x (vn, eqn) -> Smap.add vn eqn x) |