diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-06-15 16:08:53 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-06-15 16:08:53 +0000 |
commit | ba79d4bd1f01a70b892c69f6a5e6e86714a023d6 (patch) | |
tree | 61467d43981ccbd89513d4396acf3c738ad84334 /asmcomp/liveness.ml | |
parent | 3ceaa85c72b2094bb090a1819b65a2792cf2d3c1 (diff) | |
download | ocaml-ba79d4bd1f01a70b892c69f6a5e6e86714a023d6.tar.gz |
Iloop est maintenant une boucle infinie, on en sort par catch...exit.
Ca supprime Ilooptest, Ialwaystrue, Ialwaysfalse.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@36 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/liveness.ml')
-rw-r--r-- | asmcomp/liveness.ml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/asmcomp/liveness.ml b/asmcomp/liveness.ml index 90b010c476..96598811bc 100644 --- a/asmcomp/liveness.ml +++ b/asmcomp/liveness.ml @@ -4,6 +4,7 @@ open Mach let live_at_exit = ref Reg.Set.empty +let live_at_break = ref Reg.Set.empty let live_at_raise = ref Reg.Set.empty let rec live i finally = @@ -34,21 +35,19 @@ let rec live i finally = i.live <- !at_fork; Reg.add_set_array !at_fork i.arg | Iloop(body) -> - let at_exit = live i.next finally in - let at_entrance = ref at_exit in + let at_top = ref Reg.Set.empty in (* Yes, there are better algorithms, but we'll just iterate till reaching a fixpoint. *) begin try while true do - let new_at_entrance = - Reg.Set.union !at_entrance (live body !at_entrance) in - if Reg.Set.equal !at_entrance new_at_entrance then raise Exit; - at_entrance := new_at_entrance + let new_at_top = Reg.Set.union !at_top (live body !at_top) in + if Reg.Set.equal !at_top new_at_top then raise Exit; + at_top := new_at_top done with Exit -> () end; - i.live <- !at_entrance; - !at_entrance + i.live <- !at_top; + !at_top | Icatch(body, handler) -> let at_join = live i.next finally in let before_handler = live handler at_join in |