aboutsummaryrefslogtreecommitdiffstats
path: root/src/hls/Partition.ml
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-03-22 16:43:22 +0000
committerYann Herklotz <git@yannherklotz.com>2022-03-22 16:43:22 +0000
commit2c33145e2de887964b68466d1691d0455d63334b (patch)
treeb3793f6327affff2a0c32735780ab177936da4c0 /src/hls/Partition.ml
parent533268faef6b566aba693234a9005172ffa8f494 (diff)
downloadvericert-2c33145e2de887964b68466d1691d0455d63334b.tar.gz
vericert-2c33145e2de887964b68466d1691d0455d63334b.zip
Add nops to partition generation
Diffstat (limited to 'src/hls/Partition.ml')
-rw-r--r--src/hls/Partition.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hls/Partition.ml b/src/hls/Partition.ml
index 19c6048..d7972e5 100644
--- a/src/hls/Partition.ml
+++ b/src/hls/Partition.ml
@@ -28,7 +28,7 @@ open Op
open RTLBlockInstr
open RTLBlock
-(* Assuming that the nodes of the CFG [code] are numbered in reverse postorder (cf. pass
+(** Assuming that the nodes of the CFG [code] are numbered in reverse postorder (cf. pass
[Renumber]), an edge from [n] to [s] is a normal edge if [s < n] and a back-edge otherwise. *)
let find_edge i n =
let succ = RTL.successors_instr i in
@@ -65,14 +65,14 @@ let rec next_bblock_from_RTL is_start e (c : RTL.code) s i =
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 = RBgoto s }
+ Errors.OK { bb_body = [RBnop]; bb_exit = RBgoto s }
else
- Errors.OK { bb_body = []; bb_exit = i' }
+ Errors.OK { bb_body = [RBnop]; bb_exit = 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 = RBgoto s' }
else if List.exists (fun x -> x = s) (snd e) && not is_start then
- Errors.OK { bb_body = []; bb_exit = RBgoto s }
+ Errors.OK { bb_body = [RBnop]; bb_exit = RBgoto s }
else begin
match next_bblock_from_RTL false e c s' i_n with
| Errors.OK bb ->