OSDN Git Service

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