aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--riscV/ExpansionOracle.ml20
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;