diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-03-23 09:50:55 +0100 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-03-23 09:50:55 +0100 |
commit | ca78138a8a81af44a36e339ad1ecf86ca3862e50 (patch) | |
tree | df4bc0d4bf4dea5e16ad64b3c72c352b9db573d0 /riscV | |
parent | 21d43bc4e129baf7ca31d3293dddb3a23e4ca5d9 (diff) | |
download | compcert-kvx-ca78138a8a81af44a36e339ad1ecf86ca3862e50.tar.gz compcert-kvx-ca78138a8a81af44a36e339ad1ecf86ca3862e50.zip |
Bugfix liveness
Diffstat (limited to 'riscV')
-rw-r--r-- | riscV/ExpansionOracle.ml | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/riscV/ExpansionOracle.ml b/riscV/ExpansionOracle.ml index 81c369f7..27a36283 100644 --- a/riscV/ExpansionOracle.ml +++ b/riscV/ExpansionOracle.ml @@ -628,19 +628,15 @@ let expanse (sb : superblock) code pm = was_exp := true | _ -> ()); if !was_exp then ( - (*node := !node + 1;*) - (*(if !was_branch then - let lives = PTree.get n !liveins in - match lives with - | Some lives -> - let new_branch_pc = - Camlcoq.P.of_int (!node - (List.length !exp - 1)) - in - liveins := PTree.set new_branch_pc lives !liveins; - liveins := PTree.remove n !liveins - | _ -> ());*) + (if !was_branch && List.length !exp > 1 then + let lives = PTree.get n !liveins in + match lives with + | Some lives -> + let new_branch_pc = n2p () in + liveins := PTree.set new_branch_pc lives !liveins; + liveins := PTree.remove n !liveins + | _ -> ()); write_pathmap sb.instructions.(0) (List.length !exp - 1) pm'; - (*write_initial_node n code' new_order;*) write_tree !exp n !node code' new_order) else new_order := n :: !new_order) sb.instructions; |