aboutsummaryrefslogtreecommitdiffstats
path: root/scheduling/BTLScheduleraux.ml
diff options
context:
space:
mode:
authorLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2021-09-30 15:35:21 +0200
committerLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2021-09-30 15:35:21 +0200
commit5673d04d22334c2493efe5a2ff8108768e089be2 (patch)
tree00fc7f0de1f0e62b5857635135053ff029986e95 /scheduling/BTLScheduleraux.ml
parent1b87b2abead3751eb0564ac36030501a9cec748c (diff)
downloadcompcert-kvx-5673d04d22334c2493efe5a2ff8108768e089be2.tar.gz
compcert-kvx-5673d04d22334c2493efe5a2ff8108768e089be2.zip
fix issue #247 by using a BTL's ghostfield
Diffstat (limited to 'scheduling/BTLScheduleraux.ml')
-rw-r--r--scheduling/BTLScheduleraux.ml15
1 files changed, 11 insertions, 4 deletions
diff --git a/scheduling/BTLScheduleraux.ml b/scheduling/BTLScheduleraux.ml
index 0e682c4c..38bc685c 100644
--- a/scheduling/BTLScheduleraux.ml
+++ b/scheduling/BTLScheduleraux.ml
@@ -19,7 +19,7 @@ let flatten_blk_basics ibf =
last := Some ib;
[]
| Bseq ((Bcond (_, _, _, _, iinfo) as ib1), ib2) -> (
- match iinfo.pcond with
+ match iinfo.opt_info with
| Some _ -> [ ib1 ] @ traverse_blk ib2
| None ->
last := Some ib;
@@ -78,7 +78,8 @@ let apply_schedule bseq olast positions =
let set_old = Hashtbl.find cbs_above_old n' in
let set_new = Hashtbl.find cbs_above_new n' in
if SI.subset set_old set_new then
- bseq_new.(n') <- Bload (AST.TRAP, a, b, c, d, e)
+ if get_some @@ e.opt_info then
+ bseq_new.(n') <- Bload (AST.TRAP, a, b, c, d, e)
else assert !config.has_non_trapping_loads
| _ -> ())
bseq);
@@ -277,7 +278,13 @@ let turn_all_loads_nontrap n ibf btl =
let rec traverse_rec ib =
match ib with
| Bseq (ib1, ib2) -> Bseq (traverse_rec ib1, traverse_rec ib2)
- | Bload (t, a, b, c, d, e) -> Bload (AST.NOTRAP, a, b, c, d, e)
+ | Bload (t, a, b, c, d, e) ->
+ let _opt_info =
+ match t with
+ | AST.TRAP -> Some true
+ | AST.NOTRAP -> Some false in
+ e.opt_info <- _opt_info;
+ Bload (AST.NOTRAP, a, b, c, d, e)
| _ -> ib
in
let ib' = traverse_rec ibf.entry in
@@ -304,7 +311,7 @@ let compute_liveins n ibf btl =
iinfo.liveins <- Regset.union iinfo.liveins lives)
tbl
| Bcond (_, _, BF (Bgoto succ, _), Bnop None, iinfo) -> (
- match iinfo.pcond with
+ match iinfo.opt_info with
| Some predb ->
assert (predb = false);
let lives = (get_some @@ PTree.get succ btl).input_regs in