aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Fasse <justus.fasse@etu.univ-grenoble-alpes.fr>2021-07-29 13:04:01 +0200
committerJustus Fasse <justus.fasse@etu.univ-grenoble-alpes.fr>2021-07-29 13:04:01 +0200
commit6b9bb0e4ba2c4ad842a6de3073978209349559bb (patch)
tree902eb2e1d88abacb1c3cd795aabc316c42e743ee
parentf88cafb5395dedc195dd6b8b4d14d9a2b393e1cc (diff)
downloadcompcert-kvx-6b9bb0e4ba2c4ad842a6de3073978209349559bb.tar.gz
compcert-kvx-6b9bb0e4ba2c4ad842a6de3073978209349559bb.zip
An Icond that sits at the end of a superblock may be a "side" exit
... if it has a prediction associated to it. If the prediction is None it cannot be a side exit.
-rw-r--r--scheduling/MyRTLpathScheduleraux.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/scheduling/MyRTLpathScheduleraux.ml b/scheduling/MyRTLpathScheduleraux.ml
index 0d5d87d1..beb6cbf8 100644
--- a/scheduling/MyRTLpathScheduleraux.ml
+++ b/scheduling/MyRTLpathScheduleraux.ml
@@ -117,11 +117,12 @@ let is_icond = function
| _ -> false
let side_exit_idxs sb code =
- let length = Array.length sb.instructions in
Array.to_list sb.instructions
|> List.map (fun pc -> get_some @@ PTree.get pc code)
|> List.mapi (fun i inst -> (i, inst))
- |> List.filter (fun (i, inst) -> is_icond inst && i <> length - 1)
+ |> List.filter (fun (_i, inst) -> is_icond inst
+ && RTLpathLivegenaux.predicted_successor inst
+ |> Option.is_some)
|> List.map (fun (i, _inst) -> i)
let side_exit_pcs sb code =