2005-03-29 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / params.def
blob2dbc19758e01eff2de097a20ae6ff3894d9714f4
1 /* params.def - Run-time parameters.
2 Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
3 Written by Mark Mitchell <mark@codesourcery.com>.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.
24 /* This file contains definitions for language-independent
25 parameters. The DEFPARAM macro takes 4 arguments:
27 - The enumeral corresponding to this parameter.
29 - The name that can be used to set this parameter using the
30 command-line option `--param <name>=<value>'.
32 - A help string explaining how the parameter is used.
34 - A default value for the parameter.
36 Be sure to add an entry to invoke.texi summarizing the parameter. */
38 /* The maximum structure size at which the scalar replacement of
39 aggregates (SRA) pass will perform block copies. The default
40 value, 0, implies that GCC will select the most appropriate size
41 itself. */
42 DEFPARAM (PARAM_SRA_MAX_STRUCTURE_SIZE,
43 "sra-max-structure-size",
44 "The maximum structure size (in bytes) at which GCC will do block copies",
45 0, 0, 0)
47 /* The ratio between instantiated fields and the complete structure
48 size. We say that if the ratio of the number of bytes in
49 instantiated fields to the number of bytes in the complete
50 structure exceeds this parameter, then block copies are not used.
51 The default is 75%. */
52 DEFPARAM (PARAM_SRA_FIELD_STRUCTURE_RATIO,
53 "sra-field-structure-ratio",
54 "The threshold ratio between instantiated fields and the total structure size",
55 75, 0, 100)
57 /* The single function inlining limit. This is the maximum size
58 of a function counted in internal gcc instructions (not in
59 real machine instructions) that is eligible for inlining
60 by the tree inliner.
61 The default value is 450.
62 Only functions marked inline (or methods defined in the class
63 definition for C++) are affected by this.
64 There are more restrictions to inlining: If inlined functions
65 call other functions, the already inlined instructions are
66 counted and once the recursive inline limit (see
67 "max-inline-insns" parameter) is exceeded, the acceptable size
68 gets decreased. */
69 DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
70 "max-inline-insns-single",
71 "The maximum number of instructions in a single function eligible for inlining",
72 450, 0, 0)
74 /* The single function inlining limit for functions that are
75 inlined by virtue of -finline-functions (-O3).
76 This limit should be chosen to be below or equal to the limit
77 that is applied to functions marked inlined (or defined in the
78 class declaration in C++) given by the "max-inline-insns-single"
79 parameter.
80 The default value is 90. */
81 DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
82 "max-inline-insns-auto",
83 "The maximum number of instructions when automatically inlining",
84 90, 0, 0)
86 DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE,
87 "max-inline-insns-recursive",
88 "The maximum number of instructions inline function can grow to via recursive inlining",
89 450, 0, 0)
91 DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO,
92 "max-inline-insns-recursive-auto",
93 "The maximum number of instructions non-inline function can grow to via recursive inlining",
94 450, 0, 0)
96 DEFPARAM (PARAM_MAX_INLINE_RECURSIVE_DEPTH,
97 "max-inline-recursive-depth",
98 "The maximum depth of recursive inlining for inline functions",
99 8, 0, 0)
101 DEFPARAM (PARAM_MAX_INLINE_RECURSIVE_DEPTH_AUTO,
102 "max-inline-recursive-depth-auto",
103 "The maximum depth of recursive inlining for non-inline functions",
104 8, 0, 0)
106 /* Limit the number of expansions created by the variable expansion
107 optimization to avoid register pressure. */
108 DEFPARAM (PARAM_MAX_VARIABLE_EXPANSIONS,
109 "max-variable-expansions-in-unroller",
110 "If -fvariable-expansion-in-unroller is used, the maximum number of \
111 times that an individual variable will be expanded \
112 during loop unrolling",
113 1, 0, 0)
115 /* The maximum number of instructions to consider when looking for an
116 instruction to fill a delay slot. If more than this arbitrary
117 number of instructions is searched, the time savings from filling
118 the delay slot will be minimal so stop searching. Increasing
119 values mean more aggressive optimization, making the compile time
120 increase with probably small improvement in executable run time. */
121 DEFPARAM (PARAM_MAX_DELAY_SLOT_INSN_SEARCH,
122 "max-delay-slot-insn-search",
123 "The maximum number of instructions to consider to fill a delay slot",
124 100, 0, 0)
126 /* When trying to fill delay slots, the maximum number of instructions
127 to consider when searching for a block with valid live register
128 information. Increasing this arbitrarily chosen value means more
129 aggressive optimization, increasing the compile time. This
130 parameter should be removed when the delay slot code is rewritten
131 to maintain the control-flow graph. */
132 DEFPARAM(PARAM_MAX_DELAY_SLOT_LIVE_SEARCH,
133 "max-delay-slot-live-search",
134 "The maximum number of instructions to consider to find accurate live register information",
135 333, 0, 0)
137 /* This parameter limits the number of branch elements that the
138 scheduler will track anti-dependencies through without resetting
139 the tracking mechanism. Large functions with few calls or barriers
140 can generate lists containing many 1000's of dependencies. Generally
141 the compiler either uses all available memory, or runs for far too long. */
142 DEFPARAM(PARAM_MAX_PENDING_LIST_LENGTH,
143 "max-pending-list-length",
144 "The maximum length of scheduling's pending operations list",
145 32, 0, 0)
147 DEFPARAM(PARAM_LARGE_FUNCTION_INSNS,
148 "large-function-insns",
149 "The size of function body to be considered large",
150 2700, 0, 0)
151 DEFPARAM(PARAM_LARGE_FUNCTION_GROWTH,
152 "large-function-growth",
153 "Maximal growth due to inlining of large function (in percent)",
154 100, 0, 0)
155 DEFPARAM(PARAM_INLINE_UNIT_GROWTH,
156 "inline-unit-growth",
157 "how much can given compilation unit grow because of the inlining (in percent)",
158 50, 0, 0)
159 DEFPARAM(PARAM_INLINE_CALL_COST,
160 "inline-call-cost",
161 "expense of call operation relative to ordinary arithmetic operations",
162 16, 0, 0)
164 /* The GCSE optimization will be disabled if it would require
165 significantly more memory than this value. */
166 DEFPARAM(PARAM_MAX_GCSE_MEMORY,
167 "max-gcse-memory",
168 "The maximum amount of memory to be allocated by GCSE",
169 50 * 1024 * 1024, 0, 0)
170 /* The number of repetitions of copy/const prop and PRE to run. */
171 DEFPARAM(PARAM_MAX_GCSE_PASSES,
172 "max-gcse-passes",
173 "The maximum number of passes to make when doing GCSE",
174 1, 1, 0)
175 /* This is the threshold ratio when to perform partial redundancy
176 elimination after reload. We perform partial redundancy elimination
177 when the following holds:
178 (Redundant load execution count)
179 ------------------------------- >= GCSE_AFTER_RELOAD_PARTIAL_FRACTION
180 (Added loads execution count) */
181 DEFPARAM(PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION,
182 "gcse-after-reload-partial-fraction",
183 "The threshold ratio for performing partial redundancy elimination after reload.",
184 3, 0, 0)
185 /* This is the threshold ratio of the critical edges execution count compared to
186 the redundant loads execution count that permits performing the load
187 redundancy elimination in gcse after reload. */
188 DEFPARAM(PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION,
189 "gcse-after-reload-critical-fraction",
190 "The threshold ratio of critical edges execution count that permit performing redundancy elimination after reload.",
191 10, 0, 0)
192 /* This parameter limits the number of insns in a loop that will be unrolled,
193 and by how much the loop is unrolled.
195 This limit should be at most half of the peeling limits: loop unroller
196 decides to not unroll loops that iterate fewer than 2*number of allowed
197 unrollings and thus we would have loops that are neither peeled or unrolled
198 otherwise. */
199 DEFPARAM(PARAM_MAX_UNROLLED_INSNS,
200 "max-unrolled-insns",
201 "The maximum number of instructions to consider to unroll in a loop",
202 200, 0, 0)
203 /* This parameter limits how many times the loop is unrolled depending
204 on number of insns really executed in each iteration. */
205 DEFPARAM(PARAM_MAX_AVERAGE_UNROLLED_INSNS,
206 "max-average-unrolled-insns",
207 "The maximum number of instructions to consider to unroll in a loop on average",
208 80, 0, 0)
209 /* The maximum number of unrollings of a single loop. */
210 DEFPARAM(PARAM_MAX_UNROLL_TIMES,
211 "max-unroll-times",
212 "The maximum number of unrollings of a single loop",
213 8, 0, 0)
214 /* The maximum number of insns of a peeled loop. */
215 DEFPARAM(PARAM_MAX_PEELED_INSNS,
216 "max-peeled-insns",
217 "The maximum number of insns of a peeled loop",
218 400, 0, 0)
219 /* The maximum number of peelings of a single loop. */
220 DEFPARAM(PARAM_MAX_PEEL_TIMES,
221 "max-peel-times",
222 "The maximum number of peelings of a single loop",
223 16, 0, 0)
224 /* The maximum number of insns of a peeled loop. */
225 DEFPARAM(PARAM_MAX_COMPLETELY_PEELED_INSNS,
226 "max-completely-peeled-insns",
227 "The maximum number of insns of a completely peeled loop",
228 400, 0, 0)
229 /* The maximum number of peelings of a single loop that is peeled completely. */
230 DEFPARAM(PARAM_MAX_COMPLETELY_PEEL_TIMES,
231 "max-completely-peel-times",
232 "The maximum number of peelings of a single loop that is peeled completely",
233 16, 0, 0)
234 /* The maximum number of insns of a peeled loop that rolls only once. */
235 DEFPARAM(PARAM_MAX_ONCE_PEELED_INSNS,
236 "max-once-peeled-insns",
237 "The maximum number of insns of a peeled loop that rolls only once",
238 400, 0, 0)
240 /* The maximum number of insns of an unswitched loop. */
241 DEFPARAM(PARAM_MAX_UNSWITCH_INSNS,
242 "max-unswitch-insns",
243 "The maximum number of insns of an unswitched loop",
244 50, 0, 0)
245 /* The maximum level of recursion in unswitch_single_loop. */
246 DEFPARAM(PARAM_MAX_UNSWITCH_LEVEL,
247 "max-unswitch-level",
248 "The maximum number of unswitchings in a single loop",
249 3, 0, 0)
251 /* The maximum number of iterations of a loop the brute force algorithm
252 for analysis of # of iterations of the loop tries to evaluate. */
253 DEFPARAM(PARAM_MAX_ITERATIONS_TO_TRACK,
254 "max-iterations-to-track",
255 "Bound on the number of iterations the brute force # of iterations analysis algorithm evaluates",
256 1000, 0, 0)
258 DEFPARAM(PARAM_MAX_SMS_LOOP_NUMBER,
259 "max-sms-loop-number",
260 "Maximum number of loops to perform swing modulo scheduling on (mainly for debugging)",
261 -1, -1, -1)
263 /* This parameter is used to tune SMS MAX II calculations. */
264 DEFPARAM(PARAM_SMS_MAX_II_FACTOR,
265 "sms-max-ii-factor",
266 "A factor for tuning the upper bound that swing modulo scheduler uses for scheduling a loop",
267 100, 0, 0)
268 DEFPARAM(PARAM_SMS_DFA_HISTORY,
269 "sms-dfa-history",
270 "The number of cycles the swing modulo scheduler considers when \
271 checking conflicts using DFA",
272 0, 0, 0)
273 DEFPARAM(PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD,
274 "sms-loop-average-count-threshold",
275 "A threshold on the average loop count considered by the swing modulo scheduler",
276 0, 0, 0)
278 DEFPARAM(HOT_BB_COUNT_FRACTION,
279 "hot-bb-count-fraction",
280 "Select fraction of the maximal count of repetitions of basic block in program given basic block needs to have to be considered hot",
281 10000, 0, 0)
282 DEFPARAM(HOT_BB_FREQUENCY_FRACTION,
283 "hot-bb-frequency-fraction",
284 "Select fraction of the maximal frequency of executions of basic block in function given basic block needs to have to be considered hot",
285 1000, 0, 0)
286 DEFPARAM(TRACER_DYNAMIC_COVERAGE_FEEDBACK,
287 "tracer-dynamic-coverage-feedback",
288 "The percentage of function, weighted by execution frequency, that must be covered by trace formation. Used when profile feedback is available",
289 95, 0, 100)
290 DEFPARAM(TRACER_DYNAMIC_COVERAGE,
291 "tracer-dynamic-coverage",
292 "The percentage of function, weighted by execution frequency, that must be covered by trace formation. Used when profile feedback is not available",
293 75, 0, 100)
294 DEFPARAM(TRACER_MAX_CODE_GROWTH,
295 "tracer-max-code-growth",
296 "Maximal code growth caused by tail duplication (in percent)",
297 100, 0, 0)
298 DEFPARAM(TRACER_MIN_BRANCH_RATIO,
299 "tracer-min-branch-ratio",
300 "Stop reverse growth if the reverse probability of best edge is less than this threshold (in percent)",
301 10, 0, 100)
302 DEFPARAM(TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK,
303 "tracer-min-branch-probability-feedback",
304 "Stop forward growth if the probability of best edge is less than this threshold (in percent). Used when profile feedback is available",
305 80, 0, 100)
306 DEFPARAM(TRACER_MIN_BRANCH_PROBABILITY,
307 "tracer-min-branch-probability",
308 "Stop forward growth if the probability of best edge is less than this threshold (in percent). Used when profile feedback is not available",
309 50, 0, 100)
311 /* The maximum number of incoming edges to consider for crossjumping. */
312 DEFPARAM(PARAM_MAX_CROSSJUMP_EDGES,
313 "max-crossjump-edges",
314 "The maximum number of incoming edges to consider for crossjumping",
315 100, 0, 0)
317 /* The minimum number of matching instructions to consider for crossjumping. */
318 DEFPARAM(PARAM_MIN_CROSSJUMP_INSNS,
319 "min-crossjump-insns",
320 "The minimum number of matching instructions to consider for crossjumping",
321 5, 0, 0)
323 /* The maximum number of insns to duplicate when unfactoring computed gotos. */
324 DEFPARAM(PARAM_MAX_GOTO_DUPLICATION_INSNS,
325 "max-goto-duplication-insns",
326 "The maximum number of insns to duplicate when unfactoring computed gotos",
327 8, 0, 0)
329 /* The maximum length of path considered in cse. */
330 DEFPARAM(PARAM_MAX_CSE_PATH_LENGTH,
331 "max-cse-path-length",
332 "The maximum length of path considered in cse",
333 10, 0, 0)
335 /* The cost of expression in loop invariant motion that is considered
336 expensive. */
337 DEFPARAM(PARAM_LIM_EXPENSIVE,
338 "lim-expensive",
339 "The minimum cost of an expensive expression in the loop invariant motion",
340 20, 0, 0)
342 /* Bound on number of candidates for induction variables below that
343 all candidates are considered for each use in induction variable
344 optimizations. */
346 DEFPARAM(PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
347 "iv-consider-all-candidates-bound",
348 "Bound on number of candidates below that all candidates are considered in iv optimizations",
349 30, 0, 0)
351 /* The induction variable optimizations give up on loops that contain more
352 induction variable uses. */
354 DEFPARAM(PARAM_IV_MAX_CONSIDERED_USES,
355 "iv-max-considered-uses",
356 "Bound on number of iv uses in loop optimized in iv optimizations",
357 250, 0, 0)
359 /* If there are at most this number of ivs in the set, try removing unnecessary
360 ivs from the set always. */
362 DEFPARAM(PARAM_IV_ALWAYS_PRUNE_CAND_SET_BOUND,
363 "iv-always-prune-cand-set-bound",
364 "If number of candidates in the set is smaller, we always try to remove unused ivs during its optimization",
365 10, 0, 0)
367 /* The product of the next two is used to decide whether or not to
368 use .GLOBAL_VAR. See tree-dfa.c. */
369 DEFPARAM(PARAM_GLOBAL_VAR_THRESHOLD,
370 "global-var-threshold",
371 "Given N calls and V call-clobbered vars in a function. Use .GLOBAL_VAR if NxV is larger than this limit",
372 500000, 0, 0)
374 DEFPARAM(PARAM_MAX_CSELIB_MEMORY_LOCATIONS,
375 "max-cselib-memory-locations",
376 "The maximum memory locations recorded by cselib",
377 500, 0, 0)
379 #ifdef ENABLE_GC_ALWAYS_COLLECT
380 # define GGC_MIN_EXPAND_DEFAULT 0
381 # define GGC_MIN_HEAPSIZE_DEFAULT 0
382 #else
383 # define GGC_MIN_EXPAND_DEFAULT 30
384 # define GGC_MIN_HEAPSIZE_DEFAULT 4096
385 #endif
387 DEFPARAM(GGC_MIN_EXPAND,
388 "ggc-min-expand",
389 "Minimum heap expansion to trigger garbage collection, as a percentage of the total size of the heap",
390 GGC_MIN_EXPAND_DEFAULT, 0, 0)
392 DEFPARAM(GGC_MIN_HEAPSIZE,
393 "ggc-min-heapsize",
394 "Minimum heap size before we start collecting garbage, in kilobytes",
395 GGC_MIN_HEAPSIZE_DEFAULT, 0, 0)
397 #undef GGC_MIN_EXPAND_DEFAULT
398 #undef GGC_MIN_HEAPSIZE_DEFAULT
400 DEFPARAM(PARAM_MAX_RELOAD_SEARCH_INSNS,
401 "max-reload-search-insns",
402 "The maximum number of instructions to search backward when looking for equivalent reload",
403 100, 0, 0)
405 DEFPARAM(PARAM_MAX_ALIASED_VOPS,
406 "max-aliased-vops",
407 "The maximum number of virtual operands allowed to represent aliases before triggering alias grouping.",
408 500, 0, 0)
410 DEFPARAM(PARAM_MAX_SCHED_REGION_BLOCKS,
411 "max-sched-region-blocks",
412 "The maximum number of blocks in a region to be considered for interblock scheduling",
413 10, 0, 0)
415 DEFPARAM(PARAM_MAX_SCHED_REGION_INSNS,
416 "max-sched-region-insns",
417 "The maximum number of insns in a region to be considered for interblock scheduling",
418 100, 0, 0)
420 DEFPARAM(PARAM_MAX_LAST_VALUE_RTL,
421 "max-last-value-rtl",
422 "The maximum number of RTL nodes that can be recorded as combiner's last value",
423 10000, 0, 0)
425 /* INTEGER_CST nodes are shared for values [{-1,0} .. N) for
426 {signed,unsigned} integral types. This determines N.
427 Experimentation shows 256 to be a good value. */
428 DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
429 "integer-share-limit",
430 "The upper bound for sharing integer constants",
431 256, 2, 2)
434 Local variables:
435 mode:c
436 End: */