diff options
| author | Mark Shinwell <mshinwell@janestreet.com> | 2017-08-10 10:21:19 +0100 |
|---|---|---|
| committer | Mark Shinwell <mshinwell@janestreet.com> | 2017-08-10 10:21:19 +0100 |
| commit | 9d692eff2fe598d15beceaac8d92d88d21b28df8 (patch) | |
| tree | 717c7144ea1891485f17d956f3a92311fdc8a889 | |
| parent | 9a1ddfa2dac2207b3a75a32bf9550fb4bcb39f6e (diff) | |
| download | ocaml-9d692eff2fe598d15beceaac8d92d88d21b28df8.tar.gz | |
Remove unnecessary code
| -rw-r--r-- | asmcomp/liveness.ml | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/asmcomp/liveness.ml b/asmcomp/liveness.ml index 0bba1cdde3..9791e8c5ce 100644 --- a/asmcomp/liveness.ml +++ b/asmcomp/liveness.ml @@ -115,14 +115,8 @@ let rec live i finally = Reg.Set.equal before_handler before_handler' in let live_at_exit_before = !live_at_exit in - let live_at_exit_add before_handlers = - List.map (fun (nfail, before_handler) -> - (nfail, before_handler)) - before_handlers - in let rec fixpoint before_handlers = - let live_at_exit_add = live_at_exit_add before_handlers in - live_at_exit := live_at_exit_add @ !live_at_exit; + live_at_exit := before_handlers @ !live_at_exit; let before_handlers' = List.map2 aux handlers before_handlers in live_at_exit := live_at_exit_before; match rec_flag with @@ -140,7 +134,7 @@ let rec live i finally = (* We could use handler.live instead of Reg.Set.empty as the initial value but we would need to clean the live field before doing the analysis (to remove remnants of previous passes). *) - live_at_exit := (live_at_exit_add before_handler) @ !live_at_exit; + live_at_exit := before_handler @ !live_at_exit; let before_body = live body at_join in live_at_exit := live_at_exit_before; i.live <- before_body; |
