aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Clflags.ml
blob: 33c5964a7e545a9835145d281407f5b3bfae35dd (plain)
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
(* *********************************************************************)
(*                                                                     *)
(*              The Compcert verified compiler                         *)
(*                                                                     *)
(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)
(*                                                                     *)
(*  Copyright Institut National de Recherche en Informatique et en     *)
(*  Automatique.  All rights reserved.  This file is distributed       *)
(*  under the terms of the INRIA Non-Commercial License Agreement.     *)
(*                                                                     *)
(* *********************************************************************)

(* Command-line flags *)

let prepro_options = ref ([]: string list)
let linker_options = ref ([]: string list)
let assembler_options = ref ([]: string list)
let option_flongdouble = ref (Configuration.arch = "kvx")
let option_fstruct_passing = ref false
let option_fbitfields = ref false
let option_fvararg_calls = ref true
let option_funprototyped = ref true
let option_fpacked_structs = ref false
let option_ffpu = ref true
let option_ffloatconstprop = ref 2
let option_ftailcalls = ref true
let option_fconstprop = ref true
let option_fcse = ref true
let option_fcse2 = ref false

let option_fcse3 = ref true
let option_fcse3_alias_analysis = ref true
let option_fcse3_across_calls = ref false
let option_fcse3_across_merges = ref true
let option_fcse3_glb = ref true
let option_fcse3_trivial_ops = ref false
let option_fcse3_refine = ref true
let option_fcse3_conditions = ref true
let option_fcse3_only_conditions = ref false
                        
let option_fredundancy = ref true

(** Options relative to superblock scheduling *)
let option_fpredict = ref true (* insert static branch prediction information, and swaps ifso/ifnot branches accordingly *)
let option_ftailduplicate = ref 0 (* perform tail duplication for blocks of size n *)
let option_ftracelinearize = ref true (* uses branch prediction information to improve the linearization *)
let option_funrollsingle = ref 0 (* unroll a single iteration of innermost loops of size n *)
let option_funrollbody = ref 0 (* unroll the body of innermost loops of size n *)
let option_flooprotate = ref 0 (* rotate the innermost loops to have the condition inside the loop body *)
let option_fliftif = ref 0 (* Move and or duplicate code off of a superblock by first introducing a redundant if and then leveraging Duplicate and CSE3. *)

(* move_stroes | no_move_stores
 * empty if this skip is to be skipped *)
let option_prepass_past_side_exits = ref false
(* Pick scheduling heuristic to decide which instructions to copy via if-lifting *)
let option_prepass_past_side_exits_sched = ref "move_stores"

(* Weak Software Pipelining *)
let option_fpoormansssa = ref false
let option_ftargetinnerloops = ref false

(* Scheduling *)
let option_mtune = ref ""
                
let option_fprepass = ref true
let option_fprepass_sched = ref "regpres"

let option_fpostpass = ref true
let option_fpostpass_sched = ref "list"

let option_fifconversion = ref true
let option_Obranchless = ref false
let option_falignfunctions = ref (None: int option)
let option_falignbranchtargets = ref 0
let option_faligncondbranchs = ref 0
let option_finline_asm = ref false
let option_fcommon = ref true
let option_mthumb = ref (Configuration.model = "armv7m")
let option_Osize = ref false
let option_finline = ref true
let option_finline_functions_called_once = ref true
let option_dprepro = ref false
let option_dparse = ref false
let option_dcmedium = ref false
let option_dclight = ref false
let option_dcminor = ref false
let option_drtl = ref false
let option_dltl = ref false
let option_dalloctrace = ref false
let option_dmach = ref false
let option_dasm = ref false
let option_sdump = ref false
let option_g = ref false
let option_gdwarf = ref (if Configuration.system = "diab" then 2 else 3)
let option_gdepth = ref 3
let option_o = ref (None: string option)
let option_E = ref false
let option_S = ref false
let option_c = ref false
let option_v = ref false
let option_interp = ref false
let option_small_data =
  ref (if Configuration.arch = "powerpc"
       && Configuration.abi = "eabi"
       && Configuration.system = "diab"
       then 8 else 0)
let option_small_const = ref (!option_small_data)
let option_timings = ref false
let stdlib_path = ref Configuration.stdlib_path
let use_standard_headers =  ref Configuration.has_standard_headers

let option_fglobaladdrtmp = ref false
let option_fglobaladdroffset = ref false
let option_fxsaddr = ref true  
let option_faddx = ref false
let option_fmadd = ref true
let option_div_i32 = ref "stsud"
let option_div_i64 = ref "stsud" 
let option_fcoalesce_mem = ref true
let option_fexpanse_rtlcond = ref false
let option_fexpanse_others = ref false
let option_fforward_moves = ref false
let option_fmove_loop_invariants = ref false
let option_fnontrap_loads = ref true
let option_all_loads_nontrap = ref false
let option_inline_auto_threshold = ref 0
let option_profile_arcs = ref false
let option_fbranch_probabilities = ref true
let option_debug_compcert = ref 0
let option_regpres_threshold = ref 2
let option_regpres_wait_window = ref false
let main_function_name = ref "main"