]>
Commit | Line | Data |
---|---|---|
c6d9a88c | 1 | /* params.def - Run-time parameters. |
711d8c91 | 2 | Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. |
c6d9a88c MM |
3 | Written by Mark Mitchell <mark@codesourcery.com>. |
4 | ||
1322177d | 5 | This file is part of GCC. |
c6d9a88c | 6 | |
1322177d LB |
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. | |
c6d9a88c | 11 | |
1322177d LB |
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. | |
c6d9a88c MM |
16 | |
17 | You should have received a copy of the GNU General Public License | |
1322177d LB |
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. | |
c6d9a88c MM |
21 | |
22 | */ | |
23 | ||
24 | /* This file contains definitions for language-independent | |
25 | parameters. The DEFPARAM macro takes 4 arguments: | |
26 | ||
0443f602 | 27 | - The enumeral corresponding to this parameter. |
c6d9a88c MM |
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 | ||
1c4c47db JO |
34 | - A default value for the parameter. |
35 | ||
36 | Be sure to add an entry to invoke.texi summarizing the parameter. */ | |
c6d9a88c | 37 | |
a6227154 KG |
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. | |
bd04ab32 | 42 | The default value is 500. |
a6227154 KG |
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", | |
bc522472 | 53 | "The maximum number of instructions in a single function eligible for inlining", |
1f95c733 | 54 | 500) |
a6227154 | 55 | |
bc522472 KG |
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. | |
bd04ab32 | 62 | The default value is 150. */ |
bc522472 KG |
63 | DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO, |
64 | "max-inline-insns-auto", | |
65 | "The maximum number of instructions when automatically inlining", | |
3b75d796 | 66 | 120) |
bc522472 | 67 | |
6de9cd9a DN |
68 | DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE, |
69 | "max-inline-insns-recursive", | |
70 | "The maximum number of instructions inline function can grow to via recursive inlining", | |
71 | 500) | |
72 | ||
73 | DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO, | |
74 | "max-inline-insns-recursive-auto", | |
75 | "The maximum number of instructions non-inline function can grow to via recursive inlining", | |
76 | 500) | |
77 | ||
78 | DEFPARAM (PARAM_MAX_INLINE_RECURSIVE_DEPTH, | |
79 | "max-inline-recursive-depth", | |
80 | "The maximum depth of recursive inlining for inline functions", | |
81 | 8) | |
82 | ||
83 | DEFPARAM (PARAM_MAX_INLINE_RECURSIVE_DEPTH_AUTO, | |
84 | "max-inline-recursive-depth-auto", | |
85 | "The maximum depth of recursive inlining for non-inline functions", | |
86 | 8) | |
87 | ||
bc522472 KG |
88 | /* For languages that (still) use the RTL inliner, we can specify |
89 | limits for the RTL inliner separately. | |
90 | The parameter here defines the maximum number of RTL instructions | |
91 | a function may have to be eligible for inlining in the RTL inliner. | |
92 | The default value is 600. */ | |
93 | DEFPARAM (PARAM_MAX_INLINE_INSNS_RTL, | |
94 | "max-inline-insns-rtl", | |
95 | "The maximum number of instructions for the RTL inliner", | |
96 | 600) | |
97 | ||
0443f602 JO |
98 | /* The maximum number of instructions to consider when looking for an |
99 | instruction to fill a delay slot. If more than this arbitrary | |
100 | number of instructions is searched, the time savings from filling | |
101 | the delay slot will be minimal so stop searching. Increasing | |
102 | values mean more aggressive optimization, making the compile time | |
103 | increase with probably small improvement in executable run time. */ | |
104 | DEFPARAM (PARAM_MAX_DELAY_SLOT_INSN_SEARCH, | |
105 | "max-delay-slot-insn-search", | |
106 | "The maximum number of instructions to consider to fill a delay slot", | |
107 | 100) | |
108 | ||
d5d063d7 JO |
109 | /* When trying to fill delay slots, the maximum number of instructions |
110 | to consider when searching for a block with valid live register | |
111 | information. Increasing this arbitrarily chosen value means more | |
112 | aggressive optimization, increasing the compile time. This | |
113 | parameter should be removed when the delay slot code is rewritten | |
114 | to maintain the control-flow graph. */ | |
115 | DEFPARAM(PARAM_MAX_DELAY_SLOT_LIVE_SEARCH, | |
116 | "max-delay-slot-live-search", | |
117 | "The maximum number of instructions to consider to find accurate live register information", | |
118 | 333) | |
119 | ||
4a121cc3 | 120 | /* This parameter limits the number of branch elements that the |
ff7cc307 | 121 | scheduler will track anti-dependencies through without resetting |
4a121cc3 | 122 | the tracking mechanism. Large functions with few calls or barriers |
ff7cc307 | 123 | can generate lists containing many 1000's of dependencies. Generally |
4a121cc3 AM |
124 | the compiler either uses all available memory, or runs for far too long. */ |
125 | DEFPARAM(PARAM_MAX_PENDING_LIST_LENGTH, | |
126 | "max-pending-list-length", | |
127 | "The maximum length of scheduling's pending operations list", | |
128 | 32) | |
129 | ||
b58b1157 JH |
130 | DEFPARAM(PARAM_LARGE_FUNCTION_INSNS, |
131 | "large-function-insns", | |
132 | "The size of function body to be considered large", | |
3b75d796 | 133 | 3000) |
b58b1157 JH |
134 | DEFPARAM(PARAM_LARGE_FUNCTION_GROWTH, |
135 | "large-function-growth", | |
2cc98056 | 136 | "Maximal growth due to inlining of large function (in percent)", |
b58b1157 JH |
137 | 100) |
138 | DEFPARAM(PARAM_INLINE_UNIT_GROWTH, | |
139 | "inline-unit-growth", | |
2cc98056 | 140 | "how much can given compilation unit grow because of the inlining (in percent)", |
b58b1157 JH |
141 | 50) |
142 | ||
f1fa37ff MM |
143 | /* The GCSE optimization will be disabled if it would require |
144 | significantly more memory than this value. */ | |
145 | DEFPARAM(PARAM_MAX_GCSE_MEMORY, | |
146 | "max-gcse-memory", | |
147 | "The maximum amount of memory to be allocated by GCSE", | |
148 | 50 * 1024 * 1024) | |
991b6592 | 149 | /* The number of repetitions of copy/const prop and PRE to run. */ |
740f35a0 DB |
150 | DEFPARAM(PARAM_MAX_GCSE_PASSES, |
151 | "max-gcse-passes", | |
152 | "The maximum number of passes to make when doing GCSE", | |
153 | 1) | |
f9957958 MH |
154 | /* This is the threshold ratio when to perform partial redundancy |
155 | elimination after reload. We perform partial redundancy elimination | |
156 | when the following holds: | |
157 | (Redundant load execution count) | |
158 | ------------------------------- >= GCSE_AFTER_RELOAD_PARTIAL_FRACTION | |
159 | (Added loads execution count) */ | |
160 | DEFPARAM(PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION, | |
161 | "gcse-after-reload-partial-fraction", | |
162 | "The threshold ratio for performing partial redundancy elimination \ | |
163 | after reload.", | |
164 | 3) | |
165 | /* This is the threshold ratio of the critical edges execution count compared to | |
166 | the redundant loads execution count that permits performing the load | |
167 | redundancy elimination in gcse after reload. */ | |
168 | DEFPARAM(PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION, | |
169 | "gcse-after-reload-critical-fraction", | |
170 | "The threshold ratio of critical edges execution count that permit \ | |
171 | performing redundancy elimination after reload.", | |
172 | 10) | |
03e9dbc9 | 173 | /* This parameter limits the number of insns in a loop that will be unrolled, |
701ad47e JH |
174 | and by how much the loop is unrolled. |
175 | ||
176 | This limit should be at most half of the peeling limits: loop unroller | |
177 | decides to not unroll loops that iterate fewer than 2*number of allowed | |
a1105617 | 178 | unrollings and thus we would have loops that are neither peeled or unrolled |
701ad47e | 179 | otherwise. */ |
03e9dbc9 MM |
180 | DEFPARAM(PARAM_MAX_UNROLLED_INSNS, |
181 | "max-unrolled-insns", | |
182 | "The maximum number of instructions to consider to unroll in a loop", | |
b17d5d7c ZD |
183 | 200) |
184 | /* This parameter limits how many times the loop is unrolled depending | |
185 | on number of insns really executed in each iteration. */ | |
186 | DEFPARAM(PARAM_MAX_AVERAGE_UNROLLED_INSNS, | |
187 | "max-average-unrolled-insns", | |
188 | "The maximum number of instructions to consider to unroll in a loop on average", | |
189 | 80) | |
190 | /* The maximum number of unrollings of a single loop. */ | |
191 | DEFPARAM(PARAM_MAX_UNROLL_TIMES, | |
192 | "max-unroll-times", | |
193 | "The maximum number of unrollings of a single loop", | |
194 | 8) | |
195 | /* The maximum number of insns of a peeled loop. */ | |
196 | DEFPARAM(PARAM_MAX_PEELED_INSNS, | |
197 | "max-peeled-insns", | |
198 | "The maximum number of insns of a peeled loop", | |
701ad47e | 199 | 400) |
b17d5d7c ZD |
200 | /* The maximum number of peelings of a single loop. */ |
201 | DEFPARAM(PARAM_MAX_PEEL_TIMES, | |
202 | "max-peel-times", | |
203 | "The maximum number of peelings of a single loop", | |
204 | 16) | |
205 | /* The maximum number of insns of a peeled loop. */ | |
206 | DEFPARAM(PARAM_MAX_COMPLETELY_PEELED_INSNS, | |
207 | "max-completely-peeled-insns", | |
208 | "The maximum number of insns of a completely peeled loop", | |
701ad47e | 209 | 400) |
b17d5d7c ZD |
210 | /* The maximum number of peelings of a single loop that is peeled completely. */ |
211 | DEFPARAM(PARAM_MAX_COMPLETELY_PEEL_TIMES, | |
212 | "max-completely-peel-times", | |
213 | "The maximum number of peelings of a single loop that is peeled completely", | |
214 | 16) | |
215 | /* The maximum number of insns of a peeled loop that rolls only once. */ | |
216 | DEFPARAM(PARAM_MAX_ONCE_PEELED_INSNS, | |
217 | "max-once-peeled-insns", | |
218 | "The maximum number of insns of a peeled loop that rolls only once", | |
701ad47e | 219 | 400) |
194734e9 | 220 | |
617b465c ZD |
221 | /* The maximum number of insns of an unswitched loop. */ |
222 | DEFPARAM(PARAM_MAX_UNSWITCH_INSNS, | |
223 | "max-unswitch-insns", | |
224 | "The maximum number of insns of an unswitched loop", | |
225 | 50) | |
226 | /* The maximum level of recursion in unswitch_single_loop. */ | |
227 | DEFPARAM(PARAM_MAX_UNSWITCH_LEVEL, | |
228 | "max-unswitch-level", | |
229 | "The maximum number of unswitchings in a single loop", | |
230 | 3) | |
231 | ||
e9eb809d ZD |
232 | /* The maximum number of iterations of a loop the brute force algorithm |
233 | for analysis of # of iterations of the loop tries to evaluate. */ | |
234 | DEFPARAM(PARAM_MAX_ITERATIONS_TO_TRACK, | |
235 | "max-iterations-to-track", | |
236 | "Bound on the number of iterations the brute force # of iterations \ | |
237 | analysis algorithm evaluates", | |
238 | 1000) | |
239 | ||
e5626198 AZ |
240 | DEFPARAM(PARAM_MAX_SMS_LOOP_NUMBER, |
241 | "max-sms-loop-number", | |
242 | "Maximum number of loops to perform swing modulo scheduling on \ | |
243 | (mainly for debugging)", | |
244 | -1) | |
245 | ||
246 | /* This parameter is used to tune SMS MAX II calculations. */ | |
247 | DEFPARAM(PARAM_SMS_MAX_II_FACTOR, | |
248 | "sms-max-ii-factor", | |
249 | "A factor for tuning the upper bound that swing modulo scheduler uses \ | |
250 | for scheduling a loop", | |
251 | 100) | |
252 | DEFPARAM(PARAM_SMS_DFA_HISTORY, | |
253 | "sms-dfa-history", | |
254 | "The number of cycles the swing modulo scheduler considers when \ | |
255 | checking conflicts using DFA", | |
256 | 0) | |
257 | DEFPARAM(PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD, | |
258 | "sms-loop-average-count-threshold", | |
259 | "A threshold on the average loop count considered by the swing modulo \ | |
260 | scheduler", | |
261 | 0) | |
262 | ||
194734e9 JH |
263 | DEFPARAM(HOT_BB_COUNT_FRACTION, |
264 | "hot-bb-count-fraction", | |
5c856b23 JH |
265 | "Select fraction of the maximal count of repetitions of basic block in \ |
266 | program given basic block needs to have to be considered hot", | |
194734e9 JH |
267 | 10000) |
268 | DEFPARAM(HOT_BB_FREQUENCY_FRACTION, | |
269 | "hot-bb-frequency-fraction", | |
5c856b23 JH |
270 | "Select fraction of the maximal frequency of executions of basic \ |
271 | block in function given basic block needs to have to be considered hot", | |
194734e9 | 272 | 1000) |
5c856b23 JH |
273 | DEFPARAM(TRACER_DYNAMIC_COVERAGE_FEEDBACK, |
274 | "tracer-dynamic-coverage-feedback", | |
275 | "The percentage of function, weighted by execution frequency, that \ | |
276 | must be covered by trace formation. Used when profile feedback is available", | |
277 | 95) | |
278 | DEFPARAM(TRACER_DYNAMIC_COVERAGE, | |
279 | "tracer-dynamic-coverage", | |
280 | "The percentage of function, weighted by execution frequency, that \ | |
281 | must be covered by trace formation. Used when profile feedback is not available", | |
282 | 75) | |
283 | DEFPARAM(TRACER_MAX_CODE_GROWTH, | |
284 | "tracer-max-code-growth", | |
2cc98056 | 285 | "Maximal code growth caused by tail duplication (in percent)", |
5c856b23 JH |
286 | 100) |
287 | DEFPARAM(TRACER_MIN_BRANCH_RATIO, | |
288 | "tracer-min-branch-ratio", | |
289 | "Stop reverse growth if the reverse probability of best edge is less \ | |
2cc98056 | 290 | than this threshold (in percent)", |
5c856b23 JH |
291 | 10) |
292 | DEFPARAM(TRACER_MIN_BRANCH_PROBABILITY_FEEDBACK, | |
293 | "tracer-min-branch-probability-feedback", | |
294 | "Stop forward growth if the probability of best edge is less than \ | |
2cc98056 | 295 | this threshold (in percent). Used when profile feedback is available", |
66b4e478 | 296 | 80) |
5c856b23 JH |
297 | DEFPARAM(TRACER_MIN_BRANCH_PROBABILITY, |
298 | "tracer-min-branch-probability", | |
299 | "Stop forward growth if the probability of best edge is less than \ | |
2cc98056 | 300 | this threshold (in percent). Used when profile feedback is not available", |
5c856b23 | 301 | 50) |
3788cc17 | 302 | |
5f24e0dc RH |
303 | /* The maximum number of incoming edges to consider for crossjumping. */ |
304 | DEFPARAM(PARAM_MAX_CROSSJUMP_EDGES, | |
305 | "max-crossjump-edges", | |
306 | "The maximum number of incoming edges to consider for crossjumping", | |
307 | 100) | |
308 | ||
9bf8cfbf ZD |
309 | /* The maximum length of path considered in cse. */ |
310 | DEFPARAM(PARAM_MAX_CSE_PATH_LENGTH, | |
311 | "max-cse-path-length", | |
2cc98056 | 312 | "The maximum length of path considered in cse", |
9bf8cfbf ZD |
313 | 10) |
314 | ||
6de9cd9a DN |
315 | /* The product of the next two is used to decide whether or not to |
316 | use .GLOBAL_VAR. See tree-dfa.c. */ | |
317 | DEFPARAM(PARAM_GLOBAL_VAR_THRESHOLD, | |
318 | "global-var-threshold", | |
319 | "Given N calls and V call-clobbered vars in a function. Use .GLOBAL_VAR if NxV is larger than this limit", | |
320 | 500000) | |
321 | ||
c65ecebc JH |
322 | DEFPARAM(PARAM_MAX_CSELIB_MEMORY_LOCATIONS, |
323 | "max-cselib-memory-locations", | |
324 | "The maximum memory locations recorded by cselib", | |
325 | 500) | |
326 | ||
3788cc17 ZW |
327 | #ifdef ENABLE_GC_ALWAYS_COLLECT |
328 | # define GGC_MIN_EXPAND_DEFAULT 0 | |
737c38d1 | 329 | # define GGC_MIN_HEAPSIZE_DEFAULT 0 |
3788cc17 ZW |
330 | #else |
331 | # define GGC_MIN_EXPAND_DEFAULT 30 | |
737c38d1 | 332 | # define GGC_MIN_HEAPSIZE_DEFAULT 4096 |
3788cc17 ZW |
333 | #endif |
334 | ||
335 | DEFPARAM(GGC_MIN_EXPAND, | |
336 | "ggc-min-expand", | |
337 | "Minimum heap expansion to trigger garbage collection, as \ | |
2cc98056 | 338 | a percentage of the total size of the heap", |
3788cc17 ZW |
339 | GGC_MIN_EXPAND_DEFAULT) |
340 | ||
3788cc17 ZW |
341 | DEFPARAM(GGC_MIN_HEAPSIZE, |
342 | "ggc-min-heapsize", | |
2cc98056 | 343 | "Minimum heap size before we start collecting garbage, in kilobytes", |
737c38d1 GK |
344 | GGC_MIN_HEAPSIZE_DEFAULT) |
345 | ||
346 | #undef GGC_MIN_EXPAND_DEFAULT | |
347 | #undef GGC_MIN_HEAPSIZE_DEFAULT | |
3788cc17 | 348 | |
0bcf8261 JH |
349 | DEFPARAM(PARAM_MAX_RELOAD_SEARCH_INSNS, |
350 | "max-reload-search-insns", | |
351 | "The maximum number of instructions to search backward when looking for equivalent reload", | |
352 | 100) | |
353 | ||
6de9cd9a DN |
354 | DEFPARAM(PARAM_MAX_ALIASED_VOPS, |
355 | "max-aliased-vops", | |
356 | "The maximum number of virtual operands allowed to represent aliases before triggering alias grouping.", | |
357 | 500) | |
358 | ||
f72c6b56 DE |
359 | DEFPARAM(PARAM_MAX_SCHED_REGION_BLOCKS, |
360 | "max-sched-region-blocks", | |
361 | "The maximum number of blocks in a region to be considered for interblock scheduling", | |
362 | 10) | |
363 | ||
364 | DEFPARAM(PARAM_MAX_SCHED_REGION_INSNS, | |
365 | "max-sched-region-insns", | |
366 | "The maximum number of insns in a region to be considered for interblock scheduling", | |
367 | 100) | |
368 | ||
c6d9a88c MM |
369 | /* |
370 | Local variables: | |
371 | mode:c | |
372 | End: */ |