Mercurial > hg > CbC > CbC_gcc
comparison gcc/params.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* params.h - Run-time parameters. | 1 /* params.h - Run-time parameters. |
2 Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 | 2 Copyright (C) 2001-2017 Free Software Foundation, Inc. |
3 Free Software Foundation, Inc. | |
4 Written by Mark Mitchell <mark@codesourcery.com>. | 3 Written by Mark Mitchell <mark@codesourcery.com>. |
5 | 4 |
6 This file is part of GCC. | 5 This file is part of GCC. |
7 | 6 |
8 GCC is free software; you can redistribute it and/or modify it under | 7 GCC is free software; you can redistribute it and/or modify it under |
37 | 36 |
38 #define INVALID_PARAM_VAL (-1) | 37 #define INVALID_PARAM_VAL (-1) |
39 | 38 |
40 /* The information associated with each parameter. */ | 39 /* The information associated with each parameter. */ |
41 | 40 |
42 typedef struct param_info | 41 struct param_info |
43 { | 42 { |
44 /* The name used with the `--param <name>=<value>' switch to set this | 43 /* The name used with the `--param <name>=<value>' switch to set this |
45 value. */ | 44 value. */ |
46 const char *const option; | 45 const char *option; |
47 | 46 |
48 /* The default value. */ | 47 /* The default value. */ |
49 int default_value; | 48 int default_value; |
50 | 49 |
51 /* Minimum acceptable value. */ | 50 /* Minimum acceptable value. */ |
53 | 52 |
54 /* Maximum acceptable value, if greater than minimum */ | 53 /* Maximum acceptable value, if greater than minimum */ |
55 int max_value; | 54 int max_value; |
56 | 55 |
57 /* A short description of the option. */ | 56 /* A short description of the option. */ |
58 const char *const help; | 57 const char *help; |
59 } param_info; | 58 |
59 /* The optional names corresponding to the values. */ | |
60 const char **value_names; | |
61 }; | |
60 | 62 |
61 /* An array containing the compiler parameters and their current | 63 /* An array containing the compiler parameters and their current |
62 values. */ | 64 values. */ |
63 | 65 |
64 extern param_info *compiler_params; | 66 extern param_info *compiler_params; |
78 int *params, int *params_set); | 80 int *params, int *params_set); |
79 | 81 |
80 | 82 |
81 /* The parameters in use by language-independent code. */ | 83 /* The parameters in use by language-independent code. */ |
82 | 84 |
83 typedef enum compiler_param | 85 enum compiler_param |
84 { | 86 { |
85 #define DEFPARAM(enumerator, option, msgid, default, min, max) \ | 87 #include "params.list" |
86 enumerator, | |
87 #include "params.def" | |
88 #undef DEFPARAM | |
89 LAST_PARAM | 88 LAST_PARAM |
90 } compiler_param; | 89 }; |
90 | |
91 extern bool find_param (const char *, enum compiler_param *); | |
92 extern const char *find_param_fuzzy (const char *name); | |
93 extern bool param_string_value_p (enum compiler_param, const char *, int *); | |
91 | 94 |
92 /* The value of the parameter given by ENUM. Not an lvalue. */ | 95 /* The value of the parameter given by ENUM. Not an lvalue. */ |
93 #define PARAM_VALUE(ENUM) \ | 96 #define PARAM_VALUE(ENUM) \ |
94 ((int) global_options.x_param_values[(int) ENUM]) | 97 ((int) global_options.x_param_values[(int) ENUM]) |
95 | 98 |
103 /* Set the default value of a parameter given by NUM to VALUE, before | 106 /* Set the default value of a parameter given by NUM to VALUE, before |
104 option processing. */ | 107 option processing. */ |
105 | 108 |
106 extern void set_default_param_value (compiler_param num, int value); | 109 extern void set_default_param_value (compiler_param num, int value); |
107 | 110 |
111 /* Add all parameters and default values that can be set in both the | |
112 driver and the compiler proper. */ | |
113 | |
114 extern void global_init_params (void); | |
115 | |
108 /* Note that all parameters have been added and all default values | 116 /* Note that all parameters have been added and all default values |
109 set. */ | 117 set. */ |
110 extern void finish_params (void); | 118 extern void finish_params (void); |
111 | 119 |
120 /* Reset all state in params.c */ | |
121 | |
122 extern void params_c_finalize (void); | |
123 | |
112 /* Return the default value of parameter NUM. */ | 124 /* Return the default value of parameter NUM. */ |
113 | 125 |
114 extern int default_param_value (compiler_param num); | 126 extern int default_param_value (compiler_param num); |
115 | 127 |
116 /* Initialize an array PARAMS with default values of the | 128 /* Initialize an array PARAMS with default values of the |
117 parameters. */ | 129 parameters. */ |
118 extern void init_param_values (int *params); | 130 extern void init_param_values (int *params); |
119 | 131 |
120 /* Macros for the various parameters. */ | 132 /* Macros for the various parameters. */ |
121 #define STRUCT_REORG_COLD_STRUCT_RATIO \ | |
122 PARAM_VALUE (PARAM_STRUCT_REORG_COLD_STRUCT_RATIO) | |
123 #define MAX_INLINE_INSNS_SINGLE \ | 133 #define MAX_INLINE_INSNS_SINGLE \ |
124 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE) | 134 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE) |
125 #define MAX_INLINE_INSNS \ | 135 #define MAX_INLINE_INSNS \ |
126 PARAM_VALUE (PARAM_MAX_INLINE_INSNS) | 136 PARAM_VALUE (PARAM_MAX_INLINE_INSNS) |
127 #define MAX_INLINE_SLOPE \ | 137 #define MAX_INLINE_SLOPE \ |
192 PARAM_VALUE (PARAM_IRA_MAX_LOOPS_NUM) | 202 PARAM_VALUE (PARAM_IRA_MAX_LOOPS_NUM) |
193 #define IRA_MAX_CONFLICT_TABLE_SIZE \ | 203 #define IRA_MAX_CONFLICT_TABLE_SIZE \ |
194 PARAM_VALUE (PARAM_IRA_MAX_CONFLICT_TABLE_SIZE) | 204 PARAM_VALUE (PARAM_IRA_MAX_CONFLICT_TABLE_SIZE) |
195 #define IRA_LOOP_RESERVED_REGS \ | 205 #define IRA_LOOP_RESERVED_REGS \ |
196 PARAM_VALUE (PARAM_IRA_LOOP_RESERVED_REGS) | 206 PARAM_VALUE (PARAM_IRA_LOOP_RESERVED_REGS) |
207 #define LRA_MAX_CONSIDERED_RELOAD_PSEUDOS \ | |
208 PARAM_VALUE (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS) | |
209 #define LRA_INHERITANCE_EBB_PROBABILITY_CUTOFF \ | |
210 PARAM_VALUE (PARAM_LRA_INHERITANCE_EBB_PROBABILITY_CUTOFF) | |
197 #define SWITCH_CONVERSION_BRANCH_RATIO \ | 211 #define SWITCH_CONVERSION_BRANCH_RATIO \ |
198 PARAM_VALUE (PARAM_SWITCH_CONVERSION_BRANCH_RATIO) | 212 PARAM_VALUE (PARAM_SWITCH_CONVERSION_BRANCH_RATIO) |
199 #define LOOP_INVARIANT_MAX_BBS_IN_LOOP \ | 213 #define LOOP_INVARIANT_MAX_BBS_IN_LOOP \ |
200 PARAM_VALUE (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) | 214 PARAM_VALUE (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) |
201 #define SLP_MAX_INSNS_IN_BB \ | 215 #define SLP_MAX_INSNS_IN_BB \ |
204 PARAM_VALUE (PARAM_MIN_INSN_TO_PREFETCH_RATIO) | 218 PARAM_VALUE (PARAM_MIN_INSN_TO_PREFETCH_RATIO) |
205 #define PREFETCH_MIN_INSN_TO_MEM_RATIO \ | 219 #define PREFETCH_MIN_INSN_TO_MEM_RATIO \ |
206 PARAM_VALUE (PARAM_PREFETCH_MIN_INSN_TO_MEM_RATIO) | 220 PARAM_VALUE (PARAM_PREFETCH_MIN_INSN_TO_MEM_RATIO) |
207 #define MIN_NONDEBUG_INSN_UID \ | 221 #define MIN_NONDEBUG_INSN_UID \ |
208 PARAM_VALUE (PARAM_MIN_NONDEBUG_INSN_UID) | 222 PARAM_VALUE (PARAM_MIN_NONDEBUG_INSN_UID) |
223 #define MAX_STORES_TO_SINK \ | |
224 PARAM_VALUE (PARAM_MAX_STORES_TO_SINK) | |
225 #define ALLOW_LOAD_DATA_RACES \ | |
226 PARAM_VALUE (PARAM_ALLOW_LOAD_DATA_RACES) | |
227 #define ALLOW_STORE_DATA_RACES \ | |
228 PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES) | |
229 #define ALLOW_PACKED_LOAD_DATA_RACES \ | |
230 PARAM_VALUE (PARAM_ALLOW_PACKED_LOAD_DATA_RACES) | |
231 #define ALLOW_PACKED_STORE_DATA_RACES \ | |
232 PARAM_VALUE (PARAM_ALLOW_PACKED_STORE_DATA_RACES) | |
233 #define ASAN_STACK \ | |
234 PARAM_VALUE (PARAM_ASAN_STACK) | |
235 #define ASAN_PROTECT_ALLOCAS \ | |
236 PARAM_VALUE (PARAM_ASAN_PROTECT_ALLOCAS) | |
237 #define ASAN_GLOBALS \ | |
238 PARAM_VALUE (PARAM_ASAN_GLOBALS) | |
239 #define ASAN_INSTRUMENT_READS \ | |
240 PARAM_VALUE (PARAM_ASAN_INSTRUMENT_READS) | |
241 #define ASAN_INSTRUMENT_WRITES \ | |
242 PARAM_VALUE (PARAM_ASAN_INSTRUMENT_WRITES) | |
243 #define ASAN_MEMINTRIN \ | |
244 PARAM_VALUE (PARAM_ASAN_MEMINTRIN) | |
245 #define ASAN_USE_AFTER_RETURN \ | |
246 PARAM_VALUE (PARAM_ASAN_USE_AFTER_RETURN) | |
247 #define ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD \ | |
248 PARAM_VALUE (PARAM_ASAN_INSTRUMENTATION_WITH_CALL_THRESHOLD) | |
249 #define ASAN_PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD \ | |
250 ((unsigned) PARAM_VALUE (PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD)) | |
251 | |
209 #endif /* ! GCC_PARAMS_H */ | 252 #endif /* ! GCC_PARAMS_H */ |