aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h225
1 files changed, 11 insertions, 214 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 0d0e300..120e794 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -722,146 +722,12 @@ do { \
#define REG_NOTES(INSN) XEXP(INSN, 8)
-/* Don't forget to change reg_note_name in rtl.c. */
enum reg_note
{
- /* The value in REG dies in this insn (i.e., it is not needed past
- this insn). If REG is set in this insn, the REG_DEAD note may,
- but need not, be omitted. */
- REG_DEAD = 1,
-
- /* The REG is autoincremented or autodecremented. */
- REG_INC,
-
- /* Describes the insn as a whole; it says that the insn sets a register
- to a constant value or to be equivalent to a memory address. If the
- register is spilled to the stack then the constant value should be
- substituted for it. The contents of the REG_EQUIV is the constant
- value or memory address, which may be different from the source of
- the SET although it has the same value. A REG_EQUIV note may also
- appear on an insn which copies a register parameter to a pseudo-register,
- if there is a memory address which could be used to hold that
- pseudo-register throughout the function. */
- REG_EQUIV,
-
- /* Like REG_EQUIV except that the destination is only momentarily equal
- to the specified rtx. Therefore, it cannot be used for substitution;
- but it can be used for cse. */
- REG_EQUAL,
-
- /* This insn copies the return-value of a library call out of the hard reg
- for return values. This note is actually an INSN_LIST and it points to
- the first insn involved in setting up arguments for the call. flow.c
- uses this to delete the entire library call when its result is dead. */
- REG_RETVAL,
-
- /* The inverse of REG_RETVAL: it goes on the first insn of the library call
- and points at the one that has the REG_RETVAL. This note is also an
- INSN_LIST. */
- REG_LIBCALL,
-
- /* The register is always nonnegative during the containing loop. This is
- used in branches so that decrement and branch instructions terminating
- on zero can be matched. There must be an insn pattern in the md file
- named `decrement_and_branch_until_zero' or else this will never be added
- to any instructions. */
- REG_NONNEG,
-
- /* There is no conflict *after this insn* between the register in the note
- and the destination of this insn. */
- REG_NO_CONFLICT,
-
- /* Identifies a register set in this insn and never used. */
- REG_UNUSED,
-
- /* REG_CC_SETTER and REG_CC_USER link a pair of insns that set and use CC0,
- respectively. Normally, these are required to be consecutive insns, but
- we permit putting a cc0-setting insn in the delay slot of a branch as
- long as only one copy of the insn exists. In that case, these notes
- point from one to the other to allow code generation to determine what
- any require information and to properly update CC_STATUS. These notes
- are INSN_LISTs. */
- REG_CC_SETTER, REG_CC_USER,
-
- /* Points to a CODE_LABEL. Used by non-JUMP_INSNs to say that the
- CODE_LABEL contained in the REG_LABEL note is used by the insn.
- This note is an INSN_LIST. */
- REG_LABEL,
-
- /* REG_DEP_ANTI and REG_DEP_OUTPUT are used in LOG_LINKS to represent
- write-after-read and write-after-write dependencies respectively.
- Data dependencies, which are the only type of LOG_LINK created by
- flow, are represented by a 0 reg note kind. */
- REG_DEP_ANTI, REG_DEP_OUTPUT,
-
- /* REG_BR_PROB is attached to JUMP_INSNs and CALL_INSNs.
- It has an integer value. For jumps, it is the probability that this is a
- taken branch. For calls, it is the probability that this call won't
- return. */
- REG_BR_PROB,
-
- /* REG_VALUE_PROFILE is attached when the profile is read in to an insn
- before that the code to profile the value is inserted. It contains
- the results of profiling. */
- REG_VALUE_PROFILE,
-
- /* Attached to a call insn; indicates that the call is malloc-like and
- that the pointer returned cannot alias anything else. */
- REG_NOALIAS,
-
- /* Used to optimize rtl generated by dynamic stack allocations for targets
- where SETJMP_VIA_SAVE_AREA is true. */
- REG_SAVE_AREA,
-
- /* REG_BR_PRED is attached to JUMP_INSNs and CALL_INSNSs. It contains
- CONCAT of two integer value. First specifies the branch predictor
- that added the note, second specifies the predicted hitrate of branch
- in the same format as REG_BR_PROB note uses. */
- REG_BR_PRED,
-
- /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
- for DWARF to interpret what they imply. The attached rtx is used
- instead of intuition. */
- REG_FRAME_RELATED_EXPR,
-
- /* Indicates that REG holds the exception context for the function.
- This context is shared by inline functions, so the code to acquire
- the real exception context is delayed until after inlining. */
- REG_EH_CONTEXT,
-
- /* Indicates what exception region an INSN belongs in. This is used to
- indicate what region to which a call may throw. REGION 0 indicates
- that a call cannot throw at all. REGION -1 indicates that it cannot
- throw, nor will it execute a non-local goto. */
- REG_EH_REGION,
-
- /* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
- REG_SAVE_NOTE,
-
- /* Indicates that this insn (which is part of the prologue) computes
- a value which might not be used later, and if so it's OK to delete
- the insn. Normally, deleting any insn in the prologue is an error.
- At present the parameter is unused and set to (const_int 0). */
- REG_MAYBE_DEAD,
-
- /* Indicates that a call does not return. */
- REG_NORETURN,
-
- /* Indicates that an indirect jump is a non-local goto instead of a
- computed goto. */
- REG_NON_LOCAL_GOTO,
-
- /* Indicates that a jump crosses between hot and cold sections
- in a (partitioned) assembly or .o file, and therefore should not be
- reduced to a simpler jump by optimizations. */
- REG_CROSSING_JUMP,
-
- /* This kind of note is generated at each to `setjmp',
- and similar functions that can return twice. */
- REG_SETJMP,
-
- /* Indicate calls that always returns. */
- REG_ALWAYS_RETURN
+#define DEF_REG_NOTE(NAME) NAME,
+#include "reg-notes.def"
+#undef DEF_REG_NOTE
+ REG_NOTE_MAX
};
/* The base value for branch probability notes. */
@@ -944,93 +810,24 @@ extern const char * const reg_note_name[];
0, VAR_LOCATION))
#define NOTE_VAR_LOCATION_LOC(INSN) (XCEXP (XCEXP (INSN, 4, NOTE), \
1, VAR_LOCATION))
-
-/* Codes that appear in the NOTE_LINE_NUMBER field
- for kinds of notes that are not line numbers.
+/* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes
+ that are not line numbers. These codes are all negative.
+
Notice that we do not try to use zero here for any of
the special note codes because sometimes the source line
actually can be zero! This happens (for example) when we
are generating code for the per-translation-unit constructor
- and destructor routines for some C++ translation unit.
-
- If you should change any of the following values, or if you
- should add a new value here, don't forget to change the
- note_insn_name array in rtl.c. */
+ and destructor routines for some C++ translation unit. */
enum insn_note
{
/* Keep all of these numbers negative. Adjust as needed. */
NOTE_INSN_BIAS = -100,
- /* This note is used to get rid of an insn
- when it isn't safe to patch the insn out of the chain. */
- NOTE_INSN_DELETED,
-
- /* These are used to mark the beginning and end of a lexical block.
- See NOTE_BLOCK and reorder_blocks. */
- NOTE_INSN_BLOCK_BEG,
- NOTE_INSN_BLOCK_END,
-
- /* These mark the extremes of a loop. */
- NOTE_INSN_LOOP_BEG,
- NOTE_INSN_LOOP_END,
-
- /* Generated at the place in a loop that `continue' jumps to. */
- NOTE_INSN_LOOP_CONT,
- /* Generated at the start of a duplicated exit test. */
- NOTE_INSN_LOOP_VTOP,
-
- /* Mark that a block shouldn't be scheduled. This is currently
- used in modulo scheduling. Modulo scheduling adds this note
- to the blocks of the modulo-scheduled loops to disable scheduling
- them in the later traditional scheduling passes. */
- NOTE_DISABLE_SCHED_OF_BLOCK,
-
- /* This kind of note is generated at the end of the function body,
- just before the return insn or return label. In an optimizing
- compilation it is deleted by the first jump optimization, after
- enabling that optimizer to determine whether control can fall
- off the end of the function body without a return statement. */
- NOTE_INSN_FUNCTION_END,
-
- /* This marks the point immediately after the last prologue insn. */
- NOTE_INSN_PROLOGUE_END,
-
- /* This marks the point immediately prior to the first epilogue insn. */
- NOTE_INSN_EPILOGUE_BEG,
-
- /* Generated in place of user-declared labels when they are deleted. */
- NOTE_INSN_DELETED_LABEL,
-
- /* This note indicates the start of the real body of the function,
- i.e. the point just after all of the parms have been moved into
- their homes, etc. */
- NOTE_INSN_FUNCTION_BEG,
-
- /* These note where exception handling regions begin and end.
- Uses NOTE_EH_HANDLER to identify the region in question. */
- NOTE_INSN_EH_REGION_BEG,
- NOTE_INSN_EH_REGION_END,
-
- /* Generated whenever a duplicate line number note is output. For example,
- one is output after the end of an inline function, in order to prevent
- the line containing the inline call from being counted twice in gcov. */
- NOTE_INSN_REPEATED_LINE_NUMBER,
-
- /* Record the struct for the following basic block. Uses NOTE_BASIC_BLOCK. */
- NOTE_INSN_BASIC_BLOCK,
-
- /* Record the expected value of a register at a location. Uses
- NOTE_EXPECTED_VALUE; stored as (eq (reg) (const_int)). */
- NOTE_INSN_EXPECTED_VALUE,
-
- /* Record that the current basic block is unlikely to be executed and
- should be moved to the UNLIKELY_EXECUTED_TEXT_SECTION. */
- NOTE_INSN_UNLIKELY_EXECUTED_CODE,
-
- /* The location of a variable. */
- NOTE_INSN_VAR_LOCATION,
+#define DEF_INSN_NOTE(NAME) NAME,
+#include "insn-notes.def"
+#undef DEF_INSN_NOTE
NOTE_INSN_MAX
};