reg-notes.def 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /* Register note definitions.
  2. Copyright (C) 2004-2015 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. /* This file defines all the codes that may appear on individual
  16. EXPR_LIST, INSN_LIST and INT_LIST rtxes in the REG_NOTES chain of an insn.
  17. The codes are stored in the mode field of the rtx. Source files
  18. define DEF_REG_NOTE appropriately before including this file. */
  19. /* Shorthand. */
  20. #define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME)
  21. /* REG_DEP_TRUE is used in scheduler dependencies lists to represent a
  22. read-after-write dependency (i.e. a true data dependency). This is
  23. here, not grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some
  24. passes use a literal 0 for it. */
  25. REG_NOTE (DEP_TRUE)
  26. /* The value in REG dies in this insn (i.e., it is not needed past
  27. this insn). If REG is set in this insn, the REG_DEAD note may,
  28. but need not, be omitted. */
  29. REG_NOTE (DEAD)
  30. /* The REG is autoincremented or autodecremented in this insn. */
  31. REG_NOTE (INC)
  32. /* Describes the insn as a whole; it says that the insn sets a
  33. register to a constant value or to be equivalent to a memory
  34. address. If the register is spilled to the stack then the constant
  35. value should be substituted for it. The contents of the REG_EQUIV
  36. is the constant value or memory address, which may be different
  37. from the source of the SET although it has the same value. A
  38. REG_EQUIV note may also appear on an insn which copies a register
  39. parameter to a pseudo-register, if there is a memory address which
  40. could be used to hold that pseudo-register throughout the function. */
  41. REG_NOTE (EQUIV)
  42. /* Like REG_EQUIV except that the destination is only momentarily
  43. equal to the specified rtx. Therefore, it cannot be used for
  44. substitution; but it can be used for cse. */
  45. REG_NOTE (EQUAL)
  46. /* The register is always nonnegative during the containing loop.
  47. This is used in branches so that decrement and branch instructions
  48. terminating on zero can be matched. There must be an insn pattern
  49. in the md file named `decrement_and_branch_until_zero' or else this
  50. will never be added to any instructions. */
  51. REG_NOTE (NONNEG)
  52. /* Identifies a register set in this insn and never used. */
  53. REG_NOTE (UNUSED)
  54. /* REG_CC_SETTER and REG_CC_USER link a pair of insns that set and use
  55. CC0, respectively. Normally, these are required to be consecutive
  56. insns, but we permit putting a cc0-setting insn in the delay slot
  57. of a branch as long as only one copy of the insn exists. In that
  58. case, these notes point from one to the other to allow code
  59. generation to determine what any require information and to
  60. properly update CC_STATUS. These notes are INSN_LISTs. */
  61. REG_NOTE (CC_SETTER)
  62. REG_NOTE (CC_USER)
  63. /* Points to a CODE_LABEL. Used by JUMP_INSNs to say that the CODE_LABEL
  64. contained in the REG_LABEL_TARGET note is a possible jump target of
  65. this insn. This note is an INSN_LIST. */
  66. REG_NOTE (LABEL_TARGET)
  67. /* Points to a CODE_LABEL. Used by any insn to say that the CODE_LABEL
  68. contained in the REG_LABEL_OPERAND note is used by the insn, but as an
  69. operand, not as a jump target (though it may indirectly be a jump
  70. target for a later jump insn). This note is an INSN_LIST. */
  71. REG_NOTE (LABEL_OPERAND)
  72. /* REG_DEP_OUTPUT and REG_DEP_ANTI are used in scheduler dependencies lists
  73. to represent write-after-write and write-after-read dependencies
  74. respectively. */
  75. REG_NOTE (DEP_OUTPUT)
  76. REG_NOTE (DEP_ANTI)
  77. REG_NOTE (DEP_CONTROL)
  78. /* REG_BR_PROB is attached to JUMP_INSNs and CALL_INSNs. It has an
  79. integer value (in an INT_LIST). For jumps, it is the probability
  80. that this is a taken branch. For calls, it is the probability that
  81. this call won't return. */
  82. REG_NOTE (BR_PROB)
  83. /* Attached to a call insn; indicates that the call is malloc-like and
  84. that the pointer returned cannot alias anything else. */
  85. REG_NOTE (NOALIAS)
  86. /* REG_BR_PRED is attached to JUMP_INSNs and CALL_INSNSs. It contains
  87. CONCAT of two integer value. First specifies the branch predictor
  88. that added the note, second specifies the predicted hitrate of
  89. branch in the same format as REG_BR_PROB note uses. */
  90. REG_NOTE (BR_PRED)
  91. /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
  92. for DWARF to interpret what they imply. The attached rtx is used
  93. instead of intuition. */
  94. REG_NOTE (FRAME_RELATED_EXPR)
  95. /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
  96. for FRAME_RELATED_EXPR intuition. The insn's first pattern must be
  97. a SET, and the destination must be the CFA register. The attached
  98. rtx is an expression that defines the CFA. In the simplest case, the
  99. rtx could be just the stack_pointer_rtx; more common would be a PLUS
  100. with a base register and a constant offset. In the most complicated
  101. cases, this will result in a DW_CFA_def_cfa_expression with the rtx
  102. expression rendered in a dwarf location expression. */
  103. REG_NOTE (CFA_DEF_CFA)
  104. /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
  105. for FRAME_RELATED_EXPR intuition. This note adjusts the expression
  106. from which the CFA is computed. The attached rtx defines a new CFA
  107. expression, relative to the old CFA expression. This rtx must be of
  108. the form (SET new-cfa-reg (PLUS old-cfa-reg const_int)). If the note
  109. rtx is NULL, we use the first SET of the insn. */
  110. REG_NOTE (CFA_ADJUST_CFA)
  111. /* Similar to FRAME_RELATED_EXPR, with the additional information that
  112. this is a save to memory, i.e. will result in DW_CFA_offset or the
  113. like. The pattern or the insn should be a simple store relative to
  114. the CFA. */
  115. REG_NOTE (CFA_OFFSET)
  116. /* Similar to FRAME_RELATED_EXPR, with the additional information that this
  117. is a save to a register, i.e. will result in DW_CFA_register. The insn
  118. or the pattern should be simple reg-reg move. */
  119. REG_NOTE (CFA_REGISTER)
  120. /* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
  121. for FRAME_RELATED_EXPR intuition. This is a save to memory, i.e. will
  122. result in a DW_CFA_expression. The pattern or the insn should be a
  123. store of a register to an arbitrary (non-validated) memory address. */
  124. REG_NOTE (CFA_EXPRESSION)
  125. /* Attached to insns that are RTX_FRAME_RELATED_P, with the information
  126. that this is a restore operation, i.e. will result in DW_CFA_restore
  127. or the like. Either the attached rtx, or the destination of the insn's
  128. first pattern is the register to be restored. */
  129. REG_NOTE (CFA_RESTORE)
  130. /* Attached to insns that are RTX_FRAME_RELATED_P, marks insn that sets
  131. vDRAP from DRAP. If vDRAP is a register, vdrap_reg is initalized
  132. to the argument, if it is a MEM, it is ignored. */
  133. REG_NOTE (CFA_SET_VDRAP)
  134. /* Attached to insns that are RTX_FRAME_RELATED_P, indicating a window
  135. save operation, i.e. will result in a DW_CFA_GNU_window_save.
  136. The argument is ignored. */
  137. REG_NOTE (CFA_WINDOW_SAVE)
  138. /* Attached to insns that are RTX_FRAME_RELATED_P, marks the insn as
  139. requiring that all queued information should be flushed *before* insn,
  140. regardless of what is visible in the rtl. The argument is ignored.
  141. This is normally used for a call instruction which is not exposed to
  142. the rest of the compiler as a CALL_INSN. */
  143. REG_NOTE (CFA_FLUSH_QUEUE)
  144. /* Indicates what exception region an INSN belongs in. This is used
  145. to indicate what region to which a call may throw. REGION 0
  146. indicates that a call cannot throw at all. REGION -1 indicates
  147. that it cannot throw, nor will it execute a non-local goto. */
  148. REG_NOTE (EH_REGION)
  149. /* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
  150. REG_NOTE (SAVE_NOTE)
  151. /* Indicates that a call does not return. */
  152. REG_NOTE (NORETURN)
  153. /* Indicates that an indirect jump is a non-local goto instead of a
  154. computed goto. */
  155. REG_NOTE (NON_LOCAL_GOTO)
  156. /* This kind of note is generated at each to `setjmp', and similar
  157. functions that can return twice. */
  158. REG_NOTE (SETJMP)
  159. /* This kind of note is generated at each transactional memory
  160. builtin, to indicate we need to generate transaction restart
  161. edges for this insn. */
  162. REG_NOTE (TM)
  163. /* Indicates the cumulative offset of the stack pointer accounting
  164. for pushed arguments. This will only be generated when
  165. ACCUMULATE_OUTGOING_ARGS is false. */
  166. REG_NOTE (ARGS_SIZE)
  167. /* Used for communication between IRA and caller-save.c, indicates
  168. that the return value of a call can be used to reinitialize a
  169. pseudo reg. */
  170. REG_NOTE (RETURNED)
  171. /* Used to mark a call with the function decl called by the call.
  172. The decl might not be available in the call due to splitting of the call
  173. insn. This note is a SYMBOL_REF. */
  174. REG_NOTE (CALL_DECL)