diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2020-03-25 16:49:46 +0100 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2020-03-25 16:50:40 +0100 |
commit | 36589dd043392d4d8672a82f24975371c102c286 (patch) | |
tree | c7af64f50b6063218716e9d16f0af6ec38696a22 /backend/Linearizeaux.ml | |
parent | ed399d8dcb3b41dfacf8257c22c608061503fd3d (diff) | |
download | compcert-kvx-36589dd043392d4d8672a82f24975371c102c286.tar.gz compcert-kvx-36589dd043392d4d8672a82f24975371c102c286.zip |
Linearize: Scheduling based on maxpc instead of dependencies
Diffstat (limited to 'backend/Linearizeaux.ml')
-rw-r--r-- | backend/Linearizeaux.ml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/backend/Linearizeaux.ml b/backend/Linearizeaux.ml index 3f207d9e..605a5db5 100644 --- a/backend/Linearizeaux.ml +++ b/backend/Linearizeaux.ml @@ -419,9 +419,13 @@ let order_sequences code entry fs = assert (not fs_evaluated.(s_id)); ordered_fs := fs_a.(s_id) :: !ordered_fs; fs_evaluated.(s_id) <- true; + (* Printf.printf "++++++\n"; + Printf.printf "Scheduling %d\n" s_id; + Printf.printf "Initial depmap: "; print_depmap depmap; *) Array.iteri (fun i deps -> depmap.(i) <- ISet.remove s_id deps - ) depmap + ) depmap; + (* Printf.printf "Final depmap: "; print_depmap depmap; *) end in let choose_best_of candidates = let current_best_id = ref None in @@ -451,8 +455,10 @@ let order_sequences code entry fs = begin Array.iteri (fun i deps -> begin - (* Printf.printf "Deps: "; print_iset deps; Printf.printf "\n"; *) - if (deps == ISet.empty && not fs_evaluated.(i)) then candidates := i :: !candidates + (* Printf.printf "Deps of %d: " i; print_iset deps; Printf.printf "\n"; *) + (* FIXME - if we keep it that way (no dependency check), remove all the unneeded stuff *) + if ((* deps == ISet.empty && *) not fs_evaluated.(i)) then + candidates := i :: !candidates end ) depmap; if not (List.length !candidates > 0) then begin |