summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2022-10-27 10:59:40 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2022-10-27 11:03:29 +0200
commitfb5b1e4ff7a98d3c3d0064391ef46e24dad02b36 (patch)
treee931a626206dbcb5cafd754125b1c2e5a35722f9
parentbd87a61435ca35bea12c7a236ca72667df7816b1 (diff)
downloadocaml-fb5b1e4ff7a98d3c3d0064391ef46e24dad02b36.tar.gz
Remove the -force-tmc flag (#11661)
-force-tmc was initially implemented by Frédéric Bour as a way to implement "automatic TMC optimization" on top of the default behavior which is "opt-in TMC optimization". We later decided to disable it, because its usage was in tension with the goals we were setting for the opt-in mode (in particular: have proper warnings and errors when something that could be unexpected is going on). It was kept for debugging purposes, and apparently found a way to skean in the final merge for TMC (very probably my mistake), but in a state where it is actually a no-op. (cherry picked from commit a7fbbfa48edc3d7ba2b839dc76d93b53ff4ca7f3)
-rw-r--r--driver/main_args.ml12
-rw-r--r--driver/main_args.mli1
-rw-r--r--utils/clflags.ml1
-rw-r--r--utils/clflags.mli1
4 files changed, 0 insertions, 15 deletions
diff --git a/driver/main_args.ml b/driver/main_args.ml
index 8203454660..60db017aa8 100644
--- a/driver/main_args.ml
+++ b/driver/main_args.ml
@@ -569,10 +569,6 @@ let mk_no_unboxed_types f =
" unannotated unboxable types will not be unboxed (default)"
;;
-let mk_force_tmc f =
- "-force-tmc", Arg.Unit f, " Rewrite all possible TMC calls"
-;;
-
let mk_unsafe f =
"-unsafe", Arg.Unit f,
" Do not compile bounds checking on array and string access"
@@ -935,7 +931,6 @@ module type Common_options = sig
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
- val _force_tmc : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _unsafe_string : unit -> unit
@@ -1232,7 +1227,6 @@ struct
mk_strict_formats F._strict_formats;
mk_no_strict_formats F._no_strict_formats;
mk_thread F._thread;
- mk_force_tmc F._force_tmc;
mk_unboxed_types F._unboxed_types;
mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe F._unsafe;
@@ -1435,7 +1429,6 @@ struct
mk_strict_formats F._strict_formats;
mk_no_strict_formats F._no_strict_formats;
mk_thread F._thread;
- mk_force_tmc F._force_tmc;
mk_unbox_closures F._unbox_closures;
mk_unbox_closures_factor F._unbox_closures_factor;
mk_inline_max_unroll F._inline_max_unroll;
@@ -1635,7 +1628,6 @@ struct
mk_strict_formats F._strict_formats;
mk_no_strict_formats F._no_strict_formats;
mk_thread F._thread;
- mk_force_tmc F._force_tmc;
mk_unboxed_types F._unboxed_types;
mk_no_unboxed_types F._no_unboxed_types;
mk_unsafe_string F._unsafe_string;
@@ -1939,7 +1931,6 @@ module Default = struct
let _noprompt = set noprompt
let _nopromptcont = set nopromptcont
let _stdin () = (* placeholder: file_argument ""*) ()
- let _force_tmc = set force_tmc
let _version () = print_version ()
let _vnum () = print_version_num ()
let _eval (_:string) = ()
@@ -1976,7 +1967,6 @@ module Default = struct
"Profiling with \"gprof\" (option `-p') is only supported up to \
OCaml 4.08.0"
let _shared () = shared := true; dlcode := true
- let _force_tmc = set force_tmc
let _v () = Compenv.print_version_and_library "native-code compiler"
end
@@ -1997,7 +1987,6 @@ module Default = struct
let _pp s = Clflags.preprocessor := (Some s)
let _ppx s = Clflags.all_ppx := (s :: (!Clflags.all_ppx))
let _thread = set Clflags.use_threads
- let _force_tmc = set force_tmc
let _v () = Compenv.print_version_and_library "documentation generator"
let _verbose = set Clflags.verbose
let _version = Compenv.print_version_string
@@ -2031,7 +2020,6 @@ third-party libraries such as Lwt, but with a different API."
let _output_complete_exe () =
_output_complete_obj (); output_complete_executable := true
let _output_obj () = output_c_object := true; custom_runtime := true
- let _force_tmc = set force_tmc
let _use_prims s = use_prims := s
let _use_runtime s = use_runtime := s
let _v () = Compenv.print_version_and_library "compiler"
diff --git a/driver/main_args.mli b/driver/main_args.mli
index 2b963ef18c..d8b0b0177a 100644
--- a/driver/main_args.mli
+++ b/driver/main_args.mli
@@ -40,7 +40,6 @@ module type Common_options = sig
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
- val _force_tmc : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _unsafe_string : unit -> unit
diff --git a/utils/clflags.ml b/utils/clflags.ml
index 46b61f418b..83bd357f15 100644
--- a/utils/clflags.ml
+++ b/utils/clflags.ml
@@ -135,7 +135,6 @@ let profile_columns : Profile.column list ref = ref [] (* -dprofile/-dtimings *)
let native_code = ref false (* set to true under ocamlopt *)
-let force_tmc = ref false (* -force-tmc *)
let force_slash = ref false (* for ocamldep *)
let clambda_checks = ref false (* -clambda-checks *)
let cmm_invariants =
diff --git a/utils/clflags.mli b/utils/clflags.mli
index 5d9cb86312..8cab8f15ac 100644
--- a/utils/clflags.mli
+++ b/utils/clflags.mli
@@ -189,7 +189,6 @@ val dlcode : bool ref
val pic_code : bool ref
val runtime_variant : string ref
val with_runtime : bool ref
-val force_tmc : bool ref
val force_slash : bool ref
val keep_docs : bool ref
val keep_locs : bool ref