cd9c1ca866
* cfgcleanup.c (try_crossjump_to_edge): Only skip past NOTE_INSN_BASIC_BLOCK. * cfglayout.c (duplicate_insn_chain): Copy epilogue insn marks. Duplicate NOTE_INSN_EPILOGUE_BEG notes. * cfgrtl.c (can_delete_note_p): Allow NOTE_INSN_EPILOGUE_BEG to be deleted. * dwarf2out.c (struct cfa_loc): Change indirect field to bitfield, add in_use field. (add_cfi): Disable check redefining cfa away from drap. (lookup_cfa_1): Add remember argument; handle remember/restore. (lookup_cfa): Pass remember argument. (cfa_remember): New. (compute_barrier_args_size_1): Remove sibcall check. (dwarf2out_frame_debug_def_cfa): New. (dwarf2out_frame_debug_adjust_cfa): New. (dwarf2out_frame_debug_cfa_offset): New. (dwarf2out_frame_debug_cfa_register): New. (dwarf2out_frame_debug_cfa_restore): New. (dwarf2out_frame_debug): Handle REG_CFA_* notes. (dwarf2out_begin_epilogue): New. (dwarf2out_frame_debug_restore_state): New. (dw_cfi_oprnd1_desc): Handle DW_CFA_remember_state, DW_CFA_restore_state. (output_cfi_directive): Likewise. (convert_cfa_to_fb_loc_list): Likewise. (dw_cfi_oprnd1_desc): Handle DW_CFA_restore. * dwarf2out.h: Update. * emit-rtl.c (try_split): Don't split RTX_FRAME_RELATED_P. (copy_insn_1): Early out for null. * final.c (final_scan_insn): Call dwarf2out_begin_epilogue and dwarf2out_frame_debug_restore_state. * function.c (prologue, epilogue, sibcall_epilogue): Remove. (prologue_insn_hash, epilogue_insn_hash): New. (free_after_compilation): Adjust freeing accordingly. (record_insns): Create hash table if needed; push insns into hash instead of array. (maybe_copy_epilogue_insn): New. (contains): Search hash table instead of array. (sibcall_epilogue_contains): Remove. (thread_prologue_and_epilogue_insns): Split eh_return insns and mark them as epilogues. (reposition_prologue_and_epilogue_notes): Rewrite epilogue scanning in terms of basic blocks. * insn-notes.def (CFA_RESTORE_STATE): New. * jump.c (returnjump_p_1): Accept EH_RETURN. (eh_returnjump_p_1, eh_returnjump_p): New. * reg-notes.def (CFA_DEF_CFA, CFA_ADJUST_CFA, CFA_OFFSET, CFA_REGISTER, CFA_RESTORE): New. * rtl.def (EH_RETURN): New. * rtl.h (eh_returnjump_p, maybe_copy_epilogue_insn): Declare. * config/bfin/bfin.md (UNSPEC_VOLATILE_EH_RETURN): Remove. (eh_return_internal): Use eh_return rtx; split w/ epilogue. * config/i386/i386.c (gen_push): Update cfa state. (pro_epilogue_adjust_stack): Add set_cfa argument. When true, add a CFA_ADJUST_CFA note. (ix86_dwarf_handle_frame_unspec): Remove. (ix86_expand_prologue): Update cfa state. (ix86_emit_restore_reg_using_pop): New. (ix86_emit_restore_regs_using_pop): New. (ix86_emit_leave): New. (ix86_emit_restore_regs_using_mov): Add CFA_RESTORE notes. (ix86_expand_epilogue): Add notes for unwinding the epilogue. * config/i386/i386.h (struct machine_cfa_state): New. (ix86_cfa_state): New. * config/i386/i386.md (UNSPEC_EH_RETURN): Remove. (eh_return_internal): Merge from eh_return_<mode>, use eh_return rtx, split w/ epilogue. From-SVN: r147995
185 lines
7.9 KiB
Modula-2
185 lines
7.9 KiB
Modula-2
/* Register note definitions.
|
|
Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free
|
|
Software Foundation; either version 3, or (at your option) any later
|
|
version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING3. If not see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
/* This file defines all the codes that may appear on individual
|
|
EXPR_LIST rtxes in the REG_NOTES chain of an insn. The codes are
|
|
stored in the mode field of the EXPR_LIST. Source files define
|
|
DEF_REG_NOTE appropriately before including this file. */
|
|
|
|
/* Shorthand. */
|
|
#define REG_NOTE(NAME) DEF_REG_NOTE (REG_##NAME)
|
|
|
|
/* REG_DEP_TRUE is used in scheduler dependencies lists to represent a
|
|
read-after-write dependency (i.e. a true data dependency). This is
|
|
here, not grouped with REG_DEP_ANTI and REG_DEP_OUTPUT, because some
|
|
passes use a literal 0 for it. */
|
|
REG_NOTE (DEP_TRUE)
|
|
|
|
/* 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_NOTE (DEAD)
|
|
|
|
/* The REG is autoincremented or autodecremented in this insn. */
|
|
REG_NOTE (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_NOTE (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_NOTE (EQUAL)
|
|
|
|
/* 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_NOTE (NONNEG)
|
|
|
|
/* Identifies a register set in this insn and never used. */
|
|
REG_NOTE (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_NOTE (CC_SETTER)
|
|
REG_NOTE (CC_USER)
|
|
|
|
/* Points to a CODE_LABEL. Used by JUMP_INSNs to say that the CODE_LABEL
|
|
contained in the REG_LABEL_TARGET note is a possible jump target of
|
|
this insn. This note is an INSN_LIST. */
|
|
REG_NOTE (LABEL_TARGET)
|
|
|
|
/* Points to a CODE_LABEL. Used by any insn to say that the CODE_LABEL
|
|
contained in the REG_LABEL_OPERAND note is used by the insn, but as an
|
|
operand, not as a jump target (though it may indirectly be a jump
|
|
target for a later jump insn). This note is an INSN_LIST. */
|
|
REG_NOTE (LABEL_OPERAND)
|
|
|
|
/* REG_DEP_OUTPUT and REG_DEP_ANTI are used in scheduler dependencies lists
|
|
to represent write-after-write and write-after-read dependencies
|
|
respectively. */
|
|
REG_NOTE (DEP_OUTPUT)
|
|
REG_NOTE (DEP_ANTI)
|
|
|
|
/* 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_NOTE (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_NOTE (VALUE_PROFILE)
|
|
|
|
/* Attached to a call insn; indicates that the call is malloc-like and
|
|
that the pointer returned cannot alias anything else. */
|
|
REG_NOTE (NOALIAS)
|
|
|
|
/* 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_NOTE (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_NOTE (FRAME_RELATED_EXPR)
|
|
|
|
/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
|
|
for FRAME_RELATED_EXPR intuition. The insn's first pattern must be
|
|
a SET, and the destination must be the CFA register. The attached
|
|
rtx is an expression that defines the CFA. In the simplest case, the
|
|
rtx could be just the stack_pointer_rtx; more common would be a PLUS
|
|
with a base register and a constant offset. In the most complicated
|
|
cases, this will result in a DW_CFA_def_cfa_expression with the rtx
|
|
expression rendered in a dwarf location expression. */
|
|
REG_NOTE (CFA_DEF_CFA)
|
|
|
|
/* Attached to insns that are RTX_FRAME_RELATED_P, but are too complex
|
|
for FRAME_RELATED_EXPR intuition. This note adjusts the expression
|
|
from which the CFA is computed. The attached rtx defines a new CFA
|
|
expression, relative to the old CFA expression. This rtx must be of
|
|
the form (SET new-cfa-reg (PLUS old-cfa-reg const_int)). If the note
|
|
rtx is NULL, we use the first SET of the insn. */
|
|
REG_NOTE (CFA_ADJUST_CFA)
|
|
|
|
/* Similar to FRAME_RELATED_EXPR, with the additional information that
|
|
this is a save to memory, i.e. will result in DW_CFA_offset or the
|
|
like. The pattern or the insn should be a simple store relative to
|
|
the CFA. */
|
|
REG_NOTE (CFA_OFFSET)
|
|
|
|
/* Similar to FRAME_RELATED_EXPR, with the additional information that this
|
|
is a save to a register, i.e. will result in DW_CFA_register. The insn
|
|
or the pattern should be simple reg-reg move. */
|
|
REG_NOTE (CFA_REGISTER)
|
|
|
|
/* Attached to insns that are RTX_FRAME_RELATED_P, with the information
|
|
that this is a restore operation, i.e. will result in DW_CFA_restore
|
|
or the like. Either the attached rtx, or the destination of the insn's
|
|
first pattern is the register to be restored. */
|
|
REG_NOTE (CFA_RESTORE)
|
|
|
|
/* 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_NOTE (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_NOTE (EH_REGION)
|
|
|
|
/* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
|
|
REG_NOTE (SAVE_NOTE)
|
|
|
|
/* Indicates that a call does not return. */
|
|
REG_NOTE (NORETURN)
|
|
|
|
/* Indicates that an indirect jump is a non-local goto instead of a
|
|
computed goto. */
|
|
REG_NOTE (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_NOTE (CROSSING_JUMP)
|
|
|
|
/* This kind of note is generated at each to `setjmp', and similar
|
|
functions that can return twice. */
|
|
REG_NOTE (SETJMP)
|