Mercurial > hg > CbC > CbC_gcc
annotate gcc/function.h @ 124:c3a50d7877e8
fix ipa-inline.c
author | mir3636 |
---|---|
date | Sat, 31 Mar 2018 17:18:55 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
rev | line source |
---|---|
0 | 1 /* Structure for saving state for a nested function. |
111 | 2 Copyright (C) 1989-2017 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 GCC_FUNCTION_H | |
21 #define GCC_FUNCTION_H | |
22 | |
23 | |
24 /* Stack of pending (incomplete) sequences saved by `start_sequence'. | |
25 Each element describes one pending sequence. | |
26 The main insn-chain is saved in the last element of the chain, | |
27 unless the chain is empty. */ | |
28 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
29 struct GTY(()) sequence_stack { |
0 | 30 /* First and last insns in the chain of the saved sequence. */ |
111 | 31 rtx_insn *first; |
32 rtx_insn *last; | |
0 | 33 struct sequence_stack *next; |
34 }; | |
35 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
36 struct GTY(()) emit_status { |
111 | 37 void ensure_regno_capacity (); |
38 | |
0 | 39 /* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function. |
40 After rtl generation, it is 1 plus the largest register number used. */ | |
41 int x_reg_rtx_no; | |
42 | |
43 /* Lowest label number in current function. */ | |
44 int x_first_label_num; | |
45 | |
111 | 46 /* seq.first and seq.last are the ends of the doubly-linked chain of |
47 rtl for the current function. Both are reset to null at the | |
48 start of rtl generation for the function. | |
0 | 49 |
111 | 50 start_sequence saves both of these on seq.next and then starts |
51 a new, nested sequence of insns. | |
0 | 52 |
111 | 53 seq.next is a stack of pending (incomplete) sequences saved by |
54 start_sequence. Each element describes one pending sequence. | |
55 The main insn-chain is the last element of the chain. */ | |
56 struct sequence_stack seq; | |
0 | 57 |
58 /* INSN_UID for next insn emitted. | |
59 Reset to 1 for each function compiled. */ | |
60 int x_cur_insn_uid; | |
61 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
62 /* INSN_UID for next debug insn emitted. Only used if |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
63 --param min-nondebug-insn-uid=<value> is given with nonzero value. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
64 int x_cur_debug_insn_uid; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
65 |
0 | 66 /* The length of the regno_pointer_align, regno_decl, and x_regno_reg_rtx |
67 vectors. Since these vectors are needed during the expansion phase when | |
68 the total number of registers in the function is not yet known, the | |
69 vectors are copied and made bigger when necessary. */ | |
70 int regno_pointer_align_length; | |
71 | |
72 /* Indexed by pseudo register number, if nonzero gives the known alignment | |
73 for that pseudo (if REG_POINTER is set in x_regno_reg_rtx). | |
74 Allocated in parallel with x_regno_reg_rtx. */ | |
75 unsigned char * GTY((skip)) regno_pointer_align; | |
76 }; | |
77 | |
78 | |
111 | 79 /* Indexed by register number, gives an rtx for that register (and only |
80 that register). For pseudo registers, it is the unique rtx for | |
81 that pseudo. For hard registers, it is an rtx of the mode specified | |
82 by reg_raw_mode. | |
83 | |
84 FIXME: We could put it into emit_status struct, but gengtype is not | |
85 able to deal with length attribute nested in top level structures. */ | |
0 | 86 |
87 extern GTY ((length ("crtl->emit.x_reg_rtx_no"))) rtx * regno_reg_rtx; | |
88 | |
89 /* For backward compatibility... eventually these should all go away. */ | |
90 #define reg_rtx_no (crtl->emit.x_reg_rtx_no) | |
91 | |
92 #define REGNO_POINTER_ALIGN(REGNO) (crtl->emit.regno_pointer_align[REGNO]) | |
93 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
94 struct GTY(()) expr_status { |
0 | 95 /* Number of units that we should eventually pop off the stack. |
96 These are the arguments to function calls that have already returned. */ | |
97 int x_pending_stack_adjust; | |
98 | |
99 /* Under some ABIs, it is the caller's responsibility to pop arguments | |
100 pushed for function calls. A naive implementation would simply pop | |
101 the arguments immediately after each call. However, if several | |
102 function calls are made in a row, it is typically cheaper to pop | |
103 all the arguments after all of the calls are complete since a | |
104 single pop instruction can be used. Therefore, GCC attempts to | |
105 defer popping the arguments until absolutely necessary. (For | |
106 example, at the end of a conditional, the arguments must be popped, | |
107 since code outside the conditional won't know whether or not the | |
108 arguments need to be popped.) | |
109 | |
110 When INHIBIT_DEFER_POP is nonzero, however, the compiler does not | |
111 attempt to defer pops. Instead, the stack is popped immediately | |
112 after each call. Rather then setting this variable directly, use | |
113 NO_DEFER_POP and OK_DEFER_POP. */ | |
114 int x_inhibit_defer_pop; | |
115 | |
116 /* If PREFERRED_STACK_BOUNDARY and PUSH_ROUNDING are defined, the stack | |
117 boundary can be momentarily unaligned while pushing the arguments. | |
118 Record the delta since last aligned boundary here in order to get | |
119 stack alignment in the nested function calls working right. */ | |
120 int x_stack_pointer_delta; | |
121 | |
122 /* Nonzero means __builtin_saveregs has already been done in this function. | |
123 The value is the pseudoreg containing the value __builtin_saveregs | |
124 returned. */ | |
125 rtx x_saveregs_value; | |
126 | |
127 /* Similarly for __builtin_apply_args. */ | |
128 rtx x_apply_args_value; | |
129 | |
130 /* List of labels that must never be deleted. */ | |
111 | 131 vec<rtx_insn *, va_gc> *x_forced_labels; |
0 | 132 }; |
133 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
134 typedef struct call_site_record_d *call_site_record; |
0 | 135 |
136 /* RTL representation of exception handling. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
137 struct GTY(()) rtl_eh { |
0 | 138 rtx ehr_stackadj; |
139 rtx ehr_handler; | |
111 | 140 rtx_code_label *ehr_label; |
0 | 141 |
142 rtx sjlj_fc; | |
111 | 143 rtx_insn *sjlj_exit_after; |
0 | 144 |
111 | 145 vec<uchar, va_gc> *action_record_data; |
0 | 146 |
111 | 147 vec<call_site_record, va_gc> *call_site_record_v[2]; |
0 | 148 }; |
149 | |
150 #define pending_stack_adjust (crtl->expr.x_pending_stack_adjust) | |
151 #define inhibit_defer_pop (crtl->expr.x_inhibit_defer_pop) | |
152 #define saveregs_value (crtl->expr.x_saveregs_value) | |
153 #define apply_args_value (crtl->expr.x_apply_args_value) | |
154 #define forced_labels (crtl->expr.x_forced_labels) | |
155 #define stack_pointer_delta (crtl->expr.x_stack_pointer_delta) | |
156 | |
157 struct gimple_df; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
158 struct call_site_record_d; |
111 | 159 struct dw_fde_node; |
0 | 160 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
161 struct GTY(()) varasm_status { |
0 | 162 /* If we're using a per-function constant pool, this is it. */ |
163 struct rtx_constant_pool *pool; | |
164 | |
165 /* Number of tree-constants deferred during the expansion of this | |
166 function. */ | |
167 unsigned int deferred_constants; | |
168 }; | |
169 | |
170 | |
171 /* Data for function partitioning. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
172 struct GTY(()) function_subsections { |
0 | 173 /* Assembly labels for the hot and cold text sections, to |
174 be used by debugger functions for determining the size of text | |
175 sections. */ | |
176 | |
177 const char *hot_section_label; | |
178 const char *cold_section_label; | |
179 const char *hot_section_end_label; | |
180 const char *cold_section_end_label; | |
181 }; | |
182 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
183 /* Describe an empty area of space in the stack frame. These can be chained |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
184 into a list; this is used to keep track of space wasted for alignment |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
185 reasons. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
186 struct GTY(()) frame_space |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
187 { |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
188 struct frame_space *next; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
189 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
190 HOST_WIDE_INT start; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
191 HOST_WIDE_INT length; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
192 }; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
193 |
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
|
194 struct GTY(()) stack_usage |
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
|
195 { |
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
|
196 /* # of bytes of static stack space allocated by the function. */ |
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
|
197 HOST_WIDE_INT static_stack_size; |
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
|
198 |
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
|
199 /* # of bytes of dynamic stack space allocated by the function. This is |
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
|
200 meaningful only if has_unbounded_dynamic_stack_size is zero. */ |
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
|
201 HOST_WIDE_INT dynamic_stack_size; |
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
|
202 |
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
|
203 /* # of bytes of space pushed onto the stack after the prologue. If |
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
|
204 !ACCUMULATE_OUTGOING_ARGS, it contains the outgoing arguments. */ |
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
|
205 int pushed_stack_size; |
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
|
206 |
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
|
207 /* Nonzero if the amount of stack space allocated dynamically cannot |
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
|
208 be bounded at compile-time. */ |
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
|
209 unsigned int has_unbounded_dynamic_stack_size : 1; |
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
|
210 }; |
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
|
211 |
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
|
212 #define current_function_static_stack_size (cfun->su->static_stack_size) |
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
|
213 #define current_function_dynamic_stack_size (cfun->su->dynamic_stack_size) |
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
|
214 #define current_function_pushed_stack_size (cfun->su->pushed_stack_size) |
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
|
215 #define current_function_has_unbounded_dynamic_stack_size \ |
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
|
216 (cfun->su->has_unbounded_dynamic_stack_size) |
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
|
217 #define current_function_allocates_dynamic_stack_space \ |
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
|
218 (current_function_dynamic_stack_size != 0 \ |
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
|
219 || current_function_has_unbounded_dynamic_stack_size) |
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
|
220 |
0 | 221 /* This structure can save all the important global and static variables |
222 describing the status of the current function. */ | |
223 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
224 struct GTY(()) function { |
0 | 225 struct eh_status *eh; |
226 | |
227 /* The control flow graph for this function. */ | |
228 struct control_flow_graph *cfg; | |
229 | |
230 /* GIMPLE body for this function. */ | |
111 | 231 gimple_seq gimple_body; |
0 | 232 |
233 /* SSA and dataflow information. */ | |
234 struct gimple_df *gimple_df; | |
235 | |
236 /* The loops in this function. */ | |
237 struct loops *x_current_loops; | |
238 | |
111 | 239 /* Filled by the GIMPLE and RTL FEs, pass to start compilation with. */ |
240 char *pass_startwith; | |
241 | |
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
|
242 /* The stack usage of this function. */ |
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
|
243 struct stack_usage *su; |
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
|
244 |
0 | 245 /* Value histograms attached to particular statements. */ |
246 htab_t GTY((skip)) value_histograms; | |
247 | |
248 /* For function.c. */ | |
249 | |
250 /* Points to the FUNCTION_DECL of this function. */ | |
251 tree decl; | |
252 | |
253 /* A PARM_DECL that should contain the static chain for this function. | |
254 It will be initialized at the beginning of the function. */ | |
255 tree static_chain_decl; | |
256 | |
257 /* An expression that contains the non-local goto save area. The first | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
258 word is the saved frame pointer and the second is the saved stack |
0 | 259 pointer. */ |
260 tree nonlocal_goto_save_area; | |
261 | |
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
|
262 /* Vector of function local variables, functions, types and constants. */ |
111 | 263 vec<tree, va_gc> *local_decls; |
264 | |
265 /* In a Cilk function, the VAR_DECL for the frame descriptor. */ | |
266 tree cilk_frame_decl; | |
0 | 267 |
268 /* For md files. */ | |
269 | |
270 /* tm.h can use this to store whatever it likes. */ | |
271 struct machine_function * GTY ((maybe_undef)) machine; | |
272 | |
273 /* Language-specific code can use this to store whatever it likes. */ | |
274 struct language_function * language; | |
275 | |
276 /* Used types hash table. */ | |
111 | 277 hash_set<tree> *GTY (()) used_types_hash; |
278 | |
279 /* Dwarf2 Frame Description Entry, containing the Call Frame Instructions | |
280 used for unwinding. Only set when either dwarf2 unwinding or dwarf2 | |
281 debugging is enabled. */ | |
282 struct dw_fde_node *fde; | |
0 | 283 |
284 /* Last statement uid. */ | |
285 int last_stmt_uid; | |
286 | |
287 /* Function sequence number for profiling, debugging, etc. */ | |
288 int funcdef_no; | |
289 | |
290 /* Line number of the start of the function for debugging purposes. */ | |
291 location_t function_start_locus; | |
292 | |
293 /* Line number of the end of the function. */ | |
294 location_t function_end_locus; | |
295 | |
296 /* Properties used by the pass manager. */ | |
297 unsigned int curr_properties; | |
298 unsigned int last_verified; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
299 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
300 /* Non-null if the function does something that would prevent it from |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
301 being copied; this applies to both versioning and inlining. Set to |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
302 a string describing the reason for failure. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
303 const char * GTY((skip)) cannot_be_copied_reason; |
0 | 304 |
111 | 305 /* Last assigned dependence info clique. */ |
306 unsigned short last_clique; | |
307 | |
0 | 308 /* Collected bit flags. */ |
309 | |
310 /* Number of units of general registers that need saving in stdarg | |
311 function. What unit is depends on the backend, either it is number | |
312 of bytes, or it can be number of registers. */ | |
313 unsigned int va_list_gpr_size : 8; | |
314 | |
315 /* Number of units of floating point registers that need saving in stdarg | |
316 function. */ | |
317 unsigned int va_list_fpr_size : 8; | |
318 | |
319 /* Nonzero if function being compiled can call setjmp. */ | |
320 unsigned int calls_setjmp : 1; | |
321 | |
322 /* Nonzero if function being compiled can call alloca, | |
323 either as a subroutine or builtin. */ | |
324 unsigned int calls_alloca : 1; | |
325 | |
111 | 326 /* This will indicate whether a function is a cilk function */ |
327 unsigned int is_cilk_function : 1; | |
328 | |
329 /* Nonzero if this is a Cilk function that spawns. */ | |
330 unsigned int calls_cilk_spawn : 1; | |
331 | |
0 | 332 /* Nonzero if function being compiled receives nonlocal gotos |
333 from nested functions. */ | |
334 unsigned int has_nonlocal_label : 1; | |
335 | |
111 | 336 /* Nonzero if function being compiled has a forced label |
337 placed into static storage. */ | |
338 unsigned int has_forced_label_in_static : 1; | |
339 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
340 /* Nonzero if we've set cannot_be_copied_reason. I.e. if |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
341 (cannot_be_copied_set && !cannot_be_copied_reason), the function |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
342 can in fact be copied. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
343 unsigned int cannot_be_copied_set : 1; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
36
diff
changeset
|
344 |
0 | 345 /* Nonzero if current function uses stdarg.h or equivalent. */ |
346 unsigned int stdarg : 1; | |
347 | |
348 unsigned int after_inlining : 1; | |
349 unsigned int always_inline_functions_inlined : 1; | |
350 | |
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
|
351 /* Nonzero if function being compiled can throw synchronous non-call |
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
|
352 exceptions. */ |
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
|
353 unsigned int can_throw_non_call_exceptions : 1; |
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
|
354 |
111 | 355 /* Nonzero if instructions that may throw exceptions but don't otherwise |
356 contribute to the execution of the program can be deleted. */ | |
357 unsigned int can_delete_dead_exceptions : 1; | |
358 | |
0 | 359 /* Fields below this point are not set for abstract functions; see |
360 allocate_struct_function. */ | |
361 | |
362 /* Nonzero if function being compiled needs to be given an address | |
363 where the value should be stored. */ | |
364 unsigned int returns_struct : 1; | |
365 | |
366 /* Nonzero if function being compiled needs to | |
367 return the address of where it has put a structure value. */ | |
368 unsigned int returns_pcc_struct : 1; | |
369 | |
370 /* Nonzero if this function has local DECL_HARD_REGISTER variables. | |
371 In this case code motion has to be done more carefully. */ | |
372 unsigned int has_local_explicit_reg_vars : 1; | |
373 | |
374 /* Nonzero if the current function is a thunk, i.e., a lightweight | |
375 function implemented by the output_mi_thunk hook) that just | |
376 adjusts one of its arguments and forwards to another | |
377 function. */ | |
378 unsigned int is_thunk : 1; | |
111 | 379 |
380 /* Nonzero if the current function contains any loops with | |
381 loop->force_vectorize set. */ | |
382 unsigned int has_force_vectorize_loops : 1; | |
383 | |
384 /* Nonzero if the current function contains any loops with | |
385 nonzero value in loop->simduid. */ | |
386 unsigned int has_simduid_loops : 1; | |
387 | |
388 /* Set when the tail call has been identified. */ | |
389 unsigned int tail_call_marked : 1; | |
0 | 390 }; |
391 | |
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
|
392 /* Add the decl D to the local_decls list of FUN. */ |
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
|
393 |
111 | 394 void add_local_decl (struct function *fun, tree d); |
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
|
395 |
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
|
396 #define FOR_EACH_LOCAL_DECL(FUN, I, D) \ |
111 | 397 FOR_EACH_VEC_SAFE_ELT_REVERSE ((FUN)->local_decls, I, D) |
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
|
398 |
0 | 399 /* If va_list_[gf]pr_size is set to this, it means we don't know how |
400 many units need to be saved. */ | |
401 #define VA_LIST_MAX_GPR_SIZE 255 | |
402 #define VA_LIST_MAX_FPR_SIZE 255 | |
403 | |
404 /* The function currently being compiled. */ | |
405 extern GTY(()) struct function *cfun; | |
406 | |
407 /* In order to ensure that cfun is not set directly, we redefine it so | |
408 that it is not an lvalue. Rather than assign to cfun, use | |
409 push_cfun or set_cfun. */ | |
410 #define cfun (cfun + 0) | |
411 | |
412 /* Nonzero if we've already converted virtual regs to hard regs. */ | |
413 extern int virtuals_instantiated; | |
414 | |
415 /* Nonzero if at least one trampoline has been created. */ | |
416 extern int trampolines_created; | |
417 | |
111 | 418 struct GTY((for_user)) types_used_by_vars_entry { |
36 | 419 tree type; |
420 tree var_decl; | |
421 }; | |
422 | |
111 | 423 struct used_type_hasher : ggc_ptr_hash<types_used_by_vars_entry> |
424 { | |
425 static hashval_t hash (types_used_by_vars_entry *); | |
426 static bool equal (types_used_by_vars_entry *, types_used_by_vars_entry *); | |
427 }; | |
428 | |
36 | 429 /* Hash table making the relationship between a global variable |
430 and the types it references in its initializer. The key of the | |
431 entry is a referenced type, and the value is the DECL of the global | |
432 variable. types_use_by_vars_do_hash and types_used_by_vars_eq below are | |
433 the hash and equality functions to use for this hash table. */ | |
111 | 434 extern GTY(()) hash_table<used_type_hasher> *types_used_by_vars_hash; |
36 | 435 |
436 void types_used_by_var_decl_insert (tree type, tree var_decl); | |
437 | |
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
|
438 /* During parsing of a global variable, this vector contains the types |
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
|
439 referenced by the global variable. */ |
111 | 440 extern GTY(()) vec<tree, va_gc> *types_used_by_cur_var_decl; |
36 | 441 |
442 | |
111 | 443 /* Return the loop tree of FN. */ |
444 | |
445 inline struct loops * | |
446 loops_for_fn (struct function *fn) | |
447 { | |
448 return fn->x_current_loops; | |
449 } | |
450 | |
451 /* Set the loop tree of FN to LOOPS. */ | |
452 | |
453 inline void | |
454 set_loops_for_fn (struct function *fn, struct loops *loops) | |
455 { | |
456 gcc_checking_assert (fn->x_current_loops == NULL || loops == NULL); | |
457 fn->x_current_loops = loops; | |
458 } | |
0 | 459 |
460 /* For backward compatibility... eventually these should all go away. */ | |
461 #define current_function_funcdef_no (cfun->funcdef_no) | |
462 | |
463 #define current_loops (cfun->x_current_loops) | |
464 #define dom_computed (cfun->cfg->x_dom_computed) | |
465 #define n_bbs_in_dom_tree (cfun->cfg->x_n_bbs_in_dom_tree) | |
466 #define VALUE_HISTOGRAMS(fun) (fun)->value_histograms | |
467 | |
111 | 468 /* A pointer to a function to create target specific, per-function |
469 data structures. */ | |
470 extern struct machine_function * (*init_machine_status) (void); | |
471 | |
472 /* Structure to record the size of a sequence of arguments | |
473 as the sum of a tree-expression and a constant. This structure is | |
474 also used to store offsets from the stack, which might be negative, | |
475 so the variable part must be ssizetype, not sizetype. */ | |
476 | |
477 struct args_size | |
478 { | |
479 HOST_WIDE_INT constant; | |
480 tree var; | |
481 }; | |
482 | |
483 /* Package up various arg related fields of struct args for | |
484 locate_and_pad_parm. */ | |
485 struct locate_and_pad_arg_data | |
486 { | |
487 /* Size of this argument on the stack, rounded up for any padding it | |
488 gets. If REG_PARM_STACK_SPACE is defined, then register parms are | |
489 counted here, otherwise they aren't. */ | |
490 struct args_size size; | |
491 /* Offset of this argument from beginning of stack-args. */ | |
492 struct args_size offset; | |
493 /* Offset to the start of the stack slot. Different from OFFSET | |
494 if this arg pads downward. */ | |
495 struct args_size slot_offset; | |
496 /* The amount that the stack pointer needs to be adjusted to | |
497 force alignment for the next argument. */ | |
498 struct args_size alignment_pad; | |
499 /* Which way we should pad this arg. */ | |
500 pad_direction where_pad; | |
501 /* slot_offset is at least this aligned. */ | |
502 unsigned int boundary; | |
503 }; | |
504 | |
505 /* Add the value of the tree INC to the `struct args_size' TO. */ | |
506 | |
507 #define ADD_PARM_SIZE(TO, INC) \ | |
508 do { \ | |
509 tree inc = (INC); \ | |
510 if (tree_fits_shwi_p (inc)) \ | |
511 (TO).constant += tree_to_shwi (inc); \ | |
512 else if ((TO).var == 0) \ | |
513 (TO).var = fold_convert (ssizetype, inc); \ | |
514 else \ | |
515 (TO).var = size_binop (PLUS_EXPR, (TO).var, \ | |
516 fold_convert (ssizetype, inc)); \ | |
517 } while (0) | |
0 | 518 |
111 | 519 #define SUB_PARM_SIZE(TO, DEC) \ |
520 do { \ | |
521 tree dec = (DEC); \ | |
522 if (tree_fits_shwi_p (dec)) \ | |
523 (TO).constant -= tree_to_shwi (dec); \ | |
524 else if ((TO).var == 0) \ | |
525 (TO).var = size_binop (MINUS_EXPR, ssize_int (0), \ | |
526 fold_convert (ssizetype, dec)); \ | |
527 else \ | |
528 (TO).var = size_binop (MINUS_EXPR, (TO).var, \ | |
529 fold_convert (ssizetype, dec)); \ | |
530 } while (0) | |
531 | |
532 /* Convert the implicit sum in a `struct args_size' into a tree | |
533 of type ssizetype. */ | |
534 #define ARGS_SIZE_TREE(SIZE) \ | |
535 ((SIZE).var == 0 ? ssize_int ((SIZE).constant) \ | |
536 : size_binop (PLUS_EXPR, fold_convert (ssizetype, (SIZE).var), \ | |
537 ssize_int ((SIZE).constant))) | |
538 | |
539 /* Convert the implicit sum in a `struct args_size' into an rtx. */ | |
540 #define ARGS_SIZE_RTX(SIZE) \ | |
541 ((SIZE).var == 0 ? GEN_INT ((SIZE).constant) \ | |
542 : expand_normal (ARGS_SIZE_TREE (SIZE))) | |
0 | 543 |
111 | 544 #define ASLK_REDUCE_ALIGN 1 |
545 #define ASLK_RECORD_PAD 2 | |
546 | |
547 /* If pointers to member functions use the least significant bit to | |
548 indicate whether a function is virtual, ensure a pointer | |
549 to this function will have that bit clear. */ | |
550 #define MINIMUM_METHOD_BOUNDARY \ | |
551 ((TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn) \ | |
552 ? MAX (FUNCTION_BOUNDARY, 2 * BITS_PER_UNIT) : FUNCTION_BOUNDARY) | |
553 | |
554 enum stack_clash_probes { | |
555 NO_PROBE_NO_FRAME, | |
556 NO_PROBE_SMALL_FRAME, | |
557 PROBE_INLINE, | |
558 PROBE_LOOP | |
559 }; | |
560 | |
561 extern void dump_stack_clash_frame_info (enum stack_clash_probes, bool); | |
562 | |
563 | |
564 extern void push_function_context (void); | |
565 extern void pop_function_context (void); | |
566 | |
567 /* Save and restore status information for a nested function. */ | |
568 extern void free_after_parsing (struct function *); | |
569 extern void free_after_compilation (struct function *); | |
0 | 570 |
571 /* Return size needed for stack frame based on slots so far allocated. | |
572 This size counts from zero. It is not rounded to STACK_BOUNDARY; | |
573 the caller may have to do that. */ | |
574 extern HOST_WIDE_INT get_frame_size (void); | |
575 | |
576 /* Issue an error message and return TRUE if frame OFFSET overflows in | |
577 the signed target pointer arithmetics for function FUNC. Otherwise | |
578 return FALSE. */ | |
579 extern bool frame_offset_overflow (HOST_WIDE_INT, tree); | |
580 | |
111 | 581 extern unsigned int spill_slot_alignment (machine_mode); |
582 | |
583 extern rtx assign_stack_local_1 (machine_mode, HOST_WIDE_INT, int, int); | |
584 extern rtx assign_stack_local (machine_mode, HOST_WIDE_INT, int); | |
585 extern rtx assign_stack_temp_for_type (machine_mode, HOST_WIDE_INT, tree); | |
586 extern rtx assign_stack_temp (machine_mode, HOST_WIDE_INT); | |
587 extern rtx assign_temp (tree, int, int); | |
588 extern void update_temp_slot_address (rtx, rtx); | |
589 extern void preserve_temp_slots (rtx); | |
590 extern void free_temp_slots (void); | |
591 extern void push_temp_slots (void); | |
592 extern void pop_temp_slots (void); | |
593 extern void init_temp_slots (void); | |
594 extern rtx get_hard_reg_initial_reg (rtx); | |
595 extern rtx get_hard_reg_initial_val (machine_mode, unsigned int); | |
596 extern rtx has_hard_reg_initial_val (machine_mode, unsigned int); | |
597 | |
598 /* Called from gimple_expand_cfg. */ | |
599 extern unsigned int emit_initial_value_sets (void); | |
0 | 600 |
111 | 601 extern bool initial_value_entry (int i, rtx *, rtx *); |
602 extern void instantiate_decl_rtl (rtx x); | |
603 extern int aggregate_value_p (const_tree, const_tree); | |
604 extern bool use_register_for_decl (const_tree); | |
605 extern gimple_seq gimplify_parameters (void); | |
606 extern void locate_and_pad_parm (machine_mode, tree, int, int, int, | |
607 tree, struct args_size *, | |
608 struct locate_and_pad_arg_data *); | |
609 extern void generate_setjmp_warnings (void); | |
610 | |
611 /* Identify BLOCKs referenced by more than one NOTE_INSN_BLOCK_{BEG,END}, | |
612 and create duplicate blocks. */ | |
613 extern void reorder_blocks (void); | |
614 extern void clear_block_marks (tree); | |
615 extern tree blocks_nreverse (tree); | |
616 extern tree block_chainon (tree, tree); | |
0 | 617 |
111 | 618 /* Set BLOCK_NUMBER for all the blocks in FN. */ |
619 extern void number_blocks (tree); | |
620 | |
621 /* cfun shouldn't be set directly; use one of these functions instead. */ | |
622 extern void set_cfun (struct function *new_cfun, bool force = false); | |
623 extern void push_cfun (struct function *new_cfun); | |
624 extern void pop_cfun (void); | |
0 | 625 |
111 | 626 extern int get_next_funcdef_no (void); |
627 extern int get_last_funcdef_no (void); | |
628 extern void allocate_struct_function (tree, bool); | |
629 extern void push_struct_function (tree fndecl); | |
630 extern void push_dummy_function (bool); | |
631 extern void pop_dummy_function (void); | |
632 extern void init_dummy_function_start (void); | |
633 extern void init_function_start (tree); | |
634 extern void stack_protect_epilogue (void); | |
635 extern void expand_function_start (tree); | |
636 extern void expand_dummy_function_end (void); | |
637 | |
638 extern void thread_prologue_and_epilogue_insns (void); | |
0 | 639 extern void diddle_return_value (void (*)(rtx, void*), void*); |
640 extern void clobber_return_register (void); | |
111 | 641 extern void expand_function_end (void); |
0 | 642 extern rtx get_arg_pointer_save_area (void); |
111 | 643 extern void maybe_copy_prologue_epilogue_insn (rtx, rtx); |
644 extern int prologue_contains (const rtx_insn *); | |
645 extern int epilogue_contains (const rtx_insn *); | |
646 extern int prologue_epilogue_contains (const rtx_insn *); | |
647 extern void record_prologue_seq (rtx_insn *); | |
648 extern void record_epilogue_seq (rtx_insn *); | |
649 extern void emit_return_into_block (bool simple_p, basic_block bb); | |
650 extern void set_return_jump_label (rtx_insn *); | |
651 extern bool active_insn_between (rtx_insn *head, rtx_insn *tail); | |
652 extern vec<edge> convert_jumps_to_returns (basic_block last_bb, bool simple_p, | |
653 vec<edge> unconverted); | |
654 extern basic_block emit_return_for_exit (edge exit_fallthru_edge, | |
655 bool simple_p); | |
656 extern void reposition_prologue_and_epilogue_notes (void); | |
0 | 657 |
658 /* Returns the name of the current function. */ | |
111 | 659 extern const char *fndecl_name (tree); |
660 extern const char *function_name (struct function *); | |
0 | 661 extern const char *current_function_name (void); |
662 | |
663 extern void used_types_insert (tree); | |
664 | |
665 #endif /* GCC_FUNCTION_H */ |