forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflambda_backend_flags.mli
209 lines (167 loc) · 6.68 KB
/
flambda_backend_flags.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Pierre Chambart, OCamlPro *)
(* Mark Shinwell and Leo White, Jane Street Europe *)
(* *)
(* Copyright 2013--2021 OCamlPro SAS *)
(* Copyright 2014--2021 Jane Street Group LLC *)
(* *)
(* All rights reserved. This file is distributed under the terms of *)
(* the GNU Lesser General Public License version 2.1, with the *)
(* special exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)
(** Flambda-backend specific command line flags *)
val use_ocamlcfg : bool ref
val dump_cfg : bool ref
val cfg_invariants : bool ref
val cfg_equivalence_check : bool ref
val regalloc : string ref
val regalloc_params : string list ref
val regalloc_validate : bool ref
val cfg_peephole_optimize: bool ref
val reorder_blocks_random : int option ref
val basic_block_sections : bool ref
val dasm_comments : bool ref
val default_heap_reduction_threshold : int
val heap_reduction_threshold : int ref
val dump_checkmach : bool ref
val davail : bool ref
val dranges : bool ref
type checkmach_details_cutoff =
| Keep_all
| At_most of int (* n > 0 *)
| No_details
val checkmach_details_cutoff : checkmach_details_cutoff ref
val default_checkmach_details_cutoff : checkmach_details_cutoff
val disable_poll_insertion : bool ref
val allow_long_frames : bool ref
val max_long_frames_threshold : int
val long_frames_threshold : int ref
val caml_apply_inline_fast_path : bool ref
type function_result_types = Never | Functors_only | All_functions
type opt_level = Oclassic | O2 | O3
type 'a or_default = Set of 'a | Default
val dump_inlining_paths : bool ref
val opt_level : opt_level or_default ref
val internal_assembler : bool ref
val gc_timings : bool ref
val use_cached_generic_functions : bool ref
val cached_generic_functions_path : string ref
module Flambda2 : sig
val debug : bool ref
module Default : sig
val classic_mode : bool
val join_points : bool
val unbox_along_intra_function_control_flow : bool
val backend_cse_at_toplevel : bool
val cse_depth : int
val join_depth : int
val function_result_types : function_result_types
val unicode : bool
end
(* CR-someday lmaurer: We could eliminate most of the per-flag boilerplate using GADTs
and heterogeneous maps. Whether that's an improvement is a fair question. *)
type flags = {
classic_mode : bool;
join_points : bool;
unbox_along_intra_function_control_flow : bool;
backend_cse_at_toplevel : bool;
cse_depth : int;
join_depth : int;
function_result_types : function_result_types;
unicode : bool;
}
val default_for_opt_level : opt_level or_default -> flags
val function_result_types : function_result_types or_default ref
val classic_mode : bool or_default ref
val join_points : bool or_default ref
val unbox_along_intra_function_control_flow : bool or_default ref
val backend_cse_at_toplevel : bool or_default ref
val cse_depth : int or_default ref
val join_depth : int or_default ref
val unicode : bool or_default ref
module Dump : sig
type target = Nowhere | Main_dump_stream | File of Misc.filepath
val rawfexpr : target ref
val fexpr : target ref
val flexpect : target ref
val slot_offsets : bool ref
val freshen : bool ref
val flow : bool ref
end
module Expert : sig
module Default : sig
val fallback_inlining_heuristic : bool
val inline_effects_in_cmm : bool
val phantom_lets : bool
val max_block_size_for_projections : int option
val max_unboxing_depth : int
val can_inline_recursive_functions : bool
val max_function_simplify_run : int
end
type flags = {
fallback_inlining_heuristic : bool;
inline_effects_in_cmm : bool;
phantom_lets : bool;
max_block_size_for_projections : int option;
max_unboxing_depth : int;
can_inline_recursive_functions : bool;
max_function_simplify_run : int;
}
val default_for_opt_level : opt_level or_default -> flags
val fallback_inlining_heuristic : bool or_default ref
val inline_effects_in_cmm : bool or_default ref
val phantom_lets : bool or_default ref
val max_block_size_for_projections : int option or_default ref
val max_unboxing_depth : int or_default ref
val can_inline_recursive_functions : bool or_default ref
val max_function_simplify_run : int or_default ref
end
module Debug : sig
module Default : sig
val concrete_types_only_on_canonicals : bool
val keep_invalid_handlers : bool
end
val concrete_types_only_on_canonicals : bool ref
val keep_invalid_handlers : bool ref
end
module Inlining : sig
type inlining_arguments = private {
max_depth : int;
max_rec_depth : int;
call_cost : float;
alloc_cost : float;
prim_cost : float;
branch_cost : float;
indirect_call_cost : float;
poly_compare_cost : float;
small_function_size : int;
large_function_size : int;
threshold : float;
}
module Default : sig
val default_arguments : inlining_arguments
val speculative_inlining_only_if_arguments_useful : bool
end
val oclassic_arguments : inlining_arguments
val o2_arguments : inlining_arguments
val o3_arguments : inlining_arguments
val max_depth : Clflags.Int_arg_helper.parsed ref
val max_rec_depth : Clflags.Int_arg_helper.parsed ref
val call_cost : Clflags.Float_arg_helper.parsed ref
val alloc_cost : Clflags.Float_arg_helper.parsed ref
val prim_cost : Clflags.Float_arg_helper.parsed ref
val branch_cost : Clflags.Float_arg_helper.parsed ref
val indirect_call_cost : Clflags.Float_arg_helper.parsed ref
val poly_compare_cost : Clflags.Float_arg_helper.parsed ref
val small_function_size : Clflags.Int_arg_helper.parsed ref
val large_function_size : Clflags.Int_arg_helper.parsed ref
val threshold : Clflags.Float_arg_helper.parsed ref
val speculative_inlining_only_if_arguments_useful : bool ref
val report_bin : bool ref
end
end
val opt_flag_handler : Clflags.Opt_flag_handler.t