GCC Middle and Back End API Reference
|
Data Structures | |
struct | call_site_record_d |
struct | action_record |
struct | action_record_hasher |
struct | duplicate_eh_regions_data |
struct | ttypes_filter |
struct | ttypes_filter_hasher |
struct | ehspec_hasher |
Typedefs | |
typedef hash_table < action_record_hasher > | action_hash_type |
typedef hash_table < ttypes_filter_hasher > | ttypes_hash_type |
typedef hash_table< ehspec_hasher > | ehspec_hash_type |
Variables | |
static int | call_site_base |
static htab_t | type_to_runtime_map |
static tree | sjlj_fc_type_node |
static int | sjlj_fc_call_site_ofs |
static int | sjlj_fc_data_ofs |
static int | sjlj_fc_personality_ofs |
static int | sjlj_fc_lsda_ofs |
static int | sjlj_fc_jbuf_ofs |
static vec< int > | sjlj_lp_call_site_index |
typedef hash_table<ehspec_hasher> ehspec_hash_type |
|
static |
References action_record::filter, hash_table< Descriptor, Allocator >::find_slot(), action_record::next, action_record::offset, and push_sleb128().
Referenced by collect_one_action_chain().
|
static |
Referenced by convert_to_eh_region_ranges(), and sjlj_assign_call_site_values().
|
static |
References call_site_record_d::action, call_site_base, call_site_record_d::landing_pad, and vec_safe_push().
|
static |
Add LIST to cfun->eh->ehspec_data, using EHSPEC_HASH and TYPES_HASH to speed up the search. Return the filter value to be used.
References add_ttypes_entry(), eh_status::eh_status_u::arm_eabi, cfun, function::eh, eh_status::ehspec_data, ttypes_filter::filter, hash_table< Descriptor, Allocator >::find_slot(), len, eh_status::eh_status_u::other, push_uleb128(), ttypes_filter::t, targetm, vec_safe_length(), and vec_safe_push().
Referenced by assign_filter_values().
|
static |
Add TYPE (which may be NULL) to cfun->eh->ttype_data, using TYPES_HASH to speed up the search. Return the filter value to be used.
References cfun, function::eh, ttypes_filter::filter, hash_table< Descriptor, Allocator >::find_slot_with_hash(), ttypes_filter::t, eh_status::ttype_data, type(), vec_safe_length(), and vec_safe_push().
Referenced by add_ehspec_entry(), and assign_filter_values().
void add_type_for_runtime | ( | ) |
References lang_hooks::eh_runtime_type, and type_to_runtime_map.
Referenced by gen_eh_region_allowed(), gen_eh_region_catch(), input_eh_region(), and lto_input_eh_catch_list().
void assign_filter_values | ( | void | ) |
Generate the action filter values to be used for CATCH and ALLOWED_EXCEPTIONS regions. When using dwarf2 exception regions, we use lots of landing pads, and so every type or list can share the same filter value, which saves table space.
References add_ehspec_entry(), add_ttypes_entry(), eh_region_d::eh_region_u::allowed, eh_status::eh_status_u::arm_eabi, build_int_cst(), cfun, hash_table< Descriptor, Allocator >::create(), hash_table< Descriptor, Allocator >::dispose(), function::eh, eh_region_d::eh_region_u::eh_try, eh_status::ehspec_data, ERT_ALLOWED_EXCEPTIONS, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_allowed::filter, eh_catch_d::filter_list, eh_region_d::eh_region_u::eh_region_u_try::first_catch, eh_catch_d::next_catch, eh_status::eh_status_u::other, eh_status::region_array, targetm, eh_status::ttype_data, eh_region_d::type, eh_catch_d::type_list, eh_region_d::eh_region_u::eh_region_u_allowed::type_list, eh_region_d::u, vec_alloc(), and vec_safe_iterate().
Referenced by execute_lower_eh_dispatch().
bool can_nonlocal_goto | ( | ) |
Return true if INSN can perform a non-local goto.
??? This test is here in this file because it (ab)uses REG_EH_REGION.
References find_reg_note().
Referenced by control_flow_insn_p(), create_trace_edges(), make_edges(), peep2_attempt(), and purge_dead_edges().
bool can_throw_external | ( | ) |
Return true if INSN throws and escapes from the current function.
References ERT_MUST_NOT_THROW, get_eh_region_and_lp_from_rtx(), and eh_region_d::type.
Referenced by set_nothrow_function_flags().
bool can_throw_internal | ( | ) |
Return true if INSN throws and is caught by something in this function.
References get_eh_landing_pad_from_rtx().
Referenced by add_branch_dependences(), compute_defs_uses_and_gen(), control_flow_insn_p(), decompose_multiword_subregs(), fill_simple_delay_slots(), fill_slots_from_thread(), find_dead_or_set_registers(), find_invariant_insn(), fix_up_fall_thru_edges(), fixup_abnormal_edges(), hash_scan_set(), merge_if_block(), move_btr_def(), optimize_skip(), peep2_attempt(), process_bb_node_lives(), purge_dead_edges(), regstat_bb_compute_ri(), relax_delay_slots(), reload(), requires_stack_frame_p(), scan_trace(), sched_analyze_insn(), stop_search_p(), and update_equiv_regs().
|
static |
Referenced by collect_one_action_chain(), convert_to_eh_region_ranges(), and sjlj_assign_call_site_values().
|
static |
References add_action_record(), eh_region_d::eh_region_u::allowed, collect_one_action_chain(), eh_region_d::eh_region_u::eh_try, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_allowed::filter, action_record::filter, eh_catch_d::filter_list, eh_region_d::eh_region_u::eh_region_u_try::last_catch, action_record::next, eh_region_d::outer, eh_catch_d::prev_catch, eh_region_d::type, eh_catch_d::type_list, and eh_region_d::u.
|
static |
Turn REG_EH_REGION notes back into NOTE_INSN_EH_REGION notes. The new note numbers will not refer to region numbers, but instead to call site entries.
References add_call_site(), call_site_base, collect_one_action_chain(), hash_table< Descriptor, Allocator >::create(), hash_table< Descriptor, Allocator >::dispose(), emit_note_after(), emit_note_before(), get_eh_region_and_lp_from_rtx(), get_insns(), eh_landing_pad_d::landing_pad, pc_rtx, and vec_alloc().
void copy_reg_eh_region_note_backward | ( | ) |
Likewise, but iterate backward.
References add_reg_note(), find_reg_note(), first, and insn_could_throw_p().
Referenced by peep2_attempt(), and try_split().
void copy_reg_eh_region_note_forward | ( | ) |
Copy an REG_EH_REGION note to each insn that might throw beginning at FIRST and ending at LAST. NOTE_OR_INSN is either the source insn to look for a note, or the note itself.
References add_reg_note(), find_reg_note(), insn_could_throw_p(), and last.
Referenced by emit_input_reload_insns(), emit_output_reload_insns(), fixup_eh_region_note(), and resolve_simple_move().
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().
DEBUG_FUNCTION void debug_eh_tree | ( | ) |
Dump the EH tree for FN on stderr.
References dump_eh_tree().
void dump_eh_tree | ( | ) |
Dump EH information to OUT.
References eh_region_d::eh_region_u::allowed, current_ir_type(), eh_region_d::eh_region_u::eh_try, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_allowed::filter, eh_region_d::eh_region_u::eh_region_u_try::first_catch, eh_landing_pad_d::index, eh_region_d::index, eh_region_d::inner, IR_GIMPLE, eh_catch_d::label, label_rtx(), eh_landing_pad_d::landing_pad, eh_region_d::landing_pads, eh_catch_d::next_catch, eh_landing_pad_d::next_lp, eh_region_d::next_peer, eh_region_d::outer, eh_landing_pad_d::post_landing_pad, print_generic_expr(), eh_region_d::type, eh_catch_d::type_list, eh_region_d::eh_region_u::eh_region_u_allowed::type_list, and eh_region_d::u.
Referenced by debug_eh_tree(), dump_function_to_file(), remove_unreachable_handlers(), and verify_eh_tree().
|
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().
|
static |
References eh_region_d::eh_region_u::allowed, duplicate_eh_regions_data::eh_map, eh_region_d::eh_region_u::eh_try, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_must_not_throw::failure_decl, eh_region_d::eh_region_u::eh_region_u_must_not_throw::failure_loc, eh_catch_d::filter_list, eh_region_d::eh_region_u::eh_region_u_try::first_catch, gen_eh_landing_pad(), gen_eh_region(), gen_eh_region_catch(), eh_landing_pad_d::index, eh_region_d::inner, eh_catch_d::label, eh_region_d::eh_region_u::eh_region_u_allowed::label, duplicate_eh_regions_data::label_map, duplicate_eh_regions_data::label_map_data, eh_region_d::landing_pads, eh_region_d::eh_region_u::must_not_throw, eh_catch_d::next_catch, eh_landing_pad_d::next_lp, eh_region_d::next_peer, pointer_map_insert(), eh_landing_pad_d::post_landing_pad, eh_region_d::type, eh_catch_d::type_list, eh_region_d::eh_region_u::eh_region_u_allowed::type_list, eh_region_d::u, and eh_region_d::use_cxa_end_cleanup.
Referenced by duplicate_eh_regions().
|
static |
Expand the extra code needed at landing pads for dwarf2 unwinding.
References add_bb_to_loop(), cfun, edge_def::count, basic_block_def::count, function::eh, emit_label(), emit_to_new_bb_before(), end_sequence(), expand_dw2_landing_pad_for_region(), gen_label_rtx(), get_insns(), loop::header, label_rtx(), eh_landing_pad_d::landing_pad, basic_block_def::loop_father, loop_outer(), eh_status::lp_array, make_edge(), basic_block_def::next_bb, eh_landing_pad_d::post_landing_pad, edge_def::probability, eh_landing_pad_d::region, start_sequence(), and vec_safe_iterate().
Referenced by finish_eh_generation().
|
static |
Referenced by output_one_function_exception_table().
|
static |
|
static |
Referenced by output_one_function_exception_table().
|
static |
References call_site_record_d::action, size_of_uleb128(), and vec_safe_length().
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 |
Emit SEQ into basic block just before INSN (that is assumed to be first instruction of some existing BB and return the newly produced block.
References create_basic_block(), ei_next(), ei_safe_edge(), emit_insn_before(), edge_def::flags, basic_block_def::flags, force_nonfallthru(), last, basic_block_def::prev_bb, and update_bb_for_insn().
Referenced by dw2_build_landing_pads(), and sjlj_emit_dispatch_table().
|
static |
Various hooks for unwind library.
Expand the EH support builtin functions: __builtin_eh_pointer and __builtin_eh_filter.
References cfun, function::eh, host_integerp(), HOST_WIDE_INT, eh_status::region_array, and tree_low_cst().
Referenced by expand_builtin_eh_copy_values(), expand_builtin_eh_filter(), and expand_builtin_eh_pointer().
rtx expand_builtin_eh_copy_values | ( | ) |
Copy the exc_ptr and filter values from one landing pad's registers to another. This is used to inline the resx statement.
References emit_move_insn(), eh_region_d::exc_ptr_reg, expand_builtin_eh_common(), eh_region_d::filter_reg, gen_reg_rtx(), ptr_mode, and targetm.
Referenced by expand_builtin().
rtx expand_builtin_eh_filter | ( | ) |
Expand to the filter value from the given eh region.
References expand_builtin_eh_common(), eh_region_d::filter_reg, gen_reg_rtx(), and targetm.
Referenced by expand_builtin().
rtx expand_builtin_eh_pointer | ( | ) |
Expand to the exc_ptr value from the given eh region.
References eh_region_d::exc_ptr_reg, expand_builtin_eh_common(), gen_reg_rtx(), and ptr_mode.
Referenced by expand_builtin().
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 | ( | ) |
Map a non-negative number to an eh return data register number; expands to -1 if no return data register is associated with the input number. At least the inputs 0 and 1 must be mapped; the target may provide more.
References error(), HOST_WIDE_INT, and tree_low_cst().
Referenced by expand_builtin().
rtx expand_builtin_extend_pointer | ( | ) |
Convert a ptr_mode address ADDR_TREE to a Pmode address controlled by POINTERS_EXTEND_UNSIGNED and return it.
References convert_modes(), expand_expr(), EXPAND_NORMAL, ptr_mode, and targetm.
Referenced by expand_builtin().
rtx expand_builtin_extract_return_addr | ( | ) |
Given a value extracted from the return address register or stack slot, return the actual address encoded in that value.
References convert_to_mode(), expand_and(), expand_expr(), EXPAND_NORMAL, and plus_constant().
Referenced by expand_builtin().
rtx expand_builtin_frob_return_addr | ( | ) |
Given an actual address in addr_tree, do any necessary encoding and return the value to be stored in the return address register or stack slot so the epilogue will return to that address.
References expand_expr(), EXPAND_NORMAL, force_reg(), plus_constant(), and ptr_mode.
Referenced by expand_builtin().
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 | ( | ) |
A subroutine of dw2_build_landing_pads, also used for edge splitting at the rtl level. Emit the code required by the target at a landing pad for the given region.
References emit_insn(), emit_move_insn(), eh_region_d::exc_ptr_reg, eh_region_d::filter_reg, gen_rtx_REG(), ptr_mode, and targetm.
Referenced by dw2_build_landing_pads(), and fix_up_crossing_landing_pad().
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 finish_eh_generation | ( | void | ) |
After initial rtl generation, call back to finish generating exception support code.
References break_superblocks(), commit_edge_insertions(), edge_def::dest, dw2_build_landing_pads(), edge_def::flags, get_eh_landing_pad_from_rtx(), edge_def::insns, label_rtx(), eh_landing_pad_d::landing_pad, eh_landing_pad_d::post_landing_pad, edge_def::edge_def_insns::r, redirect_edge_succ(), single_succ_edge(), sjlj_build_landing_pads(), basic_block_def::succs, and UI_SJLJ.
Referenced by gimple_expand_cfg().
void for_each_eh_label | ( | void(*)(rtx) | callback | ) |
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 | ( | ) |
Determine if the function needs an EH personality function.
References eh_personality_any, eh_personality_lang, eh_personality_none, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, and eh_region_d::type.
Referenced by cgraph_add_new_function(), execute_cleanup_eh(), get_personality_function(), lower_eh_constructs(), and sjlj_build_landing_pads().
|
static |
References cfun, function::eh, eh_status::region_tree, and UI_SJLJ.
eh_landing_pad gen_eh_landing_pad | ( | ) |
References cfun, function::eh, eh_landing_pad_d::index, eh_region_d::landing_pads, eh_status::lp_array, eh_landing_pad_d::next_lp, eh_landing_pad_d::region, vec_safe_length(), and vec_safe_push().
Referenced by duplicate_eh_regions_1(), emit_post_landing_pad(), fix_up_crossing_landing_pad(), record_stmt_eh_region(), and redirect_eh_edge_1().
|
static |
Routines to generate the exception tree somewhat directly. These are used from tree-eh.c when processing exception related nodes during tree optimization.
References cfun, function::eh, lang_hooks::eh_use_cxa_end_cleanup, eh_region_d::index, eh_region_d::inner, eh_region_d::next_peer, eh_region_d::outer, eh_status::region_array, eh_status::region_tree, targetm, eh_region_d::type, type(), eh_region_d::use_cxa_end_cleanup, vec_safe_length(), and vec_safe_push().
Referenced by duplicate_eh_regions_1(), gen_eh_region_allowed(), gen_eh_region_cleanup(), gen_eh_region_must_not_throw(), and gen_eh_region_try().
eh_region gen_eh_region_allowed | ( | ) |
eh_catch gen_eh_region_catch | ( | ) |
References add_type_for_runtime(), eh_region_d::eh_region_u::eh_try, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_try::first_catch, eh_region_d::eh_region_u::eh_region_u_try::last_catch, eh_catch_d::next_catch, eh_catch_d::prev_catch, eh_region_d::type, eh_catch_d::type_list, and eh_region_d::u.
Referenced by duplicate_eh_regions_1(), and lower_catch().
eh_region gen_eh_region_cleanup | ( | ) |
References ERT_CLEANUP, and gen_eh_region().
Referenced by lower_cleanup(), and lower_try_finally().
eh_region gen_eh_region_must_not_throw | ( | ) |
References ERT_MUST_NOT_THROW, and gen_eh_region().
Referenced by lower_eh_must_not_throw().
eh_region gen_eh_region_try | ( | ) |
References ERT_TRY, and gen_eh_region().
Referenced by lower_catch().
eh_landing_pad get_eh_landing_pad_from_number | ( | ) |
References cfun, and get_eh_landing_pad_from_number_fn().
Referenced by gimple_merge_blocks(), lower_resx(), make_eh_edges(), redirect_eh_edge_1(), verify_eh_edges(), and verify_gimple_label().
eh_landing_pad get_eh_landing_pad_from_number_fn | ( | ) |
Referenced by get_eh_landing_pad_from_number().
eh_landing_pad get_eh_landing_pad_from_rtx | ( | ) |
Return the landing pad to which INSN may go, or NULL if it does not have a reachable landing pad within this function.
References get_eh_region_and_lp_from_rtx().
Referenced by can_throw_internal(), create_trace_edges(), finish_eh_generation(), and rtl_make_eh_edge().
|
static |
Extract all EH information from INSN. Return true if the insn was marked NOTHROW.
References cfun, function::eh, find_reg_note(), insn_could_throw_p(), eh_status::lp_array, eh_landing_pad_d::region, and eh_status::region_array.
Referenced by can_throw_external(), convert_to_eh_region_ranges(), get_eh_landing_pad_from_rtx(), get_eh_region_from_rtx(), insn_nothrow_p(), and sjlj_mark_call_sites().
eh_region get_eh_region_from_lp_number | ( | ) |
References cfun, and get_eh_region_from_lp_number_fn().
Referenced by cleanup_empty_eh(), cleanup_empty_eh_unsplit(), duplicate_eh_regions(), lower_resx(), mark_reachable_handlers(), and unsplit_eh().
eh_region get_eh_region_from_lp_number_fn | ( | ) |
References eh_landing_pad_d::region.
Referenced by find_outermost_region_in_block(), and get_eh_region_from_lp_number().
eh_region get_eh_region_from_number | ( | ) |
References cfun, and get_eh_region_from_number_fn().
Referenced by lower_eh_dispatch(), lower_resx(), make_eh_dispatch_edges(), move_stmt_eh_region_nr(), redirect_eh_dispatch_edge(), and verify_eh_dispatch_edge().
eh_region get_eh_region_from_number_fn | ( | ) |
Referenced by get_eh_region_from_number(), and remap_eh_region_nr().
eh_region get_eh_region_from_rtx | ( | ) |
Return the region to which INSN may go, or NULL if it does not have a reachable region within this function.
References get_eh_region_and_lp_from_rtx().
htab_t get_eh_throw_stmt_table | ( | ) |
Referenced by add_stmt_to_eh_lp_fn(), remove_stmt_from_eh_lp_fn(), and verify_gimple_in_cfg().
void init_eh | ( | void | ) |
In except.c. Initialize exception handling. This is used by the Ada and LTO front ends to initialize EH "on demand". See lto-streamer-in.c and ada/gcc-interface/misc.c.
References build_array_type(), build_index_type(), build_pointer_type(), get_identifier(), layout_type(), lang_hooks_for_types::make_type, sjlj_fc_call_site_ofs, sjlj_fc_data_ofs, sjlj_fc_jbuf_ofs, sjlj_fc_lsda_ofs, sjlj_fc_personality_ofs, sjlj_fc_type_node, t2r_eq(), t2r_hash(), targetm, tree_low_cst(), lang_hooks_for_types::type_for_mode, type_to_runtime_map, lang_hooks::types, and UI_SJLJ.
Referenced by lang_dependent_init(), and lto_init_eh().
void init_eh_for_function | ( | void | ) |
References cfun, function::eh, eh_status::lp_array, eh_status::region_array, and vec_safe_push().
Referenced by allocate_struct_function(), initialize_cfun(), and move_sese_region_to_fn().
bool insn_could_throw_p | ( | ) |
Return true if INSN could throw, assuming no REG_EH_REGION note to the contrary.
References function::can_throw_non_call_exceptions, cfun, and may_trap_p().
Referenced by copy_reg_eh_region_note_backward(), copy_reg_eh_region_note_forward(), expand_gimple_stmt(), fixup_eh_region_note(), and get_eh_region_and_lp_from_rtx().
bool insn_nothrow_p | ( | ) |
Return true if INSN cannot throw at all.
References get_eh_region_and_lp_from_rtx().
Referenced by can_combine_p(), count_reg_usage(), deletable_insn_p(), force_move_args_size_note(), insn_live_p(), scan_insn(), and try_combine().
tree lookup_type_for_runtime | ( | ) |
References type(), and type_to_runtime_map.
Referenced by get_eh_types_for_runtime(), output_ttype(), and record_type_list().
rtl_opt_pass* make_pass_convert_to_eh_region_ranges | ( | ) |
rtl_opt_pass* make_pass_set_nothrow_function_flags | ( | ) |
void make_reg_eh_region_note | ( | ) |
Create the REG_EH_REGION note for INSN, given its ECF_FLAGS for a call insn. At the gimple level, we use LP_NR > 0 : The statement transfers to landing pad LP_NR = 0 : The statement is outside any EH region < 0 : The statement is within MUST_NOT_THROW region -LP_NR. At the rtl level, we use LP_NR > 0 : The insn transfers to landing pad LP_NR = 0 : The insn cannot throw < 0 : The insn is within MUST_NOT_THROW region -LP_NR = INT_MIN : The insn cannot throw or execute a nonlocal-goto. missing note: The insn is outside any EH region. ??? This difference probably ought to be avoided. We could stand to record nothrow for arbitrary gimple statements, and so avoid some moderately complex lookups in stmt_could_throw_p. Perhaps NOTHROW should be mapped on both sides to INT_MIN. Perhaps the no-nonlocal-goto property should be recorded elsewhere as a bit on the call_insn directly. Perhaps we should make more use of attaching the trees to call_insns (reachable via symbol_ref in direct call cases) and just pull the data out of the trees.
References add_reg_note().
Referenced by emit_call_1(), and expand_gimple_stmt().
void make_reg_eh_region_note_nothrow_nononlocal | ( | ) |
Create a REG_EH_REGION note for a CALL_INSN that cannot throw nor perform a non-local goto. Replace the region note if it already exists.
References add_reg_note(), and find_reg_note().
Referenced by emit_libcall_block_1(), and emit_library_call_value_1().
void output_function_exception_table | ( | ) |
|
static |
References eh_status::eh_status_u::arm_eabi, asm_out_file, assemble_align(), cfun, dw2_asm_output_data(), dw2_asm_output_data_uleb128(), dw2_asm_output_delta_uleb128(), dw2_output_call_site_table(), dw2_size_of_call_site_table(), function::eh, eh_data_format_name(), eh_status::ehspec_data, eh_status::eh_status_u::other, output_ttype(), size_of_encoded_value(), size_of_uleb128(), sjlj_output_call_site_table(), sjlj_size_of_call_site_table(), targetm, eh_status::ttype_data, type(), uc, UI_SJLJ, vec_safe_iterate(), and vec_safe_length().
Referenced by output_function_exception_table().
|
static |
Output a reference from an exception table to the type_info object TYPE. TT_FORMAT and TT_FORMAT_SIZE describe the DWARF encoding method used for the value.
References assemble_integer(), dw2_asm_output_encoded_addr_rtx(), expand_expr(), EXPAND_INITIALIZER, lookup_type_for_runtime(), and targetm.
Referenced by output_one_function_exception_table().
Referenced by add_action_record().
|
static |
References vec_safe_push().
Referenced by add_ehspec_entry().
|
static |
References vec_safe_push().
void remove_eh_handler | ( | ) |
Splice a single EH region REGION from the region tree. To unlink REGION, we need to find the pointer to it with a relatively expensive search in REGION's outer region. If you are going to remove a number of handlers, using remove_unreachable_eh_regions may be a better option.
References cfun, function::eh, eh_region_d::inner, eh_region_d::next_peer, eh_region_d::outer, eh_status::region_tree, and remove_eh_handler_splicer().
|
static |
Splice the EH region at PP from the region tree.
References cfun, function::eh, eh_landing_pad_d::index, eh_region_d::index, eh_region_d::inner, eh_region_d::landing_pads, eh_status::lp_array, eh_landing_pad_d::next_lp, eh_region_d::next_peer, eh_region_d::outer, eh_landing_pad_d::post_landing_pad, and eh_status::region_array.
Referenced by remove_eh_handler(), and remove_unreachable_eh_regions_worker().
void remove_eh_landing_pad | ( | ) |
This section handles removing dead code for flow.
References cfun, function::eh, eh_landing_pad_d::index, eh_region_d::landing_pads, eh_status::lp_array, eh_landing_pad_d::next_lp, eh_landing_pad_d::post_landing_pad, and eh_landing_pad_d::region.
Referenced by cleanup_empty_eh(), lower_resx(), redirect_eh_edge_1(), and remove_unreachable_handlers().
void remove_unreachable_eh_regions | ( | ) |
Splice all EH regions *not* marked in R_REACHABLE from the region tree. Do this by traversing the EH tree top-down and splice out regions that are not marked. By removing regions from the leaves, we avoid costly searches in the region tree.
References cfun, function::eh, eh_status::region_tree, and remove_unreachable_eh_regions_worker().
Referenced by remove_unreachable_handlers(), and remove_unreachable_handlers_no_lp().
|
static |
Worker for remove_unreachable_eh_regions. PP is a pointer to the region to start a region tree depth-first search from. R_REACHABLE is the set of regions that have to be preserved.
References bitmap_bit_p(), eh_region_d::index, eh_region_d::inner, eh_region_d::next_peer, and remove_eh_handler_splicer().
Referenced by remove_unreachable_eh_regions().
void set_eh_throw_stmt_table | ( | ) |
References table.
Referenced by add_stmt_to_eh_lp_fn(), and gimple_expand_cfg().
|
static |
Set TREE_NOTHROW and crtl->all_throwers_are_sibcalls.
References AVAIL_AVAILABLE, cgraph_node::callers, cgraph_edge::can_throw_external, can_throw_external(), cgraph_function_body_availability(), cgraph_get_node(), cgraph_set_nothrow_flag(), current_function_decl, current_function_name(), dump_file, get_insns(), and cgraph_edge::next_caller.
|
static |
Process all active landing pads. Assign each one a compact dispatch index, and a call-site index.
References add_call_site(), call_site_base, cfun, collect_one_action_chain(), hash_table< Descriptor, Allocator >::create(), hash_table< Descriptor, Allocator >::dispose(), function::eh, eh_status::lp_array, eh_landing_pad_d::post_landing_pad, eh_landing_pad_d::region, vec_alloc(), and vec_safe_iterate().
Referenced by sjlj_build_landing_pads().
|
static |
References assign_stack_local(), cfun, function::eh, eh_personality_none, function_needs_eh_personality(), gen_label_rtx(), int_size_in_bytes(), eh_status::lp_array, sjlj_assign_call_site_values(), sjlj_emit_dispatch_table(), sjlj_emit_function_enter(), sjlj_emit_function_exit(), sjlj_fc_type_node, sjlj_mark_call_sites(), and vec_safe_length().
Referenced by finish_eh_generation().
|
static |
References add_bb_to_loop(), build_case_label(), build_int_cst(), cfun, convert_to_mode(), edge_def::count, basic_block_def::count, create_artificial_label(), function::eh, emit_label(), emit_move_insn(), emit_to_new_bb_before(), end_sequence(), eh_region_d::exc_ptr_reg, expand_builtin_setjmp_receiver(), expand_sjlj_dispatch_table(), eh_region_d::filter_reg, force_reg(), gen_label_rtx(), get_insns(), loop::header, label_rtx(), eh_landing_pad_d::landing_pad, loop::latch, basic_block_def::loop_father, loop_outer(), eh_status::lp_array, make_edge(), basic_block_def::next_bb, eh_landing_pad_d::post_landing_pad, edge_def::probability, ptr_mode, eh_landing_pad_d::region, sjlj_fc_call_site_ofs, sjlj_fc_data_ofs, start_sequence(), targetm, vec_safe_iterate(), and vNULL.
Referenced by sjlj_build_landing_pads().
|
static |
Construct the SjLj_Function_Context.
References assemble_external_libcall(), current_function_decl, emit_cmp_and_jump_insns(), emit_insn_after(), emit_library_call(), emit_library_call_value(), emit_move_insn(), end_sequence(), expand_builtin_setjmp_setup(), get_insns(), get_personality_function(), insert_insn_on_edge(), LCT_NORMAL, LCT_RETURNS_TWICE, plus_constant(), single_succ_edge(), sjlj_fc_jbuf_ofs, sjlj_fc_lsda_ofs, sjlj_fc_personality_ofs, and start_sequence().
Referenced by sjlj_build_landing_pads().
|
static |
References emit_insn_after(), emit_library_call(), end_sequence(), get_insns(), LCT_NORMAL, and start_sequence().
Referenced by sjlj_build_landing_pads().
void sjlj_emit_function_exit_after | ( | ) |
Call back from expand_function_end to know where we should put the call to unwind_sjlj_unregister_libfunc if needed.
Referenced by expand_function_end().
|
static |
Emit code to record the current call-site index before every insn that can throw.
References emit_insn_before(), emit_move_insn(), end_sequence(), ERT_MUST_NOT_THROW, find_first_parameter_load(), get_eh_region_and_lp_from_rtx(), get_insns(), eh_landing_pad_d::index, sjlj_fc_call_site_ofs, start_sequence(), and eh_region_d::type.
Referenced by sjlj_build_landing_pads().
|
static |
References call_site_record_d::action, call_site_base, dw2_asm_output_data_uleb128(), call_site_record_d::landing_pad, and vec_safe_length().
Referenced by output_one_function_exception_table().
|
static |
References call_site_record_d::action, call_site_record_d::landing_pad, size_of_uleb128(), and vec_safe_length().
Referenced by output_one_function_exception_table().
|
static |
Switch to the section that should be used for exception tables.
References current_function_decl, data_section, exception_section, free(), get_section(), readonly_data_section, strlen(), and switch_to_section().
Referenced by output_function_exception_table().
|
static |
Referenced by init_eh().
|
static |
|
static |
Referenced by init_eh().
|
static |
DEBUG_FUNCTION void verify_eh_tree | ( | ) |
Verify invariants on EH datastructures.
References dump_eh_tree(), error(), eh_landing_pad_d::index, eh_region_d::index, eh_region_d::inner, internal_error(), eh_region_d::landing_pads, eh_landing_pad_d::next_lp, eh_region_d::next_peer, eh_region_d::outer, eh_landing_pad_d::region, and vec_safe_iterate().
Referenced by duplicate_eh_regions(), and remove_unreachable_handlers().
|
static |
|
static |
Referenced by init_eh(), sjlj_emit_dispatch_table(), and sjlj_mark_call_sites().
|
static |
Referenced by init_eh(), and sjlj_emit_dispatch_table().
|
static |
Referenced by init_eh(), and sjlj_emit_function_enter().
|
static |
Referenced by init_eh(), and sjlj_emit_function_enter().
|
static |
Referenced by init_eh(), and sjlj_emit_function_enter().
|
static |
Describe the SjLj_Function_Context structure.
Referenced by init_eh(), and sjlj_build_landing_pads().
|
static |
|
static |
Referenced by add_type_for_runtime(), init_eh(), and lookup_type_for_runtime().