diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-05-21 21:18:59 +0200 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-05-21 21:18:59 +0200 |
commit | 3e6844222d39b8a76bf0af20b9cbb0dfa2e35b5a (patch) | |
tree | abbb54fca752a15a190e66dcb902a42b0be97cd9 /scheduling/RTLtoBTLaux.ml | |
parent | 65247b67cbd469b9cd3bea22410bd11af450696c (diff) | |
download | compcert-kvx-3e6844222d39b8a76bf0af20b9cbb0dfa2e35b5a.tar.gz compcert-kvx-3e6844222d39b8a76bf0af20b9cbb0dfa2e35b5a.zip |
Now supporting Bnop insertion in conditions
Diffstat (limited to 'scheduling/RTLtoBTLaux.ml')
-rw-r--r-- | scheduling/RTLtoBTLaux.ml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scheduling/RTLtoBTLaux.ml b/scheduling/RTLtoBTLaux.ml index 43556150..4be2b180 100644 --- a/scheduling/RTLtoBTLaux.ml +++ b/scheduling/RTLtoBTLaux.ml @@ -2,9 +2,9 @@ open Maps open RTL open BTL open Registers -open DebugPrint open PrintBTL open AuxTools +open DebugPrint open BTLaux let undef_node = -1 @@ -20,13 +20,13 @@ let encaps_final inst osucc = | BF _ | Bcond _ -> inst | _ -> Bseq (inst, BF (Bgoto (get_some @@ osucc), def_iinfo)) -let translate_inst iinfo inst is_final = +let translate_inst (iinfo: BTL.inst_info) inst is_final = let osucc = ref None in let btli = match inst with | Inop s -> osucc := Some s; - Bnop iinfo + Bnop (Some iinfo) | Iop (op, lr, rd, s) -> osucc := Some s; Bop (op, lr, rd, iinfo) @@ -80,12 +80,13 @@ let translate_function code entry join_points = assert (s = ifnot); next_nodes := !next_nodes @ non_predicted_successors inst psucc; iinfo.pcond <- info; + Bseq ( Bcond ( cond, lr, BF (Bgoto ifso, def_iinfo), - build_btl_block s, - iinfo ) + Bnop None, + iinfo ), build_btl_block s) | _ -> Bseq (translate_inst iinfo inst false, build_btl_block s)) | None -> debug "BLOCK END.\n"; |