Commit 3b6a45c1 authored by Sylvain Boulmé's avatar Sylvain Boulmé
Browse files

improved pre_output_regs

parent b0452edc
......@@ -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
......
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