comparison gcc/reg-notes.def @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Register note definitions. 1 /* Register note definitions.
2 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 2 Copyright (C) 2004-2017 Free Software Foundation, Inc.
3 Free Software Foundation, Inc.
4 3
5 This file is part of GCC. 4 This file is part of GCC.
6 5
7 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
17 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see 17 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */ 18 <http://www.gnu.org/licenses/>. */
20 19
21 /* This file defines all the codes that may appear on individual 20 /* This file defines all the codes that may appear on individual
22 EXPR_LIST rtxes in the REG_NOTES chain of an insn. The codes are 21 EXPR_LIST, INSN_LIST and INT_LIST rtxes in the REG_NOTES chain of an insn.
23 stored in the mode field of the EXPR_LIST. Source files define 22 The codes are stored in the mode field of the rtx. Source files
24 DEF_REG_NOTE appropriately before including this file. */ 23 define DEF_REG_NOTE appropriately before including this file.
24
25 CFA related notes meant for RTX_FRAME_RELATED_P instructions
26 should be declared with REG_CFA_NOTE macro instead of REG_NOTE. */
25 27
26 /* Shorthand. */ 28 /* Shorthand. */
27 #define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME) 29 #define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME)
30 #ifndef REG_CFA_NOTE
31 # define REG_CFA_NOTE(NAME) REG_NOTE (NAME)
32 #endif
28 33
29 /* REG_DEP_TRUE is used in scheduler dependencies lists to represent a 34 /* REG_DEP_TRUE is used in scheduler dependencies lists to represent a
30 read-after-write dependency (i.e. a true data dependency). This is 35 read-after-write dependency (i.e. a true data dependency). This is
31 here, not grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some 36 here, not grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some
32 passes use a literal 0 for it. */ 37 passes use a literal 0 for it. */
90 /* REG_DEP_OUTPUT and REG_DEP_ANTI are used in scheduler dependencies lists 95 /* REG_DEP_OUTPUT and REG_DEP_ANTI are used in scheduler dependencies lists
91 to represent write-after-write and write-after-read dependencies 96 to represent write-after-write and write-after-read dependencies
92 respectively. */ 97 respectively. */
93 REG_NOTE (DEP_OUTPUT) 98 REG_NOTE (DEP_OUTPUT)
94 REG_NOTE (DEP_ANTI) 99 REG_NOTE (DEP_ANTI)
95 100 REG_NOTE (DEP_CONTROL)
96 /* REG_BR_PROB is attached to JUMP_INSNs and CALL_INSNs. It has an 101
97 integer value. For jumps, it is the probability that this is a 102 /* REG_BR_PROB is attached to JUMP_INSNs. It has an
98 taken branch. For calls, it is the probability that this call 103 integer value (in an INT_LIST). For jumps, it is the probability
99 won't return. */ 104 that this is a taken branch. The integer represents a value of
105 profile_probability type. Use to_reg_br_prob_note and from_reg_br_prob_note
106 to extract the actual value. */
100 REG_NOTE (BR_PROB) 107 REG_NOTE (BR_PROB)
101 108
102 /* Attached to a call insn; indicates that the call is malloc-like and 109 /* Attached to a call insn; indicates that the call is malloc-like and
103 that the pointer returned cannot alias anything else. */ 110 that the pointer returned cannot alias anything else. */
104 REG_NOTE (NOALIAS) 111 REG_NOTE (NOALIAS)
105 112
106 /* REG_BR_PRED is attached to JUMP_INSNs and CALL_INSNSs. It contains 113 /* REG_BR_PRED is attached to JUMP_INSNs. It contains
107 CONCAT of two integer value. First specifies the branch predictor 114 CONCAT of two integer value. First specifies the branch predictor
108 that added the note, second specifies the predicted hitrate of 115 that added the note, second specifies the predicted hitrate of
109 branch in the same format as REG_BR_PROB note uses. */ 116 branch in a fixed point arithmetic based on REG_BR_PROB_BASE. */
110 REG_NOTE (BR_PRED) 117 REG_NOTE (BR_PRED)
111 118
112 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex 119 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
113 for DWARF to interpret what they imply. The attached rtx is used 120 for DWARF to interpret what they imply. The attached rtx is used
114 instead of intuition. */ 121 instead of intuition. */
115 REG_NOTE (FRAME_RELATED_EXPR) 122 REG_CFA_NOTE (FRAME_RELATED_EXPR)
116 123
117 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex 124 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
118 for FRAME_RELATED_EXPR intuition. The insn's first pattern must be 125 for FRAME_RELATED_EXPR intuition. The insn's first pattern must be
119 a SET, and the destination must be the CFA register. The attached 126 a SET, and the destination must be the CFA register. The attached
120 rtx is an expression that defines the CFA. In the simplest case, the 127 rtx is an expression that defines the CFA. In the simplest case, the
121 rtx could be just the stack_pointer_rtx; more common would be a PLUS 128 rtx could be just the stack_pointer_rtx; more common would be a PLUS
122 with a base register and a constant offset. In the most complicated 129 with a base register and a constant offset. In the most complicated
123 cases, this will result in a DW_CFA_def_cfa_expression with the rtx 130 cases, this will result in a DW_CFA_def_cfa_expression with the rtx
124 expression rendered in a dwarf location expression. */ 131 expression rendered in a dwarf location expression. */
125 REG_NOTE (CFA_DEF_CFA) 132 REG_CFA_NOTE (CFA_DEF_CFA)
126 133
127 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex 134 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
128 for FRAME_RELATED_EXPR intuition. This note adjusts the expression 135 for FRAME_RELATED_EXPR intuition. This note adjusts the expression
129 from which the CFA is computed. The attached rtx defines a new CFA 136 from which the CFA is computed. The attached rtx defines a new CFA
130 expression, relative to the old CFA expression. This rtx must be of 137 expression, relative to the old CFA expression. This rtx must be of
131 the form (SET new-cfa-reg (PLUS old-cfa-reg const_int)). If the note 138 the form (SET new-cfa-reg (PLUS old-cfa-reg const_int)). If the note
132 rtx is NULL, we use the first SET of the insn. */ 139 rtx is NULL, we use the first SET of the insn. */
133 REG_NOTE (CFA_ADJUST_CFA) 140 REG_CFA_NOTE (CFA_ADJUST_CFA)
134 141
135 /* Similar to FRAME_RELATED_EXPR, with the additional information that 142 /* Similar to FRAME_RELATED_EXPR, with the additional information that
136 this is a save to memory, i.e. will result in DW_CFA_offset or the 143 this is a save to memory, i.e. will result in DW_CFA_offset or the
137 like. The pattern or the insn should be a simple store relative to 144 like. The pattern or the insn should be a simple store relative to
138 the CFA. */ 145 the CFA. */
139 REG_NOTE (CFA_OFFSET) 146 REG_CFA_NOTE (CFA_OFFSET)
140 147
141 /* Similar to FRAME_RELATED_EXPR, with the additional information that this 148 /* Similar to FRAME_RELATED_EXPR, with the additional information that this
142 is a save to a register, i.e. will result in DW_CFA_register. The insn 149 is a save to a register, i.e. will result in DW_CFA_register. The insn
143 or the pattern should be simple reg-reg move. */ 150 or the pattern should be simple reg-reg move. */
144 REG_NOTE (CFA_REGISTER) 151 REG_CFA_NOTE (CFA_REGISTER)
145 152
146 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex 153 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
147 for FRAME_RELATED_EXPR intuition. This is a save to memory, i.e. will 154 for FRAME_RELATED_EXPR intuition. This is a save to memory, i.e. will
148 result in a DW_CFA_expression. The pattern or the insn should be a 155 result in a DW_CFA_expression. The pattern or the insn should be a
149 store of a register to an arbitrary (non-validated) memory address. */ 156 store of a register to an arbitrary (non-validated) memory address. */
150 REG_NOTE (CFA_EXPRESSION) 157 REG_CFA_NOTE (CFA_EXPRESSION)
158
159 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
160 for FRAME_RELATED_EXPR intuition. The DWARF expression computes the value of
161 the given register. */
162 REG_CFA_NOTE (CFA_VAL_EXPRESSION)
151 163
152 /* Attached to insns that are RTX_FRAME_RELATED_P, with the information 164 /* Attached to insns that are RTX_FRAME_RELATED_P, with the information
153 that this is a restore operation, i.e. will result in DW_CFA_restore 165 that this is a restore operation, i.e. will result in DW_CFA_restore
154 or the like. Either the attached rtx, or the destination of the insn's 166 or the like. Either the attached rtx, or the destination of the insn's
155 first pattern is the register to be restored. */ 167 first pattern is the register to be restored. */
156 REG_NOTE (CFA_RESTORE) 168 REG_CFA_NOTE (CFA_RESTORE)
157 169
158 /* Attached to insn that is RTX_FRAME_RELATED_P, marks insn that sets 170 /* Attached to insns that are RTX_FRAME_RELATED_P, marks insn that sets
159 vDRAP from DRAP. If vDRAP is a register, vdrap_reg is initalized 171 vDRAP from DRAP. If vDRAP is a register, vdrap_reg is initalized
160 to the argument, if it is a MEM, it is ignored. */ 172 to the argument, if it is a MEM, it is ignored. */
161 REG_NOTE (CFA_SET_VDRAP) 173 REG_CFA_NOTE (CFA_SET_VDRAP)
162 174
163 /* Indicates that REG holds the exception context for the function. 175 /* Attached to insns that are RTX_FRAME_RELATED_P, indicating a window
164 This context is shared by inline functions, so the code to acquire 176 save operation, i.e. will result in a DW_CFA_GNU_window_save.
165 the real exception context is delayed until after inlining. */ 177 The argument is ignored. */
166 REG_NOTE (EH_CONTEXT) 178 REG_CFA_NOTE (CFA_WINDOW_SAVE)
179
180 /* Attached to insns that are RTX_FRAME_RELATED_P, marks the insn as
181 requiring that all queued information should be flushed *before* insn,
182 regardless of what is visible in the rtl. The argument is ignored.
183 This is normally used for a call instruction which is not exposed to
184 the rest of the compiler as a CALL_INSN. */
185 REG_CFA_NOTE (CFA_FLUSH_QUEUE)
186
187 /* Attached to insns that are RTX_FRAME_RELATED_P, toggling the mangling status
188 of return address. Currently it's only used by AArch64. The argument is
189 ignored. */
190 REG_CFA_NOTE (CFA_TOGGLE_RA_MANGLE)
167 191
168 /* Indicates what exception region an INSN belongs in. This is used 192 /* Indicates what exception region an INSN belongs in. This is used
169 to indicate what region to which a call may throw. REGION 0 193 to indicate what region to which a call may throw. REGION 0
170 indicates that a call cannot throw at all. REGION -1 indicates 194 indicates that a call cannot throw at all. REGION -1 indicates
171 that it cannot throw, nor will it execute a non-local goto. */ 195 that it cannot throw, nor will it execute a non-local goto. */
179 203
180 /* Indicates that an indirect jump is a non-local goto instead of a 204 /* Indicates that an indirect jump is a non-local goto instead of a
181 computed goto. */ 205 computed goto. */
182 REG_NOTE (NON_LOCAL_GOTO) 206 REG_NOTE (NON_LOCAL_GOTO)
183 207
184 /* Indicates that a jump crosses between hot and cold sections in a
185 (partitioned) assembly or .o file, and therefore should not be
186 reduced to a simpler jump by optimizations. */
187 REG_NOTE (CROSSING_JUMP)
188
189 /* This kind of note is generated at each to `setjmp', and similar 208 /* This kind of note is generated at each to `setjmp', and similar
190 functions that can return twice. */ 209 functions that can return twice. */
191 REG_NOTE (SETJMP) 210 REG_NOTE (SETJMP)
211
212 /* This kind of note is generated at each transactional memory
213 builtin, to indicate we need to generate transaction restart
214 edges for this insn. */
215 REG_NOTE (TM)
216
217 /* Indicates the cumulative offset of the stack pointer accounting
218 for pushed arguments. This will only be generated when
219 ACCUMULATE_OUTGOING_ARGS is false. */
220 REG_NOTE (ARGS_SIZE)
221
222 /* Used for communication between IRA and caller-save.c, indicates
223 that the return value of a call can be used to reinitialize a
224 pseudo reg. */
225 REG_NOTE (RETURNED)
226
227 /* Indicates the instruction is a stack check probe that should not
228 be combined with other stack adjustments. */
229 REG_NOTE (STACK_CHECK)
230
231 /* Used to mark a call with the function decl called by the call.
232 The decl might not be available in the call due to splitting of the call
233 insn. This note is a SYMBOL_REF. */
234 REG_NOTE (CALL_DECL)
235
236 /* Indicate that a call should not be verified for control-flow consistency.
237 The target address of the call is assumed as a valid address and no check
238 to validate a branch to the target address is needed. The call is marked
239 when a called function has a 'notrack' attribute. This note is used by the
240 compiler when the option -fcf-protection=branch is specified. */
241 REG_NOTE (CALL_NOCF_CHECK)