diff options
author | Mark Shinwell <mshinwell@gmail.com> | 2016-07-29 15:07:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-29 15:07:10 +0100 |
commit | cd0bd8aa73398d826a9da26ac4d21e5322cb1d0b (patch) | |
tree | fd16b63f71970640fb4d5355237d10af24c39314 /asmcomp/deadcode.ml | |
parent | d7700c10415df1532eb89eef536d3653e614d854 (diff) | |
download | ocaml-cd0bd8aa73398d826a9da26ac4d21e5322cb1d0b.tar.gz |
Spacetime: a new memory profiler (#585)
Diffstat (limited to 'asmcomp/deadcode.ml')
-rw-r--r-- | asmcomp/deadcode.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/asmcomp/deadcode.ml b/asmcomp/deadcode.ml index f6091c2771..42981ded05 100644 --- a/asmcomp/deadcode.ml +++ b/asmcomp/deadcode.ml @@ -22,7 +22,12 @@ open Mach and a set of registers live "before" instruction [i]. *) let rec deadcode i = - let arg = i.arg in + let arg = + if Config.spacetime + && Mach.spacetime_node_hole_pointer_is_live_before i + then Array.append i.arg [| Proc.loc_spacetime_node_hole |] + else i.arg + in match i.desc with | Iend | Ireturn | Iop(Itailcall_ind _) | Iop(Itailcall_imm _) | Iraise _ -> (i, Reg.add_set_array i.live arg) |