summaryrefslogtreecommitdiff
path: root/asmcomp/deadcode.ml
diff options
context:
space:
mode:
authorMark Shinwell <mshinwell@gmail.com>2016-07-29 15:07:10 +0100
committerGitHub <noreply@github.com>2016-07-29 15:07:10 +0100
commitcd0bd8aa73398d826a9da26ac4d21e5322cb1d0b (patch)
treefd16b63f71970640fb4d5355237d10af24c39314 /asmcomp/deadcode.ml
parentd7700c10415df1532eb89eef536d3653e614d854 (diff)
downloadocaml-cd0bd8aa73398d826a9da26ac4d21e5322cb1d0b.tar.gz
Spacetime: a new memory profiler (#585)
Diffstat (limited to 'asmcomp/deadcode.ml')
-rw-r--r--asmcomp/deadcode.ml7
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)