PR c++/11786
[official-gcc.git] / gcc / params.def
blobc5dfca864d52ec66f37cd5d179997b6416a44a49
1 /* params.def - Run-time parameters.
2 Copyright (C) 2001, 2002 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 single function inlining limit. This is the maximum size
39 of a function counted in internal gcc instructions (not in
40 real machine instructions) that is eligible for inlining
41 by the tree inliner.
42 The default value is 100.
43 Only functions marked inline (or methods defined in the class
44 definition for C++) are affected by this, unless you set the
45 -finline-functions (included in -O3) compiler option.
46 There are more restrictions to inlining: If inlined functions
47 call other functions, the already inlined instructions are
48 counted and once the recursive inline limit (see
49 "max-inline-insns" parameter) is exceeded, the acceptable size
50 gets decreased. */
51 DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
52 "max-inline-insns-single",
53 "The maximum number of instructions in a single function eligible for inlining",
54 500)
56 /* The single function inlining limit for functions that are
57 inlined by virtue of -finline-functions (-O3).
58 This limit should be chosen to be below or equal to the limit
59 that is applied to functions marked inlined (or defined in the
60 class declaration in C++) given by the "max-inline-insns-single"
61 parameter.
62 The default value is 100. */
63 DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
64 "max-inline-insns-auto",
65 "The maximum number of instructions when automatically inlining",
66 150)
68 /* The repeated inlining limit. After this number of instructions
69 (in the internal gcc representation, not real machine instructions)
70 got inlined by repeated inlining, gcc starts to decrease the maximum
71 number of inlinable instructions in the tree inliner.
72 This is done by a linear function, see "max-inline-slope" parameter.
73 It is necessary in order to limit the compile-time resources, that
74 could otherwise become very high.
75 It is recommended to set this value to twice the value of the single
76 function limit (set by the "max-inline-insns-single" parameter) or
77 higher. The default value is 200.
78 Higher values mean that more inlining is done, resulting in
79 better performance of the code, at the expense of higher
80 compile-time resource (time, memory) requirements and larger
81 binaries. */
82 DEFPARAM (PARAM_MAX_INLINE_INSNS,
83 "max-inline-insns",
84 "The maximum number of instructions by repeated inlining before gcc starts to throttle inlining",
85 200)
87 /* After the repeated inline limit has been exceeded (see
88 "max-inline-insns" parameter), a linear function is used to
89 decrease the size of single functions eligible for inlining.
90 The slope of this linear function is given the negative
91 reciprocal value (-1/x) of this parameter.
92 The default value is 32.
93 This linear function is used until it falls below a minimum
94 value specified by the "min-inline-insns" parameter. */
95 DEFPARAM (PARAM_MAX_INLINE_SLOPE,
96 "max-inline-slope",
97 "The slope of the linear function throttling inlining after the recursive inlining limit has been reached is given by the negative reciprocal value of this parameter",
98 32)
100 /* When gcc has inlined so many instructions (by repeated
101 inlining) that the throttling limits the inlining very much,
102 inlining for very small functions is still desirable to
103 achieve good runtime performance. The size of single functions
104 (measured in gcc instructions) which will still be eligible for
105 inlining then is given by this parameter. It defaults to 130.
106 Only much later (after exceeding 128 times the recursive limit)
107 inlining is cut down completely. */
108 DEFPARAM (PARAM_MIN_INLINE_INSNS,
109 "min-inline-insns",
110 "The number of instructions in a single functions still eligible to inlining after a lot recursive inlining",
113 /* For languages that (still) use the RTL inliner, we can specify
114 limits for the RTL inliner separately.
115 The parameter here defines the maximum number of RTL instructions
116 a function may have to be eligible for inlining in the RTL inliner.
117 The default value is 600. */
118 DEFPARAM (PARAM_MAX_INLINE_INSNS_RTL,
119 "max-inline-insns-rtl",
120 "The maximum number of instructions for the RTL inliner",
121 600)
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)
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)
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",
155 DEFPARAM(PARAM_LARGE_FUNCTION_INSNS,
156 "large-function-insns",
157 "The size of function body to be considered large",
158 10000)
159 DEFPARAM(PARAM_LARGE_FUNCTION_GROWTH,
160 "large-function-growth",
161 "Maximal growth due to inlining of large function (in percent)",
162 100)
163 DEFPARAM(PARAM_INLINE_UNIT_GROWTH,
164 "inline-unit-growth",
165 "how much can given compilation unit grow because of the inlining (in percent)",
168 /* The GCSE optimization will be disabled if it would require
169 significantly more memory than this value. */
170 DEFPARAM(PARAM_MAX_GCSE_MEMORY,
171 "max-gcse-memory",
172 "The maximum amount of memory to be allocated by GCSE",
173 50 * 1024 * 1024)
174 /* The number of repetitions of copy/const prop and PRE to run. */
175 DEFPARAM(PARAM_MAX_GCSE_PASSES,
176 "max-gcse-passes",
177 "The maximum number of passes to make when doing GCSE",
180 /* This parameter limits the number of insns in a loop that will be unrolled,
181 and by how much the loop is unrolled. */
182 DEFPARAM(PARAM_MAX_UNROLLED_INSNS,
183 "max-unrolled-insns",
184 "The maximum number of instructions to consider to unroll in a loop",
185 200)
186 /* This parameter limits how many times the loop is unrolled depending
187 on number of insns really executed in each iteration. */
188 DEFPARAM(PARAM_MAX_AVERAGE_UNROLLED_INSNS,
189 "max-average-unrolled-insns",
190 "The maximum number of instructions to consider to unroll in a loop on average",
192 /* The maximum number of unrollings of a single loop. */
193 DEFPARAM(PARAM_MAX_UNROLL_TIMES,
194 "max-unroll-times",
195 "The maximum number of unrollings of a single loop",
197 /* The maximum number of insns of a peeled loop. */
198 DEFPARAM(PARAM_MAX_PEELED_INSNS,
199 "max-peeled-insns",
200 "The maximum number of insns of a peeled loop",
201 120)
202 /* The maximum number of peelings of a single loop. */
203 DEFPARAM(PARAM_MAX_PEEL_TIMES,
204 "max-peel-times",
205 "The maximum number of peelings of a single loop",
207 /* The maximum number of insns of a peeled loop. */
208 DEFPARAM(PARAM_MAX_COMPLETELY_PEELED_INSNS,
209 "max-completely-peeled-insns",
210 "The maximum number of insns of a completely peeled loop",
211 120)
212 /* The maximum number of peelings of a single loop that is peeled completely. */
213 DEFPARAM(PARAM_MAX_COMPLETELY_PEEL_TIMES,
214 "max-completely-peel-times",
215 "The maximum number of peelings of a single loop that is peeled completely",
217 /* The maximum number of insns of a peeled loop that rolls only once. */
218 DEFPARAM(PARAM_MAX_ONCE_PEELED_INSNS,
219 "max-once-peeled-insns",
220 "The maximum number of insns of a peeled loop that rolls only once",
221 200)
223 /* The maximum number of insns of an unswitched loop. */
224 DEFPARAM(PARAM_MAX_UNSWITCH_INSNS,
225 "max-unswitch-insns",
226 "The maximum number of insns of an unswitched loop",
228 /* The maximum level of recursion in unswitch_single_loop. */
229 DEFPARAM(PARAM_MAX_UNSWITCH_LEVEL,
230 "max-unswitch-level",
231 "The maximum number of unswitchings in a single loop",
234 DEFPARAM(HOT_BB_COUNT_FRACTION,
235 "hot-bb-count-fraction",
236 "Select fraction of the maximal count of repetitions of basic block in \
237 program given basic block needs to have to be considered hot",
238 10000)
239 DEFPARAM(HOT_BB_FREQUENCY_FRACTION,
240 "hot-bb-frequency-fraction",
241 "Select fraction of the maximal frequency of executions of basic \
242 block in function given basic block needs to have to be considered hot",
243 1000)
244 DEFPARAM(TRACER_DYNAMIC_COVERAGE_FEEDBACK,
245 "tracer-dynamic-coverage-feedback",
246 "The percentage of function, weighted by execution frequency, that \
247 must be covered by trace formation. Used when profile feedback is available",
249 DEFPARAM(TRACER_DYNAMIC_COVERAGE,
250 "tracer-dynamic-coverage",
251 "The percentage of function, weighted by execution frequency, that \
252 must be covered by trace formation. Used when profile feedback is not available",
254 DEFPARAM(TRACER_MAX_CODE_GROWTH,
255 "tracer-max-code-growth",
256 "Maximal code growth caused by tail duplication (in percent)",
257 100)
258 DEFPARAM(TRACER_MIN_BRANCH_RATIO,
259 "tracer-min-branch-ratio",
260 "Stop reverse growth if the reverse probability of best edge is less \
261 than this threshold (in percent)",
263 DEFPARAM(TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK,
264 "tracer-min-branch-probability-feedback",
265 "Stop forward growth if the probability of best edge is less than \
266 this threshold (in percent). Used when profile feedback is available",
268 DEFPARAM(TRACER_MIN_BRANCH_PROBABILITY,
269 "tracer-min-branch-probability",
270 "Stop forward growth if the probability of best edge is less than \
271 this threshold (in percent). Used when profile feedback is not available",
274 /* The maximum number of incoming edges to consider for crossjumping. */
275 DEFPARAM(PARAM_MAX_CROSSJUMP_EDGES,
276 "max-crossjump-edges",
277 "The maximum number of incoming edges to consider for crossjumping",
278 100)
280 /* The maximum length of path considered in cse. */
281 DEFPARAM(PARAM_MAX_CSE_PATH_LENGTH,
282 "max-cse-path-length",
283 "The maximum length of path considered in cse",
286 #ifdef ENABLE_GC_ALWAYS_COLLECT
287 # define GGC_MIN_EXPAND_DEFAULT 0
288 # define GGC_MIN_HEAPSIZE_DEFAULT 0
289 #else
290 # define GGC_MIN_EXPAND_DEFAULT 30
291 # define GGC_MIN_HEAPSIZE_DEFAULT 4096
292 #endif
294 DEFPARAM(GGC_MIN_EXPAND,
295 "ggc-min-expand",
296 "Minimum heap expansion to trigger garbage collection, as \
297 a percentage of the total size of the heap",
298 GGC_MIN_EXPAND_DEFAULT)
300 DEFPARAM(GGC_MIN_HEAPSIZE,
301 "ggc-min-heapsize",
302 "Minimum heap size before we start collecting garbage, in kilobytes",
303 GGC_MIN_HEAPSIZE_DEFAULT)
305 #undef GGC_MIN_EXPAND_DEFAULT
306 #undef GGC_MIN_HEAPSIZE_DEFAULT
309 Local variables:
310 mode:c
311 End: */