diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2014-04-25 08:41:13 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2014-04-25 08:41:13 +0000 |
commit | 29b34438e08e26ae8f8623eb32bb524386f0532f (patch) | |
tree | 10558f8ec00d86e79fe3ff2f42b189bc7b48929b /driver | |
parent | 3775a101e664f8c6fdf8bcb60256f021b42613a7 (diff) | |
download | ocaml-29b34438e08e26ae8f8623eb32bb524386f0532f.tar.gz |
- Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
-no-float-const-prop, for codes that change FP rounding modes at
run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type
float rather than literals of type string.
- Tested for AMD64; other archs need testing.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver')
-rw-r--r-- | driver/main_args.ml | 6 | ||||
-rw-r--r-- | driver/main_args.mli | 1 | ||||
-rw-r--r-- | driver/optmain.ml | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/driver/main_args.ml b/driver/main_args.ml index ec97d6c983..7d1c402565 100644 --- a/driver/main_args.ml +++ b/driver/main_args.ml @@ -154,6 +154,10 @@ let mk_no_app_funct f = "-no-app-funct", Arg.Unit f, " Deactivate applicative functors" ;; +let mk_no_float_const_prop f = + "-no-float-const-prop", Arg.Unit f, " Deactivate constant propagation for floating-point operations" +;; + let mk_noassert f = "-noassert", Arg.Unit f, " Do not compile assertion checks" ;; @@ -554,6 +558,7 @@ module type Optcomp_options = sig val _labels : unit -> unit val _linkall : unit -> unit val _no_app_funct : unit -> unit + val _no_float_const_prop : unit -> unit val _noassert : unit -> unit val _noautolink : unit -> unit val _nodynlink : unit -> unit @@ -801,6 +806,7 @@ struct mk_labels F._labels; mk_linkall F._linkall; mk_no_app_funct F._no_app_funct; + mk_no_float_const_prop F._no_float_const_prop; mk_noassert F._noassert; mk_noautolink_opt F._noautolink; mk_nodynlink F._nodynlink; diff --git a/driver/main_args.mli b/driver/main_args.mli index 67a6c681d2..6ebf95c9ad 100644 --- a/driver/main_args.mli +++ b/driver/main_args.mli @@ -136,6 +136,7 @@ module type Optcomp_options = sig val _labels : unit -> unit val _linkall : unit -> unit val _no_app_funct : unit -> unit + val _no_float_const_prop : unit -> unit val _noassert : unit -> unit val _noautolink : unit -> unit val _nodynlink : unit -> unit diff --git a/driver/optmain.ml b/driver/optmain.ml index d04ad76b19..2fb1a22b30 100644 --- a/driver/optmain.ml +++ b/driver/optmain.ml @@ -94,6 +94,7 @@ module Options = Main_args.Make_optcomp_options (struct let _labels = clear classic let _linkall = set link_everything let _no_app_funct = clear applicative_functors + let _no_float_const_prop = clear float_const_prop let _noassert = set noassert let _noautolink = set no_auto_link let _nodynlink = clear dlcode |