diff options
-rw-r--r-- | scheduling/RTLpathLivegenaux.ml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scheduling/RTLpathLivegenaux.ml b/scheduling/RTLpathLivegenaux.ml index 8cb500b8..9b93bc32 100644 --- a/scheduling/RTLpathLivegenaux.ml +++ b/scheduling/RTLpathLivegenaux.ml @@ -229,11 +229,14 @@ let get_outputs liveness f n pi = fun n -> get_some @@ PTree.get n liveness ) path_last_successors in let outputs = List.fold_left Regset.union Regset.empty list_input_regs in - match last_instruction with - | Icall (_, _, _, _, _) | Itailcall (_, _, _) - | Ibuiltin (_, _, _, _) | Ijumptable (_, _) - | Ireturn _ -> ((transfer f pc_last outputs), outputs) - | _ -> (outputs, outputs) + let por = match last_instruction with (* see RTLpathLivegen.final_inst_checker *) + | Icall (_, _, _, res, _) -> Regset.remove res outputs + | Ibuiltin (_, _, res, _) -> Liveness.reg_list_dead (AST.params_of_builtin_res res) outputs + | Itailcall (_, _, _) | Ireturn _ -> + assert (outputs = Regset.empty); (* defensive check for performance *) + outputs + | _ -> outputs + in (por, outputs) let set_pathmap_liveness f pm = let liveness = analyze f in |