Mercurial > hg > CbC > CbC_gcc
annotate gcc/params.h @ 96:506ac5e3963a
modify expand_call
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 17 Jan 2012 06:11:37 +0900 |
parents | f6334be47118 |
children | 04ced10e8804 |
rev | line source |
---|---|
0 | 1 /* params.h - Run-time parameters. |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
2 Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 |
0 | 3 Free Software Foundation, Inc. |
4 Written by Mark Mitchell <mark@codesourcery.com>. | |
5 | |
6 This file is part of GCC. | |
7 | |
8 GCC is free software; you can redistribute it and/or modify it under | |
9 the terms of the GNU General Public License as published by the Free | |
10 Software Foundation; either version 3, or (at your option) any later | |
11 version. | |
12 | |
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with GCC; see the file COPYING3. If not see | |
20 <http://www.gnu.org/licenses/>. */ | |
21 | |
22 /* This module provides a means for setting integral parameters | |
23 dynamically. Instead of encoding magic numbers in various places, | |
24 use this module to organize all the magic numbers in a single | |
25 place. The values of the parameters can be set on the | |
26 command-line, thereby providing a way to control the amount of | |
27 effort spent on particular optimization passes, or otherwise tune | |
28 the behavior of the compiler. | |
29 | |
30 Since their values can be set on the command-line, these parameters | |
31 should not be used for non-dynamic memory allocation. */ | |
32 | |
33 #ifndef GCC_PARAMS_H | |
34 #define GCC_PARAMS_H | |
35 | |
36 /* No parameter shall have this value. */ | |
37 | |
38 #define INVALID_PARAM_VAL (-1) | |
39 | |
40 /* The information associated with each parameter. */ | |
41 | |
42 typedef struct param_info | |
43 { | |
44 /* The name used with the `--param <name>=<value>' switch to set this | |
45 value. */ | |
46 const char *const option; | |
47 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
48 /* The default value. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
49 int default_value; |
0 | 50 |
51 /* Minimum acceptable value. */ | |
52 int min_value; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
53 |
0 | 54 /* Maximum acceptable value, if greater than minimum */ |
55 int max_value; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
56 |
0 | 57 /* A short description of the option. */ |
58 const char *const help; | |
59 } param_info; | |
60 | |
61 /* An array containing the compiler parameters and their current | |
62 values. */ | |
63 | |
64 extern param_info *compiler_params; | |
65 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
66 /* Returns the number of entries in the table, for the use by plugins. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
67 extern size_t get_num_compiler_params (void); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
68 |
0 | 69 /* Add the N PARAMS to the current list of compiler parameters. */ |
70 | |
71 extern void add_params (const param_info params[], size_t n); | |
72 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
73 /* Set the VALUE associated with the parameter given by NAME in the |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
74 table PARAMS using PARAMS_SET to indicate which have been |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
75 explicitly set. */ |
0 | 76 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
77 extern void set_param_value (const char *name, int value, |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
78 int *params, int *params_set); |
0 | 79 |
80 | |
81 /* The parameters in use by language-independent code. */ | |
82 | |
83 typedef enum compiler_param | |
84 { | |
85 #define DEFPARAM(enumerator, option, msgid, default, min, max) \ | |
86 enumerator, | |
87 #include "params.def" | |
88 #undef DEFPARAM | |
89 LAST_PARAM | |
90 } compiler_param; | |
91 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
92 /* The value of the parameter given by ENUM. Not an lvalue. */ |
0 | 93 #define PARAM_VALUE(ENUM) \ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
94 ((int) global_options.x_param_values[(int) ENUM]) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
95 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
96 /* Set the value of the parameter given by NUM to VALUE, implicitly, |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
97 if it has not been set explicitly by the user, in the table PARAMS |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
98 using PARAMS_SET to indicate which have been explicitly set. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
99 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
100 extern void maybe_set_param_value (compiler_param num, int value, |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
101 int *params, int *params_set); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
102 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
103 /* Set the default value of a parameter given by NUM to VALUE, before |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
104 option processing. */ |
0 | 105 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
106 extern void set_default_param_value (compiler_param num, int value); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
107 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
108 /* Note that all parameters have been added and all default values |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
109 set. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
110 extern void finish_params (void); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
111 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
112 /* Return the default value of parameter NUM. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
113 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
114 extern int default_param_value (compiler_param num); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
115 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
116 /* Initialize an array PARAMS with default values of the |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
117 parameters. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
118 extern void init_param_values (int *params); |
0 | 119 |
120 /* Macros for the various parameters. */ | |
121 #define STRUCT_REORG_COLD_STRUCT_RATIO \ | |
122 PARAM_VALUE (PARAM_STRUCT_REORG_COLD_STRUCT_RATIO) | |
123 #define MAX_INLINE_INSNS_SINGLE \ | |
124 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE) | |
125 #define MAX_INLINE_INSNS \ | |
126 PARAM_VALUE (PARAM_MAX_INLINE_INSNS) | |
127 #define MAX_INLINE_SLOPE \ | |
128 PARAM_VALUE (PARAM_MAX_INLINE_SLOPE) | |
129 #define MIN_INLINE_INSNS \ | |
130 PARAM_VALUE (PARAM_MIN_INLINE_INSNS) | |
131 #define MAX_INLINE_INSNS_AUTO \ | |
132 PARAM_VALUE (PARAM_MAX_INLINE_INSNS_AUTO) | |
133 #define MAX_VARIABLE_EXPANSIONS \ | |
134 PARAM_VALUE (PARAM_MAX_VARIABLE_EXPANSIONS) | |
135 #define MIN_VECT_LOOP_BOUND \ | |
136 PARAM_VALUE (PARAM_MIN_VECT_LOOP_BOUND) | |
137 #define MAX_DELAY_SLOT_INSN_SEARCH \ | |
138 PARAM_VALUE (PARAM_MAX_DELAY_SLOT_INSN_SEARCH) | |
139 #define MAX_DELAY_SLOT_LIVE_SEARCH \ | |
140 PARAM_VALUE (PARAM_MAX_DELAY_SLOT_LIVE_SEARCH) | |
141 #define MAX_PENDING_LIST_LENGTH \ | |
142 PARAM_VALUE (PARAM_MAX_PENDING_LIST_LENGTH) | |
143 #define MAX_GCSE_MEMORY \ | |
144 ((size_t) PARAM_VALUE (PARAM_MAX_GCSE_MEMORY)) | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
145 #define MAX_GCSE_INSERTION_RATIO \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
146 ((size_t) PARAM_VALUE (PARAM_MAX_GCSE_INSERTION_RATIO)) |
0 | 147 #define GCSE_AFTER_RELOAD_PARTIAL_FRACTION \ |
148 PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION) | |
149 #define GCSE_AFTER_RELOAD_CRITICAL_FRACTION \ | |
150 PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION) | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
151 #define GCSE_COST_DISTANCE_RATIO \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
152 PARAM_VALUE (PARAM_GCSE_COST_DISTANCE_RATIO) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
153 #define GCSE_UNRESTRICTED_COST \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
154 PARAM_VALUE (PARAM_GCSE_UNRESTRICTED_COST) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
155 #define MAX_HOIST_DEPTH \ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
156 PARAM_VALUE (PARAM_MAX_HOIST_DEPTH) |
0 | 157 #define MAX_UNROLLED_INSNS \ |
158 PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS) | |
159 #define MAX_SMS_LOOP_NUMBER \ | |
160 PARAM_VALUE (PARAM_MAX_SMS_LOOP_NUMBER) | |
161 #define SMS_MAX_II_FACTOR \ | |
162 PARAM_VALUE (PARAM_SMS_MAX_II_FACTOR) | |
163 #define SMS_DFA_HISTORY \ | |
164 PARAM_VALUE (PARAM_SMS_DFA_HISTORY) | |
165 #define SMS_LOOP_AVERAGE_COUNT_THRESHOLD \ | |
166 PARAM_VALUE (PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD) | |
167 #define INTEGER_SHARE_LIMIT \ | |
168 PARAM_VALUE (PARAM_INTEGER_SHARE_LIMIT) | |
169 #define MAX_LAST_VALUE_RTL \ | |
170 PARAM_VALUE (PARAM_MAX_LAST_VALUE_RTL) | |
171 #define MIN_VIRTUAL_MAPPINGS \ | |
172 PARAM_VALUE (PARAM_MIN_VIRTUAL_MAPPINGS) | |
173 #define VIRTUAL_MAPPINGS_TO_SYMS_RATIO \ | |
174 PARAM_VALUE (PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO) | |
175 #define MAX_FIELDS_FOR_FIELD_SENSITIVE \ | |
176 ((size_t) PARAM_VALUE (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE)) | |
177 #define MAX_SCHED_READY_INSNS \ | |
178 PARAM_VALUE (PARAM_MAX_SCHED_READY_INSNS) | |
179 #define PREFETCH_LATENCY \ | |
180 PARAM_VALUE (PARAM_PREFETCH_LATENCY) | |
181 #define SIMULTANEOUS_PREFETCHES \ | |
182 PARAM_VALUE (PARAM_SIMULTANEOUS_PREFETCHES) | |
183 #define L1_CACHE_SIZE \ | |
184 PARAM_VALUE (PARAM_L1_CACHE_SIZE) | |
185 #define L1_CACHE_LINE_SIZE \ | |
186 PARAM_VALUE (PARAM_L1_CACHE_LINE_SIZE) | |
187 #define L2_CACHE_SIZE \ | |
188 PARAM_VALUE (PARAM_L2_CACHE_SIZE) | |
189 #define USE_CANONICAL_TYPES \ | |
190 PARAM_VALUE (PARAM_USE_CANONICAL_TYPES) | |
191 #define IRA_MAX_LOOPS_NUM \ | |
192 PARAM_VALUE (PARAM_IRA_MAX_LOOPS_NUM) | |
193 #define IRA_MAX_CONFLICT_TABLE_SIZE \ | |
194 PARAM_VALUE (PARAM_IRA_MAX_CONFLICT_TABLE_SIZE) | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
195 #define IRA_LOOP_RESERVED_REGS \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
196 PARAM_VALUE (PARAM_IRA_LOOP_RESERVED_REGS) |
0 | 197 #define SWITCH_CONVERSION_BRANCH_RATIO \ |
198 PARAM_VALUE (PARAM_SWITCH_CONVERSION_BRANCH_RATIO) | |
199 #define LOOP_INVARIANT_MAX_BBS_IN_LOOP \ | |
200 PARAM_VALUE (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
201 #define SLP_MAX_INSNS_IN_BB \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
202 PARAM_VALUE (PARAM_SLP_MAX_INSNS_IN_BB) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
203 #define MIN_INSN_TO_PREFETCH_RATIO \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
204 PARAM_VALUE (PARAM_MIN_INSN_TO_PREFETCH_RATIO) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
205 #define PREFETCH_MIN_INSN_TO_MEM_RATIO \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
206 PARAM_VALUE (PARAM_PREFETCH_MIN_INSN_TO_MEM_RATIO) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
207 #define MIN_NONDEBUG_INSN_UID \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
208 PARAM_VALUE (PARAM_MIN_NONDEBUG_INSN_UID) |
0 | 209 #endif /* ! GCC_PARAMS_H */ |