diff options
author | Alain Frisch <alain@frisch.fr> | 2014-03-25 08:57:26 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2014-03-25 08:57:26 +0000 |
commit | 35ff978e3b9af8f74bbddfa70b1ecbd7fac5f3db (patch) | |
tree | b89bc7e1c3edb5464a52b52234495776f8141964 | |
parent | 63e31394eb2cb73943e242902549d1fdbacd3234 (diff) |
#6260: fix unecessary boxing of let-bound floats/ints.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14486 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | asmcomp/cmmgen.ml | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -48,6 +48,7 @@ Compilers: - PR#6203: Constant exception constructor no longer allocate - PR#6311: Improve signature mismatch error messages - PR#6345: Better compilation of optional arguments with default values +- PR#6260: Unnecessary boxing in let (patch by vbrankov) Runtime system: - Fixed a major performance problem on large heaps (~1GB) by making heap diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml index 1ffb1ec7f..b71238487 100644 --- a/asmcomp/cmmgen.ml +++ b/asmcomp/cmmgen.ml @@ -1150,7 +1150,7 @@ type unboxed_number_kind = | Boxed_float | Boxed_integer of boxed_integer -let is_unboxed_number = function +let rec is_unboxed_number = function Uconst(Uconst_ref(_, Uconst_float _)) -> Boxed_float | Uprim(p, _, _) -> @@ -1192,6 +1192,7 @@ let is_unboxed_number = function | Pbbswap bi -> Boxed_integer bi | _ -> No_unboxing end + | Ulet (_, _, e) | Usequence (_, e) -> is_unboxed_number e | _ -> No_unboxing let subst_boxed_number unbox_fn boxed_id unboxed_id box_chunk box_offset exp = |