aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Linearizeaux.ml
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2020-03-10 15:48:47 +0100
committerCyril SIX <cyril.six@kalray.eu>2020-03-10 15:48:47 +0100
commit530d30cf71661419f54e175dd6bdb7d3f68f7f5c (patch)
treeddbe0ce247f4ec4db1932dd55d1fbd5d7dc4ea9e /backend/Linearizeaux.ml
parenta7098538edfda9fdbd95bc7c6ba6e380811230fa (diff)
downloadcompcert-kvx-530d30cf71661419f54e175dd6bdb7d3f68f7f5c.tar.gz
compcert-kvx-530d30cf71661419f54e175dd6bdb7d3f68f7f5c.zip
Linearizeaux: dumb selector when cycling dependencies are found
Diffstat (limited to 'backend/Linearizeaux.ml')
-rw-r--r--backend/Linearizeaux.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/Linearizeaux.ml b/backend/Linearizeaux.ml
index 5bdeeb8f..a813ac96 100644
--- a/backend/Linearizeaux.ml
+++ b/backend/Linearizeaux.ml
@@ -429,10 +429,12 @@ let order_sequences code entry fs =
match !selected_id with
| Some id -> id
| None -> begin
- Printf.printf "original fs: "; print_ssequence fs;
- Printf.printf "depmap: "; print_depmap depmap;
- Printf.printf "current ordered fs: "; print_ssequence @@ List.rev (!ordered_fs);
- failwith "Could not find a next schedulable trace. Are the dependencies alright?"
+ Array.iteri (fun i deps ->
+ match !selected_id with
+ | None -> if not fs_evaluated.(i) then selected_id := Some i
+ | Some id -> ()
+ ) depmap;
+ get_some !selected_id
end
end
in begin