]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/reg-notes.def
expander: Optimize store_expr from STRING_CST [PR95052]
[thirdparty/gcc.git] / gcc / reg-notes.def
CommitLineData
826c9564 1/* Register note definitions.
8d9254fc 2 Copyright (C) 2004-2020 Free Software Foundation, Inc.
826c9564
ZW
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
9dcd6f09 8Software Foundation; either version 3, or (at your option) any later
826c9564
ZW
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
9dcd6f09
NC
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
826c9564
ZW
19
20/* This file defines all the codes that may appear on individual
e5af9ddd
RS
21 EXPR_LIST, INSN_LIST and INT_LIST rtxes in the REG_NOTES chain of an insn.
22 The codes are stored in the mode field of the rtx. Source files
aade772d
JJ
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. */
826c9564
ZW
27
28/* Shorthand. */
29#define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME)
aade772d
JJ
30#ifndef REG_CFA_NOTE
31# define REG_CFA_NOTE(NAME) REG_NOTE (NAME)
32#endif
826c9564 33
b198261f
MK
34/* REG_DEP_TRUE is used in scheduler dependencies lists to represent a
35 read-after-write dependency (i.e. a true data dependency). This is
36 here, not grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some
37 passes use a literal 0 for it. */
52c5701b
ZW
38REG_NOTE (DEP_TRUE)
39
826c9564
ZW
40/* The value in REG dies in this insn (i.e., it is not needed past
41 this insn). If REG is set in this insn, the REG_DEAD note may,
42 but need not, be omitted. */
43REG_NOTE (DEAD)
44
45/* The REG is autoincremented or autodecremented in this insn. */
46REG_NOTE (INC)
47
48/* Describes the insn as a whole; it says that the insn sets a
49 register to a constant value or to be equivalent to a memory
50 address. If the register is spilled to the stack then the constant
51 value should be substituted for it. The contents of the REG_EQUIV
52 is the constant value or memory address, which may be different
53 from the source of the SET although it has the same value. A
54 REG_EQUIV note may also appear on an insn which copies a register
55 parameter to a pseudo-register, if there is a memory address which
56 could be used to hold that pseudo-register throughout the function. */
57REG_NOTE (EQUIV)
58
59/* Like REG_EQUIV except that the destination is only momentarily
60 equal to the specified rtx. Therefore, it cannot be used for
4a8cae83 61 substitution; but it can be used for cse. */
826c9564
ZW
62REG_NOTE (EQUAL)
63
826c9564
ZW
64/* The register is always nonnegative during the containing loop.
65 This is used in branches so that decrement and branch instructions
66 terminating on zero can be matched. There must be an insn pattern
67 in the md file named `decrement_and_branch_until_zero' or else this
68 will never be added to any instructions. */
69REG_NOTE (NONNEG)
70
826c9564
ZW
71/* Identifies a register set in this insn and never used. */
72REG_NOTE (UNUSED)
73
74/* REG_CC_SETTER and REG_CC_USER link a pair of insns that set and use
75 CC0, respectively. Normally, these are required to be consecutive
76 insns, but we permit putting a cc0-setting insn in the delay slot
77 of a branch as long as only one copy of the insn exists. In that
78 case, these notes point from one to the other to allow code
79 generation to determine what any require information and to
80 properly update CC_STATUS. These notes are INSN_LISTs. */
81REG_NOTE (CC_SETTER)
82REG_NOTE (CC_USER)
83
cf7c4aa6
HPN
84/* Points to a CODE_LABEL. Used by JUMP_INSNs to say that the CODE_LABEL
85 contained in the REG_LABEL_TARGET note is a possible jump target of
86 this insn. This note is an INSN_LIST. */
87REG_NOTE (LABEL_TARGET)
88
89/* Points to a CODE_LABEL. Used by any insn to say that the CODE_LABEL
90 contained in the REG_LABEL_OPERAND note is used by the insn, but as an
91 operand, not as a jump target (though it may indirectly be a jump
92 target for a later jump insn). This note is an INSN_LIST. */
93REG_NOTE (LABEL_OPERAND)
826c9564 94
b198261f
MK
95/* REG_DEP_OUTPUT and REG_DEP_ANTI are used in scheduler dependencies lists
96 to represent write-after-write and write-after-read dependencies
97 respectively. */
826c9564 98REG_NOTE (DEP_OUTPUT)
ddbd5439 99REG_NOTE (DEP_ANTI)
e2724e63 100REG_NOTE (DEP_CONTROL)
826c9564 101
5fa396ad 102/* REG_BR_PROB is attached to JUMP_INSNs. It has an
e5af9ddd 103 integer value (in an INT_LIST). For jumps, it is the probability
5fa396ad
JH
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. */
826c9564
ZW
107REG_NOTE (BR_PROB)
108
826c9564
ZW
109/* Attached to a call insn; indicates that the call is malloc-like and
110 that the pointer returned cannot alias anything else. */
111REG_NOTE (NOALIAS)
112
5fa396ad 113/* REG_BR_PRED is attached to JUMP_INSNs. It contains
826c9564
ZW
114 CONCAT of two integer value. First specifies the branch predictor
115 that added the note, second specifies the predicted hitrate of
5fa396ad 116 branch in a fixed point arithmetic based on REG_BR_PROB_BASE. */
826c9564
ZW
117REG_NOTE (BR_PRED)
118
119/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
120 for DWARF to interpret what they imply. The attached rtx is used
121 instead of intuition. */
aade772d 122REG_CFA_NOTE (FRAME_RELATED_EXPR)
826c9564 123
cd9c1ca8
RH
124/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
125 for FRAME_RELATED_EXPR intuition. The insn's first pattern must be
126 a SET, and the destination must be the CFA register. The attached
127 rtx is an expression that defines the CFA. In the simplest case, the
128 rtx could be just the stack_pointer_rtx; more common would be a PLUS
129 with a base register and a constant offset. In the most complicated
130 cases, this will result in a DW_CFA_def_cfa_expression with the rtx
131 expression rendered in a dwarf location expression. */
aade772d 132REG_CFA_NOTE (CFA_DEF_CFA)
cd9c1ca8
RH
133
134/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
135 for FRAME_RELATED_EXPR intuition. This note adjusts the expression
136 from which the CFA is computed. The attached rtx defines a new CFA
137 expression, relative to the old CFA expression. This rtx must be of
138 the form (SET new-cfa-reg (PLUS old-cfa-reg const_int)). If the note
139 rtx is NULL, we use the first SET of the insn. */
aade772d 140REG_CFA_NOTE (CFA_ADJUST_CFA)
cd9c1ca8
RH
141
142/* Similar to FRAME_RELATED_EXPR, with the additional information that
143 this is a save to memory, i.e. will result in DW_CFA_offset or the
144 like. The pattern or the insn should be a simple store relative to
145 the CFA. */
aade772d 146REG_CFA_NOTE (CFA_OFFSET)
cd9c1ca8
RH
147
148/* Similar to FRAME_RELATED_EXPR, with the additional information that this
149 is a save to a register, i.e. will result in DW_CFA_register. The insn
150 or the pattern should be simple reg-reg move. */
aade772d 151REG_CFA_NOTE (CFA_REGISTER)
cd9c1ca8 152
c9f4c451
RH
153/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
154 for FRAME_RELATED_EXPR intuition. This is a save to memory, i.e. will
155 result in a DW_CFA_expression. The pattern or the insn should be a
156 store of a register to an arbitrary (non-validated) memory address. */
aade772d 157REG_CFA_NOTE (CFA_EXPRESSION)
c9f4c451 158
ac5b3eff
JW
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. */
aade772d 162REG_CFA_NOTE (CFA_VAL_EXPRESSION)
ac5b3eff 163
cd9c1ca8
RH
164/* Attached to insns that are RTX_FRAME_RELATED_P, with the information
165 that this is a restore operation, i.e. will result in DW_CFA_restore
166 or the like. Either the attached rtx, or the destination of the insn's
167 first pattern is the register to be restored. */
aade772d 168REG_CFA_NOTE (CFA_RESTORE)
cd9c1ca8 169
ef284364 170/* Attached to insns that are RTX_FRAME_RELATED_P, marks insn that sets
23f39b37
JJ
171 vDRAP from DRAP. If vDRAP is a register, vdrap_reg is initalized
172 to the argument, if it is a MEM, it is ignored. */
aade772d 173REG_CFA_NOTE (CFA_SET_VDRAP)
23f39b37 174
ef284364 175/* Attached to insns that are RTX_FRAME_RELATED_P, indicating a window
78a8eb4e
RH
176 save operation, i.e. will result in a DW_CFA_GNU_window_save.
177 The argument is ignored. */
aade772d 178REG_CFA_NOTE (CFA_WINDOW_SAVE)
78a8eb4e 179
ef284364
RH
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. */
aade772d 185REG_CFA_NOTE (CFA_FLUSH_QUEUE)
ef284364 186
27169e45
JW
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. */
aade772d 190REG_CFA_NOTE (CFA_TOGGLE_RA_MANGLE)
27169e45 191
826c9564
ZW
192/* Indicates what exception region an INSN belongs in. This is used
193 to indicate what region to which a call may throw. REGION 0
194 indicates that a call cannot throw at all. REGION -1 indicates
195 that it cannot throw, nor will it execute a non-local goto. */
196REG_NOTE (EH_REGION)
197
198/* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
199REG_NOTE (SAVE_NOTE)
200
826c9564
ZW
201/* Indicates that a call does not return. */
202REG_NOTE (NORETURN)
203
204/* Indicates that an indirect jump is a non-local goto instead of a
205 computed goto. */
206REG_NOTE (NON_LOCAL_GOTO)
207
826c9564
ZW
208/* This kind of note is generated at each to `setjmp', and similar
209 functions that can return twice. */
210REG_NOTE (SETJMP)
9a08d230 211
0a35513e
AH
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. */
215REG_NOTE (TM)
216
9a08d230
RH
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. */
220REG_NOTE (ARGS_SIZE)
e384e6b5
BS
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. */
225REG_NOTE (RETURNED)
4f660b15 226
ac9c032e
JL
227/* Indicates the instruction is a stack check probe that should not
228 be combined with other stack adjustments. */
229REG_NOTE (STACK_CHECK)
230
4f660b15
RO
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. */
234REG_NOTE (CALL_DECL)
5c5f0b65
IT
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. */
241REG_NOTE (CALL_NOCF_CHECK)
00b94487
JJ
242
243/* The values passed to callee, for debuginfo purposes. */
244REG_NOTE (CALL_ARG_LOCATION)