GCC Middle and Back End API Reference
|
Data Structures | |
struct | dfa_stats_d |
struct | numbered_tree_d |
Typedefs | |
typedef struct numbered_tree_d | numbered_tree |
Functions | |
static void | collect_dfa_stats (struct dfa_stats_d *) |
void | renumber_gimple_stmt_uids () |
void | renumber_gimple_stmt_uids_in_blocks () |
void | dump_variable () |
DEBUG_FUNCTION void | debug_variable () |
void | dump_dfa_stats () |
DEBUG_FUNCTION void | debug_dfa_stats () |
static void | collect_dfa_stats () |
tree | ssa_default_def () |
void | set_ssa_default_def () |
tree | get_or_create_ssa_default_def () |
tree | get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, HOST_WIDE_INT *psize, HOST_WIDE_INT *pmax_size) |
tree | get_addr_base_and_unit_offset () |
bool | stmt_references_abnormal_ssa_name () |
static int | compare_decls_by_uid () |
static tree | dump_enumerated_decls_push () |
void | dump_enumerated_decls () |
typedef struct numbered_tree_d numbered_tree |
|
static |
Local functions.
Referenced by dump_dfa_stats().
|
static |
Collect DFA statistics and store them in the structure pointed to by DFA_STATS_P.
References gimple_phi_num_args(), gimple_vdef(), gimple_vuse(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), memset(), and si.
|
static |
Compare two declarations references by their DECL_UID / sequence number. Called via qsort.
References numbered_tree_d::num, and numbered_tree_d::t.
Referenced by dump_enumerated_decls().
DEBUG_FUNCTION void debug_dfa_stats | ( | void | ) |
Dump DFA statistics on stderr.
References dump_dfa_stats().
DEBUG_FUNCTION void debug_variable | ( | ) |
Dump variable VAR and its may-aliases to stderr.
References dump_variable().
void dump_dfa_stats | ( | ) |
Dump various DFA statistics to FILE.
References collect_dfa_stats(), current_function_decl, lang_hooks::decl_printable_name, dfa_stats_d::max_num_phi_args, dfa_stats_d::num_defs, dfa_stats_d::num_phi_args, dfa_stats_d::num_phis, dfa_stats_d::num_uses, dfa_stats_d::num_vdefs, and dfa_stats_d::num_vuses.
Referenced by debug_dfa_stats(), and rewrite_blocks().
void dump_enumerated_decls | ( | ) |
Find all the declarations used by the current function, sort them by uid, and emit the sorted list. Each declaration is tagged with a sequence number indicating when it was found during statement / tree walking, so that TDF_NOUID comparisons of anonymous declarations are still meaningful. Where a declaration was encountered more than once, we emit only the sequence number of the first encounter. FILE is the dump file where to output the list and FLAGS is as in print_generic_expr.
References compare_decls_by_uid(), current_function_name(), dump_enumerated_decls_push(), walk_stmt_info::gsi, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), walk_stmt_info::info, is_gimple_debug(), last, memset(), numbered_tree_d::num, print_generic_decl(), numbered_tree_d::t, and walk_gimple_stmt().
Referenced by dump_function_to_file(), and execute_cleanup_cfg_post_optimizing().
|
static |
Called via walk_gimple_stmt / walk_gimple_op by dump_enumerated_decls.
References walk_stmt_info::info, and numbered_tree_d::t.
Referenced by dump_enumerated_decls().
void dump_variable | ( | ) |
Dump variable VAR and its may-aliases to FILE.
References cfun, dump_flags, dump_points_to_info_for(), is_global_var(), print_generic_expr(), and ssa_default_def().
Referenced by debug_variable(), and dump_alias_info().
tree get_addr_base_and_unit_offset | ( | ) |
Returns the base object and a constant BITS_PER_UNIT offset in *POFFSET that denotes the starting address of the memory access EXP. Returns NULL_TREE if the offset is not constant or any component is not BITS_PER_UNIT-aligned.
References get_addr_base_and_unit_offset_1().
Referenced by addr_stridxptr(), build_debug_ref_for_model(), build_ref_for_offset(), build_simple_mem_ref_loc(), constant_pointer_difference(), create_component_ref_by_pieces_1(), fold_binary_loc(), forward_propagate_addr_expr_1(), get_addr_stridx(), ipa_modify_call_arguments(), jump_function_from_stmt(), maybe_fold_tmr(), set_ssa_val_to(), stmt_kills_ref_p_1(), vn_reference_fold_indirect(), vn_reference_lookup_3(), and vn_reference_maybe_forwprop_address().
tree get_or_create_ssa_default_def | ( | ) |
Retrieve or create a default definition for VAR.
References gimple_build_nop(), make_ssa_name_fn(), set_ssa_default_def(), and ssa_default_def().
Referenced by get_reaching_def(), get_repl_default_def_ssa_name(), replace_ref_with(), rewrite_stmt(), and split_function().
tree get_ref_base_and_extent | ( | tree | exp, |
HOST_WIDE_INT * | poffset, | ||
HOST_WIDE_INT * | psize, | ||
HOST_WIDE_INT * | pmax_size | ||
) |
If EXP is a handled component reference for a structure, return the base variable. The access range is delimited by bit positions *POFFSET and *POFFSET + *PMAX_SIZE. The access size is *PSIZE bits. If either *PSIZE or *PMAX_SIZE is -1, they could not be determined. If *PSIZE and *PMAX_SIZE are equal, the access is non-variable.
References array_ref_element_size(), array_ref_low_bound(), component_ref_field_offset(), exact_log2(), exp(), double_int::fits_shwi(), double_int::from_uhwi(), host_integerp(), HOST_WIDE_INT, integer_zerop(), double_int::lshift(), mem_ref_offset(), double_int::to_shwi(), and tree_to_double_int().
Referenced by add_var_loc_to_decl(), aliasing_component_refs_p(), ao_ref_base(), ao_ref_init_from_ptr_and_size(), compute_complex_assign_jump_func(), compute_known_type_jump_func(), create_access(), determine_known_aggregate_parts(), do_structure_copy(), expand_debug_expr(), extr_type_from_vtbl_ptr_store(), fold_builtin_memory_op(), fold_const_aggregate_ref_1(), get_access_for_expr(), get_ancestor_addr_info(), get_base_constructor(), get_constraint_for_component_ref(), gimple_extract_devirt_binfo_from_cst(), ipa_load_from_parm_agg_1(), mark_aliased_reaching_defs_necessary_1(), sra_ipa_modify_expr(), stmt_kills_ref_p_1(), track_expr_p(), and vn_reference_lookup_3().
void renumber_gimple_stmt_uids | ( | void | ) |
Renumber all of the gimple stmt uids.
References cfun, gimple_set_uid(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), inc_gimple_stmt_max_uid(), and set_gimple_stmt_max_uid().
Referenced by do_reassoc(), init_scc_vn(), ipa_write_optimization_summaries(), ipa_write_summaries(), and tree_ssa_dse().
void renumber_gimple_stmt_uids_in_blocks | ( | ) |
Like renumber_gimple_stmt_uids, but only do work on the basic blocks in BLOCKS, of which there are N_BLOCKS. Also renumbers PHIs.
References cfun, gimple_set_uid(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), inc_gimple_stmt_max_uid(), and set_gimple_stmt_max_uid().
Referenced by cond_if_else_store_replacement(), and tree_ssa_iv_optimize_loop().
void set_ssa_default_def | ( | ) |
Insert the pair VAR's UID, DEF into the default_defs hashtable of function FN.
References tree_decl_minimal::uid, and tree_ssa_name::var.
Referenced by expand_call_inline(), expand_omp_taskreg(), get_component_ssa_name(), get_or_create_ssa_default_def(), input_ssa_names(), remap_ssa_name(), remove_unused_locals(), replace_ssa_name(), setup_one_parameter(), tree_function_versioning(), and tree_optimize_tail_calls_1().
tree ssa_default_def | ( | ) |
Lookup VAR UID in the default_defs hashtable and return the associated variable.
References tree_decl_minimal::uid, and tree_ssa_name::var.
Referenced by arg_needs_copy_p(), consider_split(), copy_rename_partition_coalesce(), declare_return_variable(), dump_variable(), execute_cse_reciprocals(), expand_call_inline(), expand_omp_taskreg(), get_or_create_ssa_default_def(), init_parameter_lattice_values(), initialize_inlined_parameters(), ipa_analyze_params_uses(), is_unused_scalar_param(), ptr_parm_has_direct_uses(), remove_unused_locals(), run_scc_vn(), setup_one_parameter(), split_function(), sra_ipa_reset_debug_stmts(), tree_function_versioning(), tree_optimize_tail_calls_1(), update_parameter_components(), and verify_live_on_entry().
bool stmt_references_abnormal_ssa_name | ( | ) |
Returns true if STMT references an SSA_NAME that has SSA_NAME_OCCURS_IN_ABNORMAL_PHI set, otherwise false.
Referenced by can_propagate_from(), and ssa_forward_propagate_and_combine().