aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2020-07-15 17:34:46 +0200
committerCyril SIX <cyril.six@kalray.eu>2020-07-15 17:34:46 +0200
commit8cdafe0117cd13b347db4ee3910c2a61a454bc73 (patch)
treec0f938d93288324d3c1657deda88540f1b3b8ecc
parent9d0b7d4c1728b0a07c89ddd0a77e5385a183d6ff (diff)
downloadcompcert-kvx-8cdafe0117cd13b347db4ee3910c2a61a454bc73.tar.gz
compcert-kvx-8cdafe0117cd13b347db4ee3910c2a61a454bc73.zip
Fixed last instruction not having liveins
-rw-r--r--kvx/lib/RTLpathScheduleraux.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/kvx/lib/RTLpathScheduleraux.ml b/kvx/lib/RTLpathScheduleraux.ml
index 1e15effe..ac7238db 100644
--- a/kvx/lib/RTLpathScheduleraux.ml
+++ b/kvx/lib/RTLpathScheduleraux.ml
@@ -69,8 +69,14 @@ let get_superblocks code entry pm typing =
let liveins = ref (PTree.empty) in
let rec follow pc n =
let inst = get_some @@ PTree.get pc code in
- if (n == 0) then ([pc], successors_inst inst)
- else
+ if (n == 0) then begin
+ (match (non_predicted_successors inst) with
+ | [pcout] ->
+ let live = (get_some @@ PTree.get pcout pm).input_regs in
+ liveins := PTree.set pc live !liveins
+ | _ -> ());
+ ([pc], successors_inst inst)
+ end else
let nexts_from_exit = match (non_predicted_successors inst) with
| [pcout] ->
let live = (get_some @@ PTree.get pcout pm).input_regs in begin