Commit ca78138a authored by Léo Gourdin's avatar Léo Gourdin
Browse files

Bugfix liveness

parent 21d43bc4
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment