OSDN Git Service

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