GCC Middle and Back End API Reference
except.h File Reference

Go to the source code of this file.

Data Structures

struct  eh_landing_pad_d
struct  eh_catch_d
struct  eh_region_d
union  eh_region_d::eh_region_u
struct  eh_region_d::eh_region_u::eh_region_u_try
struct  eh_region_d::eh_region_u::eh_region_u_allowed
struct  eh_region_d::eh_region_u::eh_region_u_must_not_throw
struct  eh_status
union  eh_status::eh_status_u
struct  throw_stmt_node

Typedefs

typedef struct eh_landing_pad_deh_landing_pad
typedef struct eh_catch_deh_catch
typedef struct eh_region_deh_region
typedef tree(* duplicate_eh_regions_map )(tree, void *)

Enumerations

enum  eh_region_type { ERT_CLEANUP, ERT_TRY, ERT_ALLOWED_EXCEPTIONS, ERT_MUST_NOT_THROW }
enum  eh_personality_kind { eh_personality_none, eh_personality_any, eh_personality_lang }

Functions

void for_each_eh_label (void(*)(rtx))
void init_eh_for_function (void)
void remove_eh_landing_pad (eh_landing_pad)
void remove_eh_handler (eh_region)
void remove_unreachable_eh_regions (sbitmap)
bool current_function_has_exception_handlers (void)
void output_function_exception_table (const char *)
rtx expand_builtin_eh_pointer (tree)
rtx expand_builtin_eh_filter (tree)
rtx expand_builtin_eh_copy_values (tree)
void expand_builtin_unwind_init (void)
rtx expand_builtin_eh_return_data_regno (tree)
rtx expand_builtin_extract_return_addr (tree)
void expand_builtin_init_dwarf_reg_sizes (tree)
rtx expand_builtin_frob_return_addr (tree)
rtx expand_builtin_dwarf_sp_column (void)
void expand_builtin_eh_return (tree, tree)
void expand_eh_return (void)
rtx expand_builtin_extend_pointer (tree)
void expand_dw2_landing_pad_for_region (eh_region)
struct pointer_map_tduplicate_eh_regions (struct function *, eh_region, int, duplicate_eh_regions_map, void *)
void sjlj_emit_function_exit_after (rtx)
eh_region gen_eh_region_cleanup (eh_region)
eh_region gen_eh_region_try (eh_region)
eh_region gen_eh_region_allowed (eh_region, tree)
eh_region gen_eh_region_must_not_throw (eh_region)
eh_catch gen_eh_region_catch (eh_region, tree)
eh_landing_pad gen_eh_landing_pad (eh_region)
eh_region get_eh_region_from_number_fn (struct function *, int)
eh_region get_eh_region_from_number (int)
eh_landing_pad get_eh_landing_pad_from_number_fn (struct function *, int)
eh_landing_pad get_eh_landing_pad_from_number (int)
eh_region get_eh_region_from_lp_number_fn (struct function *, int)
eh_region get_eh_region_from_lp_number (int)
eh_region eh_region_outermost (struct function *, eh_region, eh_region)
void make_reg_eh_region_note (rtx insn, int ecf_flags, int lp_nr)
void make_reg_eh_region_note_nothrow_nononlocal (rtx)
void verify_eh_tree (struct function *)
void dump_eh_tree (FILE *, struct function *)
void debug_eh_tree (struct function *)
void add_type_for_runtime (tree)
tree lookup_type_for_runtime (tree)
void assign_filter_values (void)
eh_region get_eh_region_from_rtx (const_rtx)
eh_landing_pad get_eh_landing_pad_from_rtx (const_rtx)
void finish_eh_generation (void)
struct htab * get_eh_throw_stmt_table (struct function *)
void set_eh_throw_stmt_table (struct function *, struct htab *)
enum eh_personality_kind function_needs_eh_personality (struct function *)
static eh_region ehr_next ()

Typedef Documentation

typedef tree(* duplicate_eh_regions_map)(tree, void *)
typedef struct eh_catch_d* eh_catch
typedef struct eh_region_d* eh_region

Enumeration Type Documentation

Enumerator:
eh_personality_none 
eh_personality_any 
eh_personality_lang 
The type of an exception region.   
Enumerator:
ERT_CLEANUP 
ERT_TRY 
ERT_ALLOWED_EXCEPTIONS 
ERT_MUST_NOT_THROW 

Function Documentation

void add_type_for_runtime ( tree  )
bool current_function_has_exception_handlers ( void  )
Returns true if the current function has exception handling regions.   

References cfun, function::eh, and eh_status::region_tree.

Referenced by is_cfg_nonregular(), and suitable_for_tail_call_opt_p().

void debug_eh_tree ( struct function )
void dump_eh_tree ( FILE *  ,
struct function  
)
struct pointer_map_t* duplicate_eh_regions ( struct function ifun,
eh_region  copy_region,
int  outer_lp,
duplicate_eh_regions_map  map,
void *  map_data 
)
read
Duplicate the EH regions from IFUN rooted at COPY_REGION into
   the current function and root the tree below OUTER_REGION.
   The special case of COPY_REGION of NULL means all regions.
   Remap labels using MAP/MAP_DATA callback.  Return a pointer map
   that allows the caller to remap uses of both EH regions and
   EH landing pads.   

References cfun, duplicate_eh_regions_1(), duplicate_eh_regions_data::eh_map, get_eh_region_from_lp_number(), duplicate_eh_regions_data::label_map, duplicate_eh_regions_data::label_map_data, map, eh_region_d::next_peer, pointer_map_create(), and verify_eh_tree().

Referenced by copy_cfg_body(), and move_sese_region_to_fn().

eh_region eh_region_outermost ( struct function ifun,
eh_region  region_a,
eh_region  region_b 
)
Return the region that is outer to both REGION_A and REGION_B in IFUN.   

References bitmap_bit_p(), bitmap_clear(), bitmap_set_bit(), eh_region_d::index, eh_region_d::outer, sbitmap_alloc(), and sbitmap_free().

Referenced by find_outermost_region_in_block().

static eh_region ehr_next ( )
inlinestatic
Pre-order iteration within the eh_region tree.   

References eh_region_d::inner, eh_region_d::next_peer, and eh_region_d::outer.

rtx expand_builtin_dwarf_sp_column ( void  )
Hook used by __throw.   

Referenced by expand_builtin().

rtx expand_builtin_eh_copy_values ( tree  )
rtx expand_builtin_eh_filter ( tree  )
rtx expand_builtin_eh_pointer ( tree  )
void expand_builtin_eh_return ( tree  stackadj_tree,
tree  handler_tree 
)
Set up the epilogue with the magic bits we'll need to return to the
   exception handler.   

References copy_to_reg(), emit_jump(), emit_move_insn(), expand_expr(), EXPAND_NORMAL, and gen_label_rtx().

Referenced by expand_builtin().

rtx expand_builtin_eh_return_data_regno ( tree  )
rtx expand_builtin_extend_pointer ( tree  )
rtx expand_builtin_extract_return_addr ( tree  )
rtx expand_builtin_frob_return_addr ( tree  )
void expand_builtin_init_dwarf_reg_sizes ( tree  )
void expand_builtin_unwind_init ( void  )
Do any necessary initialization to access arbitrary stack frames.
   On the SPARC, this means flushing the register windows.   

Referenced by expand_builtin().

void expand_dw2_landing_pad_for_region ( eh_region  )
void expand_eh_return ( void  )
Expand __builtin_eh_return.  This exit path from the function loads up
   the eh return data registers, adjusts the stack, and branches to a
   given PC other than the normal return address.   

References clobber_return_register(), emit_insn(), emit_jump(), emit_label(), emit_move_insn(), error(), and gen_label_rtx().

Referenced by expand_function_end().

void for_each_eh_label ( void(*)(rtx callback)
Invokes CALLBACK for every exception handler label.  Only used by old
   loop hackery; should not be used by new code.   
Invokes CALLBACK for every exception handler landing pad label.
   Only used by reload hackery; should not be used by new code.   

References cfun, function::eh, eh_landing_pad_d::landing_pad, eh_status::lp_array, and vec_safe_iterate().

Referenced by set_initial_label_offsets().

enum eh_personality_kind function_needs_eh_personality ( struct function )
eh_landing_pad gen_eh_landing_pad ( eh_region  )
eh_region gen_eh_region_allowed ( eh_region  ,
tree   
)
eh_catch gen_eh_region_catch ( eh_region  ,
tree   
)
eh_region gen_eh_region_cleanup ( eh_region  )
eh_region gen_eh_region_must_not_throw ( eh_region  )
eh_region gen_eh_region_try ( eh_region  )
eh_landing_pad get_eh_landing_pad_from_number ( int  )
eh_landing_pad get_eh_landing_pad_from_number_fn ( struct function ,
int   
)
eh_landing_pad get_eh_landing_pad_from_rtx ( const_rtx  )
eh_region get_eh_region_from_lp_number ( int  )
eh_region get_eh_region_from_lp_number_fn ( struct function ,
int   
)
eh_region get_eh_region_from_number ( int  )
eh_region get_eh_region_from_number_fn ( struct function ,
int   
)
eh_region get_eh_region_from_rtx ( const_rtx  )
struct htab* get_eh_throw_stmt_table ( struct function )
read
tree lookup_type_for_runtime ( tree  )
void make_reg_eh_region_note ( rtx  insn,
int  ecf_flags,
int  lp_nr 
)
void make_reg_eh_region_note_nothrow_nononlocal ( rtx  )
void output_function_exception_table ( const char *  )
void remove_eh_handler ( eh_region  )
void remove_eh_landing_pad ( eh_landing_pad  )
void remove_unreachable_eh_regions ( sbitmap  )
void set_eh_throw_stmt_table ( struct function ,
struct htab *   
)
void sjlj_emit_function_exit_after ( rtx  )
void verify_eh_tree ( struct function )