aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Linearizeaux.ml
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2020-03-06 16:20:22 +0100
committerCyril SIX <cyril.six@kalray.eu>2020-03-06 16:20:22 +0100
commit8300321b348a6b416a8e0498ecebf944697d0641 (patch)
tree6b9a189e7c92b42be85d1a95bb0e05b8c55084d2 /backend/Linearizeaux.ml
parent5eb64cdae7deeaef774fdead6f3ce6e4108a3256 (diff)
downloadcompcert-kvx-8300321b348a6b416a8e0498ecebf944697d0641.tar.gz
compcert-kvx-8300321b348a6b416a8e0498ecebf944697d0641.zip
Adding debug info in Linearizeaux
Diffstat (limited to 'backend/Linearizeaux.ml')
-rw-r--r--backend/Linearizeaux.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/Linearizeaux.ml b/backend/Linearizeaux.ml
index ce518dbb..b609b57a 100644
--- a/backend/Linearizeaux.ml
+++ b/backend/Linearizeaux.ml
@@ -367,6 +367,16 @@ let construct_depmap code entry fs =
depmap
end
+let print_sequence s =
+ Printf.printf "[";
+ List.iter (fun n -> Printf.printf "%d, " (P.to_int n)) s;
+ Printf.printf "]\n"
+
+let print_ssequence ofs =
+ Printf.printf "[";
+ List.iter (fun s -> print_sequence s) ofs;
+ Printf.printf "]\n"
+
let order_sequences code entry fs =
let fs_a = Array.of_list fs in
let depmap = construct_depmap code entry fs_a in
@@ -391,10 +401,12 @@ let order_sequences code entry fs =
!selected_id
end
in begin
+ print_ssequence fs;
while List.length !ordered_fs != List.length fs do
let next_id = select_next () in
evaluate next_id
done;
+ print_ssequence !ordered_fs;
!ordered_fs
end