* function.c (expand_function_end): If current_function_calls_alloca,
[official-gcc.git] / gcc / reg-notes.def
blob85a122f65328c7759d1b8ea48fb057446d4c5c73
1 /* Register note definitions.
2 Copyright (C) 2004 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA. */
21 /* 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
23 stored in the mode field of the EXPR_LIST. Source files define
24 DEF_REG_NOTE appropriately before including this file. */
26 /* Shorthand. */
27 #define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME)
29 /* REG_DEP_TRUE is used in LOG_LINKS to represent a read-after-write
30 dependency (i.e. a true data dependency). This is here, not
31 grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some passes
32 use a literal 0 for it. */
33 REG_NOTE (DEP_TRUE)
35 /* The value in REG dies in this insn (i.e., it is not needed past
36 this insn). If REG is set in this insn, the REG_DEAD note may,
37 but need not, be omitted. */
38 REG_NOTE (DEAD)
40 /* The REG is autoincremented or autodecremented in this insn. */
41 REG_NOTE (INC)
43 /* Describes the insn as a whole; it says that the insn sets a
44 register to a constant value or to be equivalent to a memory
45 address. If the register is spilled to the stack then the constant
46 value should be substituted for it. The contents of the REG_EQUIV
47 is the constant value or memory address, which may be different
48 from the source of the SET although it has the same value. A
49 REG_EQUIV note may also appear on an insn which copies a register
50 parameter to a pseudo-register, if there is a memory address which
51 could be used to hold that pseudo-register throughout the function. */
52 REG_NOTE (EQUIV)
54 /* Like REG_EQUIV except that the destination is only momentarily
55 equal to the specified rtx. Therefore, it cannot be used for
56 substitution; but it can be used for cse. */
57 REG_NOTE (EQUAL)
59 /* This insn copies the return-value of a library call out of the hard
60 reg for return values. This note is actually an INSN_LIST and it
61 points to the first insn involved in setting up arguments for the
62 call. flow.c uses this to delete the entire library call when its
63 result is dead. */
64 REG_NOTE (RETVAL)
66 /* The inverse of REG_RETVAL: it goes on the first insn of the library
67 call and points at the one that has the REG_RETVAL. This note is
68 also an INSN_LIST. */
69 REG_NOTE (LIBCALL)
71 /* The register is always nonnegative during the containing loop.
72 This is used in branches so that decrement and branch instructions
73 terminating on zero can be matched. There must be an insn pattern
74 in the md file named `decrement_and_branch_until_zero' or else this
75 will never be added to any instructions. */
76 REG_NOTE (NONNEG)
78 /* There is no conflict *after this insn* between the register in the
79 note and the destination of this insn. */
80 REG_NOTE (NO_CONFLICT)
82 /* Identifies a register set in this insn and never used. */
83 REG_NOTE (UNUSED)
85 /* REG_CC_SETTER and REG_CC_USER link a pair of insns that set and use
86 CC0, respectively. Normally, these are required to be consecutive
87 insns, but we permit putting a cc0-setting insn in the delay slot
88 of a branch as long as only one copy of the insn exists. In that
89 case, these notes point from one to the other to allow code
90 generation to determine what any require information and to
91 properly update CC_STATUS. These notes are INSN_LISTs. */
92 REG_NOTE (CC_SETTER)
93 REG_NOTE (CC_USER)
95 /* Points to a CODE_LABEL. Used by non-JUMP_INSNs to say that the
96 CODE_LABEL contained in the REG_LABEL note is used by the insn.
97 This note is an INSN_LIST. */
98 REG_NOTE (LABEL)
100 /* REG_DEP_ANTI and REG_DEP_OUTPUT are used in LOG_LINKS to represent
101 write-after-read and write-after-write dependencies respectively. */
102 REG_NOTE (DEP_ANTI)
103 REG_NOTE (DEP_OUTPUT)
105 /* REG_BR_PROB is attached to JUMP_INSNs and CALL_INSNs. It has an
106 integer value. For jumps, it is the probability that this is a
107 taken branch. For calls, it is the probability that this call
108 won't return. */
109 REG_NOTE (BR_PROB)
111 /* REG_VALUE_PROFILE is attached when the profile is read in to an
112 insn before that the code to profile the value is inserted. It
113 contains the results of profiling. */
114 REG_NOTE (VALUE_PROFILE)
116 /* Attached to a call insn; indicates that the call is malloc-like and
117 that the pointer returned cannot alias anything else. */
118 REG_NOTE (NOALIAS)
120 /* Used to optimize rtl generated by dynamic stack allocations for
121 targets where SETJMP_VIA_SAVE_AREA is true. */
122 REG_NOTE (SAVE_AREA)
124 /* REG_BR_PRED is attached to JUMP_INSNs and CALL_INSNSs. It contains
125 CONCAT of two integer value. First specifies the branch predictor
126 that added the note, second specifies the predicted hitrate of
127 branch in the same format as REG_BR_PROB note uses. */
128 REG_NOTE (BR_PRED)
130 /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
131 for DWARF to interpret what they imply. The attached rtx is used
132 instead of intuition. */
133 REG_NOTE (FRAME_RELATED_EXPR)
135 /* Indicates that REG holds the exception context for the function.
136 This context is shared by inline functions, so the code to acquire
137 the real exception context is delayed until after inlining. */
138 REG_NOTE (EH_CONTEXT)
140 /* Indicates what exception region an INSN belongs in. This is used
141 to indicate what region to which a call may throw. REGION 0
142 indicates that a call cannot throw at all. REGION -1 indicates
143 that it cannot throw, nor will it execute a non-local goto. */
144 REG_NOTE (EH_REGION)
146 /* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
147 REG_NOTE (SAVE_NOTE)
149 /* Indicates that this insn (which is part of the prologue) computes a
150 value which might not be used later, and if so it's OK to delete
151 the insn. Normally, deleting any insn in the prologue is an error.
152 At present the parameter is unused and set to (const_int 0). */
153 REG_NOTE (MAYBE_DEAD)
155 /* Indicates that a call does not return. */
156 REG_NOTE (NORETURN)
158 /* Indicates that an indirect jump is a non-local goto instead of a
159 computed goto. */
160 REG_NOTE (NON_LOCAL_GOTO)
162 /* Indicates that a jump crosses between hot and cold sections in a
163 (partitioned) assembly or .o file, and therefore should not be
164 reduced to a simpler jump by optimizations. */
165 REG_NOTE (CROSSING_JUMP)
167 /* This kind of note is generated at each to `setjmp', and similar
168 functions that can return twice. */
169 REG_NOTE (SETJMP)
171 /* Indicate calls that always returns. */
172 REG_NOTE (ALWAYS_RETURN)