aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mppa_k1c/InstructionScheduler.ml4
-rw-r--r--mppa_k1c/PostpassSchedulingOracle.ml5
2 files changed, 6 insertions, 3 deletions
diff --git a/mppa_k1c/InstructionScheduler.ml b/mppa_k1c/InstructionScheduler.ml
index 1eba01d7..f9f99b1f 100644
--- a/mppa_k1c/InstructionScheduler.ml
+++ b/mppa_k1c/InstructionScheduler.ml
@@ -332,6 +332,8 @@ let dependency_check problem bundle index =
let rec make_bundle problem resources bundle index =
let resources_copy = Array.copy resources in
+ let nr_instructions = get_nr_instructions problem in
+ if (index >= nr_instructions) then (bundle, index+1) else
let inst_usage = problem.instruction_usages.(index) in
try match vector_less_equal inst_usage resources with
| false -> raise InvalidBundle
@@ -351,7 +353,7 @@ let rec make_bundles problem index : bundle list =
let bundles_to_schedule problem bundles : solution =
let nr_instructions = get_nr_instructions problem in
- let schedule = Array.make nr_instructions (-1) in
+ let schedule = Array.make (nr_instructions+1) (nr_instructions+4) in
let time = ref 0 in
List.iter (fun bundle ->
begin
diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml
index decb5722..bd804fd6 100644
--- a/mppa_k1c/PostpassSchedulingOracle.ml
+++ b/mppa_k1c/PostpassSchedulingOracle.ml
@@ -756,10 +756,11 @@ let print_bb oc bb =
let do_schedule bb =
let problem = build_problem bb
- in let solution = validated_scheduler
+ (* in let solution = validated_scheduler
(if !Clflags.option_fpostpass_ilp
then cascaded_scheduler
- else dumb_scheduler) problem
+ else dumb_scheduler) problem *)
+ in let solution = dumb_scheduler problem
in match solution with
| None -> failwith "Could not find a valid schedule"
| Some sol -> let bundles = bundlize_solution bb sol in