diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-06-22 11:57:06 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-06-22 11:57:06 +0200 |
commit | 6419d31749d57b4528b2f5f1e54336a141e4e169 (patch) | |
tree | b8a6ddff1f9dc0a75899bd644429a77c2354269a | |
parent | 5be8f955647e5becc5f53b04da2b1c408b6cd277 (diff) | |
download | compcert-kvx-6419d31749d57b4528b2f5f1e54336a141e4e169.tar.gz compcert-kvx-6419d31749d57b4528b2f5f1e54336a141e4e169.zip |
fix makespan computation
-rw-r--r-- | mppa_k1c/InstructionScheduler.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mppa_k1c/InstructionScheduler.ml b/mppa_k1c/InstructionScheduler.ml index c64628ff..e182804b 100644 --- a/mppa_k1c/InstructionScheduler.ml +++ b/mppa_k1c/InstructionScheduler.ml @@ -449,7 +449,9 @@ let schedule_reversed (scheduler : problem -> solution option) let nr_instructions = get_nr_instructions problem in let makespan = max_scheduled_time solution in let ret = Array.init (nr_instructions + 1) - (fun i -> makespan-solution.(nr_instructions-i)) in + (fun i -> makespan-solution.(nr_instructions-i)) in + ret.(nr_instructions) <- max ((max_scheduled_time ret) + 1) + (ret.(nr_instructions)); Some ret;; (** Schedule the problem using a greedy list scheduling algorithm, from the end. *) |