-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathflambda_backend_flags.mli
170 lines (135 loc) · 5.54 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
(**************************************************************************)
(* *)
(* 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 reorder_blocks_random : int option ref
val dasm_comments : bool ref
val default_heap_reduction_threshold : int
val heap_reduction_threshold : int ref
val alloc_check : bool ref
val dump_checkmach : 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
module Flambda2 : sig
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
val rawfexpr : bool ref
val fexpr : bool ref
val flexpect : bool ref
val slot_offsets : bool ref
val freshen : 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
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;
}
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
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
module Default : sig
val max_depth : int
val max_rec_depth : int
val call_cost : float
val alloc_cost : float
val prim_cost : float
val branch_cost : float
val indirect_call_cost : float
val poly_compare_cost : float
val small_function_size : int
val large_function_size : int
val threshold : float
val speculative_inlining_only_if_arguments_useful : bool
end
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