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
78 lines
2.8 KiB
Modula-2
78 lines
2.8 KiB
Modula-2
/* Insn note definitions.
|
|
Copyright (C) 2004, 2005, 2007 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 in the
|
|
NOTE_LINE_NUMBER field of a NOTE insn for kinds of notes that are
|
|
not line numbers. Source files define DEF_INSN_NOTE appropriately
|
|
before including this file.
|
|
|
|
We are slowly removing the concept of insn-chain notes from the
|
|
compiler. Adding new codes to this file is STRONGLY DISCOURAGED.
|
|
If you think you need one, look for other ways to express what you
|
|
mean, such as register notes or bits in the basic-block structure. */
|
|
|
|
/* Shorthand. */
|
|
#define INSN_NOTE(NAME) DEF_INSN_NOTE (NOTE_INSN_##NAME)
|
|
|
|
/* This note is used to get rid of an insn when it isn't safe to patch
|
|
the insn out of the chain. */
|
|
INSN_NOTE (DELETED)
|
|
|
|
/* Generated in place of user-declared labels when they are deleted. */
|
|
INSN_NOTE (DELETED_LABEL)
|
|
|
|
/* These are used to mark the beginning and end of a lexical block.
|
|
See NOTE_BLOCK and reorder_blocks. */
|
|
INSN_NOTE (BLOCK_BEG)
|
|
INSN_NOTE (BLOCK_END)
|
|
|
|
/* 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. */
|
|
INSN_NOTE (FUNCTION_BEG)
|
|
|
|
/* This marks the point immediately after the last prologue insn. */
|
|
INSN_NOTE (PROLOGUE_END)
|
|
|
|
/* This marks the point immediately prior to the first epilogue insn. */
|
|
INSN_NOTE (EPILOGUE_BEG)
|
|
|
|
/* These note where exception handling regions begin and end.
|
|
Uses NOTE_EH_HANDLER to identify the region in question. */
|
|
INSN_NOTE (EH_REGION_BEG)
|
|
INSN_NOTE (EH_REGION_END)
|
|
|
|
/* The location of a variable. */
|
|
INSN_NOTE (VAR_LOCATION)
|
|
|
|
/* Record the struct for the following basic block. Uses
|
|
NOTE_BASIC_BLOCK. FIXME: Redundant with the basic block pointer
|
|
now included in every insn. */
|
|
INSN_NOTE (BASIC_BLOCK)
|
|
|
|
/* Mark the inflection point in the instruction stream where we switch
|
|
between hot and cold text sections. */
|
|
INSN_NOTE (SWITCH_TEXT_SECTIONS)
|
|
|
|
/* Mark the restore point after an epilogue changed CFI data. Used only
|
|
when an epilogue appears in the middle of a function. */
|
|
INSN_NOTE (CFA_RESTORE_STATE)
|
|
|
|
#undef INSN_NOTE
|