diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1996-07-25 13:15:16 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1996-07-25 13:15:16 +0000 |
commit | 7f3dd896c950b81be615d84e27e9656102952bdf (patch) | |
tree | 6663af834f1a47acf6d2f2f14ae696ffa808f40b /asmcomp/liveness.ml | |
parent | 7b8776e106238ea16b0d72b60eba31383642f234 (diff) | |
download | ocaml-7f3dd896c950b81be615d84e27e9656102952bdf.tar.gz |
cmmgen: nettoyage de remove_unit (bug signale par Bruno Blanchet)
liveness: verifier les variables utilisees et non initialisees
selection: "optimisation" du cas Ctuple [].
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@938 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/liveness.ml')
-rw-r--r-- | asmcomp/liveness.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/asmcomp/liveness.ml b/asmcomp/liveness.ml index 23373e76d1..facd00ca2e 100644 --- a/asmcomp/liveness.ml +++ b/asmcomp/liveness.ml @@ -101,5 +101,10 @@ let rec live i finally = Reg.add_set_array across i.arg let fundecl f = - live f.fun_body Reg.Set.empty; () - + let initially_live = live f.fun_body Reg.Set.empty in + (* Sanity check: only function parameters can be live at entrypoint *) + let wrong_live = Reg.Set.diff initially_live (Reg.set_of_array f.fun_args) in + if not (Reg.Set.is_empty wrong_live) then begin + Printmach.regset wrong_live; Format.print_newline(); + Misc.fatal_error "Liveness.fundecl" + end |