aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-09-03 02:29:10 +0100
committerYann Herklotz <git@yannherklotz.com>2020-09-03 02:29:10 +0100
commit0caef68781a0e33368d2874286f72be17d6d3263 (patch)
treec2f1c9982b65f0d52b324af38d720449c2b15c87
parentf818b4d91ef39923ae0f0b0fb4bbd9fa919f47b0 (diff)
downloadvericert-kvx-0caef68781a0e33368d2874286f72be17d6d3263.tar.gz
vericert-kvx-0caef68781a0e33368d2874286f72be17d6d3263.zip
Scheduling added to partitioning
-rw-r--r--src/hls/Partition.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hls/Partition.ml b/src/hls/Partition.ml
index e0cacd1..d8e7ff7 100644
--- a/src/hls/Partition.ml
+++ b/src/hls/Partition.ml
@@ -61,13 +61,12 @@ let translate_cfi = function
let rec next_bblock_from_RTL is_start e (c : RTL.code) s i =
let succ = List.map (fun i -> (i, PTree.get i c)) (RTL.successors_instr i) in
let trans_inst = (translate_inst i, translate_cfi i) in
- printf "Current: %d\n" (P.to_int s);
match trans_inst, succ with
| (None, Some i'), _ ->
if List.exists (fun x -> x = s) (snd e) && not is_start then
Errors.OK { bb_body = []; bb_exit = Some (RBgoto s) }
else
- Errors.OK {bb_body = []; bb_exit = Some i'}
+ Errors.OK { bb_body = []; bb_exit = Some i' }
| (Some i', None), (s', Some i_n)::[] ->
if List.exists (fun x -> x = s) (fst e) then
Errors.OK { bb_body = [i']; bb_exit = Some (RBgoto s') }
@@ -118,7 +117,7 @@ let function_from_RTL f =
fn_stacksize = f.RTL.fn_stacksize;
fn_params = f.RTL.fn_params;
fn_entrypoint = f.RTL.fn_entrypoint;
- fn_code = c
+ fn_code = Schedule.schedule f.RTL.fn_entrypoint c
}
let partition = function_from_RTL