Mercurial > hg > CbC > CbC_gcc
annotate gcc/ipa-prop.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
rev | line source |
---|---|
0 | 1 /* Interprocedural analyses. |
131 | 2 Copyright (C) 2005-2018 Free Software Foundation, Inc. |
0 | 3 |
4 This file is part of GCC. | |
5 | |
6 GCC is free software; you can redistribute it and/or modify it under | |
7 the terms of the GNU General Public License as published by the Free | |
8 Software Foundation; either version 3, or (at your option) any later | |
9 version. | |
10 | |
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GCC; see the file COPYING3. If not see | |
18 <http://www.gnu.org/licenses/>. */ | |
19 | |
20 #ifndef IPA_PROP_H | |
21 #define IPA_PROP_H | |
22 | |
23 /* The following definitions and interfaces are used by | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 interprocedural analyses or parameters. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 |
111 | 26 #define IPA_UNDESCRIBED_USE -1 |
27 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
28 /* ipa-prop.c stuff (ipa-cp, indirect inlining): */ |
0 | 29 |
30 /* A jump function for a callsite represents the values passed as actual | |
111 | 31 arguments of the callsite. They were originally proposed in a paper called |
32 "Interprocedural Constant Propagation", by David Callahan, Keith D Cooper, | |
33 Ken Kennedy, Linda Torczon in Comp86, pg 152-161. There are three main | |
34 types of values : | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
35 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
36 Pass-through - the caller's formal parameter is passed as an actual |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
37 argument, possibly one simple operation performed on it. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
38 Constant - a constant (is_gimple_ip_invariant)is passed as an actual |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
39 argument. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
40 Unknown - neither of the above. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
41 |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
42 IPA_JF_ANCESTOR is a special pass-through jump function, which means that |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
43 the result is an address of a part of the object pointed to by the formal |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
44 parameter to which the function refers. It is mainly intended to represent |
111 | 45 getting addresses of ancestor fields in C++ |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
46 (e.g. &this_1(D)->D.1766.D.1756). Note that if the original pointer is |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
47 NULL, ancestor jump function must behave like a simple pass-through. |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
48 |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
49 Other pass-through functions can either simply pass on an unchanged formal |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
50 parameter or can apply one simple binary operation to it (such jump |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
51 functions are called polynomial). |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
52 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
53 Jump functions are computed in ipa-prop.c by function |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
54 update_call_notes_after_inlining. Some information can be lost and jump |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
55 functions degraded accordingly when inlining, see |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
56 update_call_notes_after_inlining in the same file. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
57 |
0 | 58 enum jump_func_type |
59 { | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
60 IPA_JF_UNKNOWN = 0, /* newly allocated and zeroed jump functions default */ |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
61 IPA_JF_CONST, /* represented by field costant */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
62 IPA_JF_PASS_THROUGH, /* represented by field pass_through */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
63 IPA_JF_ANCESTOR /* represented by field ancestor */ |
0 | 64 }; |
65 | |
111 | 66 struct ipa_cst_ref_desc; |
67 | |
68 /* Structure holding data required to describe a constant jump function. */ | |
69 struct GTY(()) ipa_constant_data | |
70 { | |
71 /* THe value of the constant. */ | |
72 tree value; | |
73 /* Pointer to the structure that describes the reference. */ | |
74 struct ipa_cst_ref_desc GTY((skip)) *rdesc; | |
75 }; | |
76 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
77 /* Structure holding data required to describe a pass-through jump function. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
78 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
79 struct GTY(()) ipa_pass_through_data |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
80 { |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
81 /* If an operation is to be performed on the original parameter, this is the |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
82 second (constant) operand. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
83 tree operand; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
84 /* Number of the caller's formal parameter being passed. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
85 int formal_id; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
86 /* Operation that is performed on the argument before it is passed on. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
87 NOP_EXPR means no operation. Otherwise oper must be a simple binary |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
88 arithmetic operation where the caller's parameter is the first operand and |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
89 operand field from this structure is the second one. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
90 enum tree_code operation; |
111 | 91 /* When the passed value is a pointer, it is set to true only when we are |
92 certain that no write to the object it points to has occurred since the | |
93 caller functions started execution, except for changes noted in the | |
94 aggregate part of the jump function (see description of | |
95 ipa_agg_jump_function). The flag is used only when the operation is | |
96 NOP_EXPR. */ | |
97 unsigned agg_preserved : 1; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
98 }; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
99 |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
100 /* Structure holding data required to describe an ancestor pass-through |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
101 jump function. */ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
102 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
103 struct GTY(()) ipa_ancestor_jf_data |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
104 { |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
105 /* Offset of the field representing the ancestor. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
106 HOST_WIDE_INT offset; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
107 /* Number of the caller's formal parameter being passed. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
108 int formal_id; |
111 | 109 /* Flag with the same meaning like agg_preserve in ipa_pass_through_data. */ |
110 unsigned agg_preserved : 1; | |
111 }; | |
112 | |
113 /* An element in an aggegate part of a jump function describing a known value | |
114 at a given offset. When it is part of a pass-through jump function with | |
115 agg_preserved set or an ancestor jump function with agg_preserved set, all | |
116 unlisted positions are assumed to be preserved but the value can be a type | |
117 node, which means that the particular piece (starting at offset and having | |
118 the size of the type) is clobbered with an unknown value. When | |
119 agg_preserved is false or the type of the containing jump function is | |
120 different, all unlisted parts are assumed to be unknown and all values must | |
121 fulfill is_gimple_ip_invariant. */ | |
122 | |
123 struct GTY(()) ipa_agg_jf_item | |
124 { | |
125 /* The offset at which the known value is located within the aggregate. */ | |
126 HOST_WIDE_INT offset; | |
127 | |
128 /* The known constant or type if this is a clobber. */ | |
129 tree value; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
130 }; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
131 |
111 | 132 |
133 /* Aggregate jump function - i.e. description of contents of aggregates passed | |
134 either by reference or value. */ | |
135 | |
136 struct GTY(()) ipa_agg_jump_function | |
137 { | |
138 /* Description of the individual items. */ | |
139 vec<ipa_agg_jf_item, va_gc> *items; | |
140 /* True if the data was passed by reference (as opposed to by value). */ | |
141 bool by_ref; | |
142 }; | |
143 | |
144 typedef struct ipa_agg_jump_function *ipa_agg_jump_function_p; | |
145 | |
146 /* Information about zero/non-zero bits. */ | |
147 struct GTY(()) ipa_bits | |
0 | 148 { |
111 | 149 /* The propagated value. */ |
150 widest_int value; | |
151 /* Mask corresponding to the value. | |
152 Similar to ccp_lattice_t, if xth bit of mask is 0, | |
153 implies xth bit of value is constant. */ | |
154 widest_int mask; | |
155 }; | |
156 | |
157 /* Info about value ranges. */ | |
158 | |
159 struct GTY(()) ipa_vr | |
160 { | |
161 /* The data fields below are valid only if known is true. */ | |
162 bool known; | |
131 | 163 enum value_range_kind type; |
111 | 164 wide_int min; |
165 wide_int max; | |
0 | 166 }; |
167 | |
168 /* A jump function for a callsite represents the values passed as actual | |
169 arguments of the callsite. See enum jump_func_type for the various | |
170 types of jump functions supported. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
171 struct GTY (()) ipa_jump_func |
0 | 172 { |
111 | 173 /* Aggregate contants description. See struct ipa_agg_jump_function and its |
174 description. */ | |
175 struct ipa_agg_jump_function agg; | |
176 | |
177 /* Information about zero/non-zero bits. The pointed to structure is shared | |
178 betweed different jump functions. Use ipa_set_jfunc_bits to set this | |
179 field. */ | |
180 struct ipa_bits *bits; | |
181 | |
182 /* Information about value range, containing valid data only when vr_known is | |
183 true. The pointed to structure is shared betweed different jump | |
184 functions. Use ipa_set_jfunc_vr to set this field. */ | |
185 struct value_range *m_vr; | |
186 | |
0 | 187 enum jump_func_type type; |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
188 /* Represents a value of a jump function. pass_through is used only in jump |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
189 function context. constant represents the actual constant in constant jump |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
190 functions and member_cst holds constant c++ member functions. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
191 union jump_func_value |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
192 { |
111 | 193 struct ipa_constant_data GTY ((tag ("IPA_JF_CONST"))) constant; |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
194 struct ipa_pass_through_data GTY ((tag ("IPA_JF_PASS_THROUGH"))) pass_through; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
195 struct ipa_ancestor_jf_data GTY ((tag ("IPA_JF_ANCESTOR"))) ancestor; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
196 } GTY ((desc ("%1.type"))) value; |
0 | 197 }; |
198 | |
111 | 199 |
200 /* Return the constant stored in a constant jump functin JFUNC. */ | |
201 | |
202 static inline tree | |
203 ipa_get_jf_constant (struct ipa_jump_func *jfunc) | |
204 { | |
205 gcc_checking_assert (jfunc->type == IPA_JF_CONST); | |
206 return jfunc->value.constant.value; | |
207 } | |
208 | |
209 static inline struct ipa_cst_ref_desc * | |
210 ipa_get_jf_constant_rdesc (struct ipa_jump_func *jfunc) | |
211 { | |
212 gcc_checking_assert (jfunc->type == IPA_JF_CONST); | |
213 return jfunc->value.constant.rdesc; | |
214 } | |
215 | |
216 /* Return the operand of a pass through jmp function JFUNC. */ | |
217 | |
218 static inline tree | |
219 ipa_get_jf_pass_through_operand (struct ipa_jump_func *jfunc) | |
220 { | |
221 gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); | |
222 return jfunc->value.pass_through.operand; | |
223 } | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
224 |
111 | 225 /* Return the number of the caller's formal parameter that a pass through jump |
226 function JFUNC refers to. */ | |
227 | |
228 static inline int | |
229 ipa_get_jf_pass_through_formal_id (struct ipa_jump_func *jfunc) | |
230 { | |
231 gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); | |
232 return jfunc->value.pass_through.formal_id; | |
233 } | |
234 | |
235 /* Return operation of a pass through jump function JFUNC. */ | |
236 | |
237 static inline enum tree_code | |
238 ipa_get_jf_pass_through_operation (struct ipa_jump_func *jfunc) | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
239 { |
111 | 240 gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); |
241 return jfunc->value.pass_through.operation; | |
242 } | |
243 | |
244 /* Return the agg_preserved flag of a pass through jump function JFUNC. */ | |
245 | |
246 static inline bool | |
247 ipa_get_jf_pass_through_agg_preserved (struct ipa_jump_func *jfunc) | |
248 { | |
249 gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); | |
250 return jfunc->value.pass_through.agg_preserved; | |
251 } | |
252 | |
253 /* Return true if pass through jump function JFUNC preserves type | |
254 information. */ | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
255 |
111 | 256 static inline bool |
257 ipa_get_jf_pass_through_type_preserved (struct ipa_jump_func *jfunc) | |
258 { | |
259 gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); | |
260 return jfunc->value.pass_through.agg_preserved; | |
261 } | |
262 | |
263 /* Return the offset of an ancestor jump function JFUNC. */ | |
264 | |
265 static inline HOST_WIDE_INT | |
266 ipa_get_jf_ancestor_offset (struct ipa_jump_func *jfunc) | |
0 | 267 { |
111 | 268 gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); |
269 return jfunc->value.ancestor.offset; | |
270 } | |
271 | |
272 /* Return the number of the caller's formal parameter that an ancestor jump | |
273 function JFUNC refers to. */ | |
274 | |
275 static inline int | |
276 ipa_get_jf_ancestor_formal_id (struct ipa_jump_func *jfunc) | |
277 { | |
278 gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); | |
279 return jfunc->value.ancestor.formal_id; | |
280 } | |
281 | |
282 /* Return the agg_preserved flag of an ancestor jump function JFUNC. */ | |
0 | 283 |
111 | 284 static inline bool |
285 ipa_get_jf_ancestor_agg_preserved (struct ipa_jump_func *jfunc) | |
286 { | |
287 gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); | |
288 return jfunc->value.ancestor.agg_preserved; | |
289 } | |
290 | |
291 /* Return true if ancestor jump function JFUNC presrves type information. */ | |
292 | |
293 static inline bool | |
294 ipa_get_jf_ancestor_type_preserved (struct ipa_jump_func *jfunc) | |
0 | 295 { |
111 | 296 gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); |
297 return jfunc->value.ancestor.agg_preserved; | |
298 } | |
299 | |
300 /* Summary describing a single formal parameter. */ | |
301 | |
302 struct GTY(()) ipa_param_descriptor | |
303 { | |
304 /* In analysis and modification phase, this is the PARAM_DECL of this | |
305 parameter, in IPA LTO phase, this is the type of the the described | |
306 parameter or NULL if not known. Do not read this field directly but | |
307 through ipa_get_param and ipa_get_type as appropriate. */ | |
308 tree decl_or_type; | |
309 /* If all uses of the parameter are described by ipa-prop structures, this | |
310 says how many there are. If any use could not be described by means of | |
311 ipa-prop structures, this is IPA_UNDESCRIBED_USE. */ | |
312 int controlled_uses; | |
313 unsigned int move_cost : 31; | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
314 /* The parameter is used. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
315 unsigned used : 1; |
0 | 316 }; |
317 | |
318 /* ipa_node_params stores information related to formal parameters of functions | |
319 and some other information for interprocedural passes that operate on | |
320 parameters (such as ipa-cp). */ | |
111 | 321 |
322 struct GTY((for_user)) ipa_node_params | |
0 | 323 { |
111 | 324 /* Default constructor. */ |
325 ipa_node_params (); | |
326 | |
327 /* Default destructor. */ | |
328 ~ipa_node_params (); | |
329 | |
330 /* Information about individual formal parameters that are gathered when | |
331 summaries are generated. */ | |
332 vec<ipa_param_descriptor, va_gc> *descriptors; | |
0 | 333 /* Pointer to an array of structures describing individual formal |
334 parameters. */ | |
111 | 335 struct ipcp_param_lattices * GTY((skip)) lattices; |
0 | 336 /* Only for versioned nodes this field would not be NULL, |
337 it points to the node that IPA cp cloned from. */ | |
111 | 338 struct cgraph_node * GTY((skip)) ipcp_orig_node; |
339 /* If this node is an ipa-cp clone, these are the known constants that | |
340 describe what it has been specialized for. */ | |
341 vec<tree> GTY((skip)) known_csts; | |
342 /* If this node is an ipa-cp clone, these are the known polymorphic contexts | |
343 that describe what it has been specialized for. */ | |
344 vec<ipa_polymorphic_call_context> GTY((skip)) known_contexts; | |
345 /* Whether the param uses analysis and jump function computation has already | |
346 been performed. */ | |
347 unsigned analysis_done : 1; | |
348 /* Whether the function is enqueued in ipa-cp propagation stack. */ | |
349 unsigned node_enqueued : 1; | |
350 /* Whether we should create a specialized version based on values that are | |
351 known to be constant in all contexts. */ | |
352 unsigned do_clone_for_all_contexts : 1; | |
353 /* Set if this is an IPA-CP clone for all contexts. */ | |
354 unsigned is_all_contexts_clone : 1; | |
355 /* Node has been completely replaced by clones and will be removed after | |
356 ipa-cp is finished. */ | |
357 unsigned node_dead : 1; | |
358 /* Node is involved in a recursion, potentionally indirect. */ | |
359 unsigned node_within_scc : 1; | |
360 /* Node is calling a private function called only once. */ | |
361 unsigned node_calling_single_call : 1; | |
362 /* False when there is something makes versioning impossible. */ | |
363 unsigned versionable : 1; | |
364 }; | |
365 | |
366 inline | |
367 ipa_node_params::ipa_node_params () | |
368 : descriptors (NULL), lattices (NULL), ipcp_orig_node (NULL), | |
369 known_csts (vNULL), known_contexts (vNULL), analysis_done (0), | |
370 node_enqueued (0), do_clone_for_all_contexts (0), is_all_contexts_clone (0), | |
371 node_dead (0), node_within_scc (0), node_calling_single_call (0), | |
372 versionable (0) | |
373 { | |
374 } | |
375 | |
376 inline | |
377 ipa_node_params::~ipa_node_params () | |
378 { | |
379 free (lattices); | |
380 known_csts.release (); | |
381 known_contexts.release (); | |
382 } | |
383 | |
384 /* Intermediate information that we get from alias analysis about a particular | |
385 parameter in a particular basic_block. When a parameter or the memory it | |
386 references is marked modified, we use that information in all dominated | |
387 blocks without consulting alias analysis oracle. */ | |
388 | |
389 struct ipa_param_aa_status | |
390 { | |
391 /* Set when this structure contains meaningful information. If not, the | |
392 structure describing a dominating BB should be used instead. */ | |
393 bool valid; | |
394 | |
395 /* Whether we have seen something which might have modified the data in | |
396 question. PARM is for the parameter itself, REF is for data it points to | |
397 but using the alias type of individual accesses and PT is the same thing | |
398 but for computing aggregate pass-through functions using a very inclusive | |
399 ao_ref. */ | |
400 bool parm_modified, ref_modified, pt_modified; | |
401 }; | |
402 | |
403 /* Information related to a given BB that used only when looking at function | |
404 body. */ | |
405 | |
406 struct ipa_bb_info | |
407 { | |
408 /* Call graph edges going out of this BB. */ | |
409 vec<cgraph_edge *> cg_edges; | |
410 /* Alias analysis statuses of each formal parameter at this bb. */ | |
411 vec<ipa_param_aa_status> param_aa_statuses; | |
412 }; | |
413 | |
414 /* Structure with global information that is only used when looking at function | |
415 body. */ | |
416 | |
417 struct ipa_func_body_info | |
418 { | |
419 /* The node that is being analyzed. */ | |
420 cgraph_node *node; | |
421 | |
422 /* Its info. */ | |
423 struct ipa_node_params *info; | |
424 | |
425 /* Information about individual BBs. */ | |
426 vec<ipa_bb_info> bb_infos; | |
427 | |
428 /* Number of parameters. */ | |
429 int param_count; | |
430 | |
431 /* Number of statements already walked by when analyzing this function. */ | |
432 unsigned int aa_walked; | |
0 | 433 }; |
434 | |
435 /* ipa_node_params access functions. Please use these to access fields that | |
436 are or will be shared among various passes. */ | |
437 | |
438 /* Return the number of formal parameters. */ | |
439 | |
440 static inline int | |
441 ipa_get_param_count (struct ipa_node_params *info) | |
442 { | |
111 | 443 return vec_safe_length (info->descriptors); |
0 | 444 } |
445 | |
446 /* Return the declaration of Ith formal parameter of the function corresponding | |
447 to INFO. Note there is no setter function as this array is built just once | |
111 | 448 using ipa_initialize_node_params. This function should not be called in |
449 WPA. */ | |
0 | 450 |
451 static inline tree | |
452 ipa_get_param (struct ipa_node_params *info, int i) | |
453 { | |
111 | 454 gcc_checking_assert (info->descriptors); |
455 gcc_checking_assert (!flag_wpa); | |
456 tree t = (*info->descriptors)[i].decl_or_type; | |
457 gcc_checking_assert (TREE_CODE (t) == PARM_DECL); | |
458 return t; | |
459 } | |
460 | |
461 /* Return the type of Ith formal parameter of the function corresponding | |
462 to INFO if it is known or NULL if not. */ | |
463 | |
464 static inline tree | |
465 ipa_get_type (struct ipa_node_params *info, int i) | |
466 { | |
131 | 467 if (vec_safe_length (info->descriptors) <= (unsigned) i) |
468 return NULL; | |
111 | 469 tree t = (*info->descriptors)[i].decl_or_type; |
470 if (!t) | |
471 return NULL; | |
472 if (TYPE_P (t)) | |
473 return t; | |
474 gcc_checking_assert (TREE_CODE (t) == PARM_DECL); | |
475 return TREE_TYPE (t); | |
476 } | |
477 | |
478 /* Return the move cost of Ith formal parameter of the function corresponding | |
479 to INFO. */ | |
480 | |
481 static inline int | |
482 ipa_get_param_move_cost (struct ipa_node_params *info, int i) | |
483 { | |
484 gcc_checking_assert (info->descriptors); | |
485 return (*info->descriptors)[i].move_cost; | |
0 | 486 } |
487 | |
111 | 488 /* Set the used flag corresponding to the Ith formal parameter of the function |
489 associated with INFO to VAL. */ | |
490 | |
491 static inline void | |
492 ipa_set_param_used (struct ipa_node_params *info, int i, bool val) | |
493 { | |
494 gcc_checking_assert (info->descriptors); | |
495 (*info->descriptors)[i].used = val; | |
496 } | |
497 | |
498 /* Return how many uses described by ipa-prop a parameter has or | |
499 IPA_UNDESCRIBED_USE if there is a use that is not described by these | |
500 structures. */ | |
501 static inline int | |
502 ipa_get_controlled_uses (struct ipa_node_params *info, int i) | |
503 { | |
504 /* FIXME: introducing speculation causes out of bounds access here. */ | |
505 if (vec_safe_length (info->descriptors) > (unsigned)i) | |
506 return (*info->descriptors)[i].controlled_uses; | |
507 return IPA_UNDESCRIBED_USE; | |
508 } | |
509 | |
510 /* Set the controlled counter of a given parameter. */ | |
511 | |
512 static inline void | |
513 ipa_set_controlled_uses (struct ipa_node_params *info, int i, int val) | |
514 { | |
515 gcc_checking_assert (info->descriptors); | |
516 (*info->descriptors)[i].controlled_uses = val; | |
517 } | |
518 | |
519 /* Return the used flag corresponding to the Ith formal parameter of the | |
520 function associated with INFO. */ | |
0 | 521 |
522 static inline bool | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
523 ipa_is_param_used (struct ipa_node_params *info, int i) |
0 | 524 { |
111 | 525 gcc_checking_assert (info->descriptors); |
526 return (*info->descriptors)[i].used; | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
527 } |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
528 |
111 | 529 /* Information about replacements done in aggregates for a given node (each |
530 node has its linked list). */ | |
531 struct GTY(()) ipa_agg_replacement_value | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
532 { |
111 | 533 /* Next item in the linked list. */ |
534 struct ipa_agg_replacement_value *next; | |
535 /* Offset within the aggregate. */ | |
536 HOST_WIDE_INT offset; | |
537 /* The constant value. */ | |
538 tree value; | |
539 /* The paramter index. */ | |
540 int index; | |
541 /* Whether the value was passed by reference. */ | |
542 bool by_ref; | |
543 }; | |
0 | 544 |
111 | 545 /* Structure holding information for the transformation phase of IPA-CP. */ |
0 | 546 |
131 | 547 struct GTY(()) ipcp_transformation |
0 | 548 { |
111 | 549 /* Linked list of known aggregate values. */ |
550 ipa_agg_replacement_value *agg_values; | |
551 /* Known bits information. */ | |
552 vec<ipa_bits *, va_gc> *bits; | |
553 /* Value range information. */ | |
554 vec<ipa_vr, va_gc> *m_vr; | |
555 }; | |
0 | 556 |
111 | 557 void ipa_set_node_agg_value_chain (struct cgraph_node *node, |
558 struct ipa_agg_replacement_value *aggvals); | |
131 | 559 void ipcp_transformation_initialize (void); |
0 | 560 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
561 /* ipa_edge_args stores information related to a callsite and particularly its |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
562 arguments. It can be accessed by the IPA_EDGE_REF macro. */ |
111 | 563 |
564 class GTY((for_user)) ipa_edge_args | |
0 | 565 { |
111 | 566 public: |
567 | |
568 /* Default constructor. */ | |
569 ipa_edge_args () : jump_functions (NULL), polymorphic_call_contexts (NULL) | |
570 {} | |
571 | |
572 /* Destructor. */ | |
573 ~ipa_edge_args () | |
574 { | |
575 vec_free (jump_functions); | |
576 vec_free (polymorphic_call_contexts); | |
577 } | |
578 | |
579 /* Vectors of the callsite's jump function and polymorphic context | |
580 information of each parameter. */ | |
581 vec<ipa_jump_func, va_gc> *jump_functions; | |
582 vec<ipa_polymorphic_call_context, va_gc> *polymorphic_call_contexts; | |
583 }; | |
0 | 584 |
585 /* ipa_edge_args access functions. Please use these to access fields that | |
586 are or will be shared among various passes. */ | |
587 | |
588 /* Return the number of actual arguments. */ | |
589 | |
590 static inline int | |
591 ipa_get_cs_argument_count (struct ipa_edge_args *args) | |
592 { | |
111 | 593 return vec_safe_length (args->jump_functions); |
0 | 594 } |
595 | |
596 /* Returns a pointer to the jump function for the ith argument. Please note | |
597 there is no setter function as jump functions are all set up in | |
598 ipa_compute_jump_functions. */ | |
599 | |
600 static inline struct ipa_jump_func * | |
601 ipa_get_ith_jump_func (struct ipa_edge_args *args, int i) | |
602 { | |
111 | 603 return &(*args->jump_functions)[i]; |
604 } | |
605 | |
606 /* Returns a pointer to the polymorphic call context for the ith argument. | |
607 NULL if contexts are not computed. */ | |
608 static inline struct ipa_polymorphic_call_context * | |
609 ipa_get_ith_polymorhic_call_context (struct ipa_edge_args *args, int i) | |
610 { | |
611 if (!args->polymorphic_call_contexts) | |
612 return NULL; | |
613 return &(*args->polymorphic_call_contexts)[i]; | |
0 | 614 } |
615 | |
111 | 616 /* Function summary for ipa_node_params. */ |
617 class GTY((user)) ipa_node_params_t: public function_summary <ipa_node_params *> | |
618 { | |
619 public: | |
620 ipa_node_params_t (symbol_table *table, bool ggc): | |
621 function_summary<ipa_node_params *> (table, ggc) { } | |
622 | |
623 /* Hook that is called by summary when a node is duplicated. */ | |
624 virtual void duplicate (cgraph_node *node, | |
625 cgraph_node *node2, | |
626 ipa_node_params *data, | |
627 ipa_node_params *data2); | |
628 }; | |
629 | |
630 /* Summary to manange ipa_edge_args structures. */ | |
0 | 631 |
111 | 632 class GTY((user)) ipa_edge_args_sum_t : public call_summary <ipa_edge_args *> |
633 { | |
634 public: | |
635 ipa_edge_args_sum_t (symbol_table *table, bool ggc) | |
636 : call_summary<ipa_edge_args *> (table, ggc) { } | |
0 | 637 |
111 | 638 /* Hook that is called by summary when an edge is duplicated. */ |
639 virtual void remove (cgraph_edge *cs, ipa_edge_args *args); | |
640 /* Hook that is called by summary when an edge is duplicated. */ | |
641 virtual void duplicate (cgraph_edge *src, | |
642 cgraph_edge *dst, | |
643 ipa_edge_args *old_args, | |
644 ipa_edge_args *new_args); | |
645 }; | |
646 | |
647 /* Function summary where the parameter infos are actually stored. */ | |
648 extern GTY(()) ipa_node_params_t * ipa_node_params_sum; | |
649 /* Call summary to store information about edges such as jump functions. */ | |
650 extern GTY(()) ipa_edge_args_sum_t *ipa_edge_args_sum; | |
651 | |
131 | 652 /* Function summary for IPA-CP transformation. */ |
653 class ipcp_transformation_t | |
654 : public function_summary<ipcp_transformation *> | |
655 { | |
656 public: | |
657 ipcp_transformation_t (symbol_table *table, bool ggc): | |
658 function_summary<ipcp_transformation *> (table, ggc) {} | |
659 | |
660 ~ipcp_transformation_t () {} | |
661 | |
662 static ipcp_transformation_t *create_ggc (symbol_table *symtab) | |
663 { | |
664 ipcp_transformation_t *summary | |
665 = new (ggc_cleared_alloc <ipcp_transformation_t> ()) | |
666 ipcp_transformation_t (symtab, true); | |
667 return summary; | |
668 } | |
669 }; | |
670 | |
671 /* Function summary where the IPA CP transformations are actually stored. */ | |
672 extern GTY(()) function_summary <ipcp_transformation *> *ipcp_transformation_sum; | |
0 | 673 |
674 /* Return the associated parameter/argument info corresponding to the given | |
675 node/edge. */ | |
131 | 676 #define IPA_NODE_REF(NODE) (ipa_node_params_sum->get_create (NODE)) |
677 #define IPA_EDGE_REF(EDGE) (ipa_edge_args_sum->get_create (EDGE)) | |
0 | 678 /* This macro checks validity of index returned by |
679 ipa_get_param_decl_index function. */ | |
680 #define IS_VALID_JUMP_FUNC_INDEX(I) ((I) != -1) | |
681 | |
682 /* Creating and freeing ipa_node_params and ipa_edge_args. */ | |
683 void ipa_create_all_node_params (void); | |
684 void ipa_create_all_edge_args (void); | |
111 | 685 void ipa_check_create_edge_args (void); |
0 | 686 void ipa_free_all_node_params (void); |
687 void ipa_free_all_edge_args (void); | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
688 void ipa_free_all_structures_after_ipa_cp (void); |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
689 void ipa_free_all_structures_after_iinln (void); |
111 | 690 |
0 | 691 void ipa_register_cgraph_hooks (void); |
111 | 692 int count_formal_params (tree fndecl); |
0 | 693 |
694 /* This function ensures the array of node param infos is big enough to | |
695 accommodate a structure for all nodes and reallocates it if not. */ | |
696 | |
697 static inline void | |
698 ipa_check_create_node_params (void) | |
699 { | |
111 | 700 if (!ipa_node_params_sum) |
701 ipa_node_params_sum | |
702 = (new (ggc_cleared_alloc <ipa_node_params_t> ()) | |
703 ipa_node_params_t (symtab, true)); | |
0 | 704 } |
705 | |
111 | 706 /* Returns true if edge summary contains a record for EDGE. The main purpose |
707 of this function is that debug dumping function can check info availability | |
708 without causing allocations. */ | |
0 | 709 |
710 static inline bool | |
711 ipa_edge_args_info_available_for_edge_p (struct cgraph_edge *edge) | |
712 { | |
111 | 713 return ipa_edge_args_sum->exists (edge); |
0 | 714 } |
715 | |
131 | 716 static inline ipcp_transformation * |
111 | 717 ipcp_get_transformation_summary (cgraph_node *node) |
0 | 718 { |
131 | 719 if (ipcp_transformation_sum == NULL) |
111 | 720 return NULL; |
131 | 721 |
722 return ipcp_transformation_sum->get (node); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
723 } |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
724 |
111 | 725 /* Return the aggregate replacements for NODE, if there are any. */ |
726 | |
727 static inline struct ipa_agg_replacement_value * | |
728 ipa_get_agg_replacements_for_node (cgraph_node *node) | |
729 { | |
131 | 730 ipcp_transformation *ts = ipcp_get_transformation_summary (node); |
111 | 731 return ts ? ts->agg_values : NULL; |
732 } | |
0 | 733 |
734 /* Function formal parameters related computations. */ | |
735 void ipa_initialize_node_params (struct cgraph_node *node); | |
736 bool ipa_propagate_indirect_call_infos (struct cgraph_edge *cs, | |
111 | 737 vec<cgraph_edge *> *new_edges); |
0 | 738 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
739 /* Indirect edge and binfo processing. */ |
111 | 740 tree ipa_get_indirect_edge_target (struct cgraph_edge *ie, |
741 vec<tree> , | |
742 vec<ipa_polymorphic_call_context>, | |
743 vec<ipa_agg_jump_function_p>, | |
744 bool *); | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
745 struct cgraph_edge *ipa_make_edge_direct_to_target (struct cgraph_edge *, tree, |
111 | 746 bool speculative = false); |
747 tree ipa_impossible_devirt_target (struct cgraph_edge *, tree); | |
748 ipa_bits *ipa_get_ipa_bits_for_value (const widest_int &value, | |
749 const widest_int &mask); | |
750 | |
751 | |
752 /* Functions related to both. */ | |
753 void ipa_analyze_node (struct cgraph_node *); | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
754 |
111 | 755 /* Aggregate jump function related functions. */ |
756 tree ipa_find_agg_cst_for_param (struct ipa_agg_jump_function *agg, tree scalar, | |
757 HOST_WIDE_INT offset, bool by_ref, | |
758 bool *from_global_constant = NULL); | |
759 bool ipa_load_from_parm_agg (struct ipa_func_body_info *fbi, | |
760 vec<ipa_param_descriptor, va_gc> *descriptors, | |
761 gimple *stmt, tree op, int *index_p, | |
762 HOST_WIDE_INT *offset_p, HOST_WIDE_INT *size_p, | |
763 bool *by_ref, bool *guaranteed_unmodified = NULL); | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
764 |
0 | 765 /* Debugging interface. */ |
766 void ipa_print_node_params (FILE *, struct cgraph_node *node); | |
767 void ipa_print_all_params (FILE *); | |
768 void ipa_print_node_jump_functions (FILE *f, struct cgraph_node *node); | |
769 void ipa_print_all_jump_functions (FILE * f); | |
111 | 770 void ipcp_verify_propagated_values (void); |
771 | |
772 template <typename value> | |
773 class ipcp_value; | |
774 | |
775 extern object_allocator<ipcp_value<tree> > ipcp_cst_values_pool; | |
776 extern object_allocator<ipcp_value<ipa_polymorphic_call_context> > | |
777 ipcp_poly_ctx_values_pool; | |
778 | |
779 template <typename valtype> | |
780 class ipcp_value_source; | |
781 | |
782 extern object_allocator<ipcp_value_source<tree> > ipcp_sources_pool; | |
783 | |
784 class ipcp_agg_lattice; | |
785 | |
786 extern object_allocator<ipcp_agg_lattice> ipcp_agg_lattice_pool; | |
787 | |
788 void ipa_dump_agg_replacement_values (FILE *f, | |
789 struct ipa_agg_replacement_value *av); | |
790 void ipa_prop_write_jump_functions (void); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
791 void ipa_prop_read_jump_functions (void); |
111 | 792 void ipcp_write_transformation_summaries (void); |
793 void ipcp_read_transformation_summaries (void); | |
794 int ipa_get_param_decl_index (struct ipa_node_params *, tree); | |
795 tree ipa_value_from_jfunc (struct ipa_node_params *info, | |
131 | 796 struct ipa_jump_func *jfunc, tree type); |
111 | 797 unsigned int ipcp_transform_function (struct cgraph_node *node); |
798 ipa_polymorphic_call_context ipa_context_from_jfunc (ipa_node_params *, | |
799 cgraph_edge *, | |
800 int, | |
801 ipa_jump_func *); | |
802 void ipa_dump_param (FILE *, struct ipa_node_params *info, int i); | |
803 void ipa_release_body_info (struct ipa_func_body_info *); | |
804 tree ipa_get_callee_param_type (struct cgraph_edge *e, int i); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
805 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
806 /* From tree-sra.c: */ |
131 | 807 tree build_ref_for_offset (location_t, tree, poly_int64, bool, tree, |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
808 gimple_stmt_iterator *, bool); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
809 |
111 | 810 /* In ipa-cp.c */ |
811 void ipa_cp_c_finalize (void); | |
812 | |
0 | 813 #endif /* IPA_PROP_H */ |