annotate gcc/function.h @ 158:494b0b89df80 default tip

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