GCC Middle and Back End API Reference
|
#include <tree-vectorizer.h>
Public Types | |
enum | vec_kind { bb , loop } |
typedef hash_set< int_hash< machine_mode, E_VOIDmode, E_BLKmode > > | mode_set |
Public Member Functions | |
_loop_vec_info (class loop *, vec_info_shared *) | |
~_loop_vec_info () | |
stmt_vec_info | add_stmt (gimple *) |
stmt_vec_info | add_pattern_stmt (gimple *, stmt_vec_info) |
stmt_vec_info | resync_stmt_addr (gimple *) |
stmt_vec_info | lookup_stmt (gimple *) |
stmt_vec_info | lookup_def (tree) |
stmt_vec_info | lookup_single_use (tree) |
class dr_vec_info * | lookup_dr (data_reference *) |
void | move_dr (stmt_vec_info, stmt_vec_info) |
void | remove_stmt (stmt_vec_info) |
void | replace_stmt (gimple_stmt_iterator *, stmt_vec_info, gimple *) |
void | insert_on_entry (stmt_vec_info, gimple *) |
void | insert_seq_on_entry (stmt_vec_info, gimple_seq) |
Private Member Functions | |
stmt_vec_info | new_stmt_vec_info (gimple *stmt) |
void | set_vinfo_for_stmt (gimple *, stmt_vec_info, bool=true) |
void | free_stmt_vec_infos () |
void | free_stmt_vec_info (stmt_vec_info) |
Info on vectorized loops.
|
inherited |
|
inherited |
_loop_vec_info::_loop_vec_info | ( | class loop * | loop_in, |
vec_info_shared * | shared ) |
Create and initialize a new loop_vec_info struct for LOOP_IN, as well as stmt_vec_info structs for all the stmts in LOOP_IN.
References vec_info::add_stmt(), vec_info::bb, bb_in_loop_p(), vec_info::bbs, dfs_enumerate_from(), gcc_assert, gimple_call_arg(), gimple_call_internal_fn(), gimple_call_internal_p(), gimple_call_num_args(), gimple_set_uid(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), loop::header, i, integer_nonzerop(), integer_zerop(), is_gimple_call(), is_gimple_debug(), vec_info::nbbs, loop::num_nodes, si, simd_if_cond, loop::simduid, SSA_NAME_VAR, and TREE_CODE.
_loop_vec_info::~_loop_vec_info | ( | ) |
Free all memory used by the _loop_vec_info, as well as all the stmt_vec_info structs of all the stmts in the loop.
References loop::aux, vec_info::bbs, free(), ivexpr_map, lens, masks, NULL, release_vec_loop_controls(), vec_loop_masks::rgc_vec, scalar_costs, scan_map, and vector_costs.
|
inherited |
Record that STMT belongs to the vectorizable region. Create a new stmt_vec_info and mark VECINFO as being related and return the new stmt_vec_info.
References vec_info::new_stmt_vec_info(), vec_info::set_vinfo_for_stmt(), and STMT_VINFO_RELATED_STMT.
Referenced by addsub_pattern::build(), and complex_pattern::build().
|
inherited |
Record that STMT belongs to the vectorizable region. Create and return an associated stmt_vec_info.
References vec_info::new_stmt_vec_info(), and vec_info::set_vinfo_for_stmt().
Referenced by _bb_vec_info::_bb_vec_info(), _loop_vec_info(), append_pattern_def_seq(), vect_init_pattern_stmt(), vect_recog_bool_pattern(), vect_recog_cond_store_pattern(), vect_recog_gather_scatter_pattern(), vect_recog_mask_conversion_pattern(), and vect_recog_popcount_clz_ctz_ffs_pattern().
|
privateinherited |
Free STMT_INFO.
References free(), gimple_get_lhs(), gimple_set_bb(), NULL, release_ssa_name(), STMT_VINFO_SIMD_CLONE_INFO, STMT_VINFO_VEC_STMTS, and TREE_CODE.
Referenced by vec_info::free_stmt_vec_infos(), and vec_info::remove_stmt().
|
privateinherited |
Free the contents of stmt_vec_infos.
References vec_info::free_stmt_vec_info(), NULL, and vec_info::stmt_vec_infos.
Referenced by vec_info::~vec_info().
|
inherited |
Like insert_seq_on_entry but just inserts the single stmt NEW_STMT.
References gsi_insert_before_without_update(), GSI_SAME_STMT, gsi_start(), vec_info::insert_seq_on_entry(), and NULL.
Referenced by vect_init_vector_1().
|
inherited |
Insert stmts in SEQ on the VEC_INFO region entry. If CONTEXT is not NULL it specifies whether to use the sub-region entry determined by it, currently used for loop vectorization to insert on the inner loop entry vs. the outer loop entry.
References vec_info::bbs, dyn_cast(), gcc_assert, gsi_after_labels(), gsi_insert_seq_before(), gsi_insert_seq_on_edge_immediate(), GSI_SAME_STMT, loop::inner, loop_preheader_edge(), LOOP_VINFO_LOOP, and nested_in_vect_loop_p().
Referenced by vec_info::insert_on_entry(), vect_create_constant_vectors(), and vect_slp_region().
|
inherited |
If NAME is an SSA_NAME and its definition has an associated stmt_vec_info, return that stmt_vec_info, otherwise return null. It is safe to call this on arbitrary operands.
References vec_info::lookup_stmt(), NULL, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and TREE_CODE.
Referenced by info_for_reduction(), vect_analyze_loop_operations(), vect_analyze_slp(), vect_build_slp_tree_2(), vect_cond_store_pattern_same_ref(), vect_create_constant_vectors(), vect_create_epilog_for_reduction(), vect_detect_hybrid_slp(), vect_determine_mask_precision(), vect_get_internal_def(), vect_inner_phi_in_double_reduction_p(), vect_is_extending_load(), vect_is_simple_use(), vect_mark_slp_stmts(), vect_recog_cond_store_pattern(), vect_recog_widen_sum_pattern(), vect_schedule_slp_node(), vect_slp_check_for_roots(), vect_slp_gather_vectorized_scalar_stmts(), vectorizable_recurr(), and vectorizable_reduction().
|
inherited |
Return vectorization information about DR.
References DR_STMT, gcc_checking_assert, is_pattern_stmt_p(), vec_info::lookup_stmt(), and STMT_VINFO_DR_INFO.
Referenced by vect_analyze_data_ref_accesses(), vect_analyze_data_ref_dependence(), vect_analyze_data_refs_alignment(), vect_analyze_possibly_independent_ddr(), vect_analyze_slp(), vect_enhance_data_refs_alignment(), vect_get_peeling_costs_all_drs(), vect_peeling_supportable(), vect_prune_runtime_alias_test_list(), vect_record_base_alignments(), vect_slp_analyze_data_ref_dependence(), and vect_update_inits_of_drs().
|
inherited |
See whether there is a single non-debug statement that uses LHS and whether that statement has an associated stmt_vec_info. Return the stmt_vec_info if so, otherwise return null.
References vec_info::lookup_stmt(), NULL, and single_imm_use().
|
inherited |
If STMT has an associated stmt_vec_info, return that vec_info, otherwise return null. It is safe to call this function on any statement, even if it might not be part of the vectorizable region.
References gimple_uid(), NULL, and vec_info::stmt_vec_infos.
Referenced by check_scan_store(), gather_scalar_reductions(), vec_info::lookup_def(), vec_info::lookup_dr(), vec_info::lookup_single_use(), maybe_push_to_hybrid_worklist(), maybe_set_vectorized_backedge_value(), move_early_exit_stmts(), vec_slp_has_scalar_use(), vect_analyze_data_refs(), vect_analyze_early_break_dependences(), vect_analyze_loop_2(), vect_analyze_loop_operations(), vect_analyze_scalar_cycles_1(), vect_analyze_slp(), vect_analyze_stmt(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_build_slp_instance(), vect_build_slp_tree_2(), vect_can_advance_ivs_p(), vect_compute_single_scalar_iteration_cost(), vect_create_loop_vinfo(), vect_detect_hybrid_slp(), vect_determine_min_output_precision_1(), vect_determine_precisions(), vect_determine_vectorization_factor(), vect_determine_vf_for_stmt(), vect_dissolve_slp_only_groups(), vect_init_pattern_stmt(), vect_mark_pattern_stmts(), vect_mark_stmts_to_be_vectorized(), vect_pattern_recog(), vect_pattern_recog_1(), vect_set_loop_condition(), vect_slp_analyze_load_dependences(), vect_slp_analyze_store_dependences(), vect_slp_check_for_roots(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vect_update_vf_for_slp(), vectorizable_induction(), vectorizable_live_operation(), vectorizable_reduction(), and vectorizable_scan_store().
|
inherited |
Record that NEW_STMT_INFO now implements the same data reference as OLD_STMT_INFO.
References gcc_assert, is_pattern_stmt_p(), STMT_VINFO_DR_INFO, STMT_VINFO_DR_WRT_VEC_LOOP, STMT_VINFO_GATHER_SCATTER_P, and STMT_VINFO_STRIDED_P.
Referenced by vect_recog_bool_pattern(), vect_recog_cond_store_pattern(), vect_recog_gather_scatter_pattern(), and vect_recog_mask_conversion_pattern().
|
privateinherited |
Create and initialize a new stmt_vec_info struct for STMT.
References DR_MISALIGNMENT_UNINITIALIZED, gimple_bb(), is_a(), is_loop_header_bb_p(), loop_vect, STMT_SLP_TYPE, STMT_VINFO_DEF_TYPE, STMT_VINFO_REDUC_CODE, STMT_VINFO_REDUC_FN, STMT_VINFO_REDUC_IDX, STMT_VINFO_REDUC_TYPE, STMT_VINFO_RELEVANT, STMT_VINFO_SLP_VECT_ONLY, STMT_VINFO_SLP_VECT_ONLY_PATTERN, STMT_VINFO_TYPE, STMT_VINFO_VEC_STMTS, STMT_VINFO_VECTORIZABLE, TREE_CODE_REDUCTION, undef_vec_info_type, vect_internal_def, vect_unknown_def_type, vect_unused_in_scope, and vNULL.
Referenced by vec_info::add_pattern_stmt(), and vec_info::add_stmt().
|
inherited |
Permanently remove the statement described by STMT_INFO from the function.
References vec_info::free_stmt_vec_info(), gcc_assert, gsi_for_stmt(), gsi_remove(), NULL, release_defs(), vec_info::set_vinfo_for_stmt(), si, and unlink_stmt_vdef().
Referenced by vect_remove_stores(), vect_schedule_slp(), vect_set_loop_condition(), and vect_transform_loop().
|
inherited |
Replace the statement at GSI by NEW_STMT, both the vectorization information and the function itself. STMT_INFO describes the statement at GSI.
References gcc_assert, gimple_set_uid(), gimple_uid(), gsi_replace(), and gsi_stmt().
Referenced by vect_remove_slp_scalar_calls(), vectorizable_call(), and vectorizable_simd_clone_call().
|
inherited |
If STMT was previously associated with a stmt_vec_info and STMT now resides at a different address than before (e.g., because STMT is a phi node that has been resized), update the stored address to match the new one. It is not possible to use lookup_stmt () to perform this task, because that function returns NULL if the stored stmt pointer does not match the one being looked up.
References gimple_uid(), and vec_info::stmt_vec_infos.
Referenced by vect_loop_versioning().
|
privateinherited |
Associate STMT with INFO.
References gcc_assert, gcc_checking_assert, gimple_set_uid(), gimple_uid(), NULL, vec_info::stmt_vec_info_ro, and vec_info::stmt_vec_infos.
Referenced by vec_info::add_pattern_stmt(), vec_info::add_stmt(), and vec_info::remove_stmt().
|
inherited |
Referenced by vect_transform_loops(), vectorizable_load(), and vectorizable_simd_clone_call().
|
inherited |
Referenced by vect_compute_data_ref_alignment(), and vect_record_base_alignment().
|
inherited |
Referenced by _bb_vec_info::_bb_vec_info(), _loop_vec_info(), vec_info::insert_seq_on_entry(), vect_determine_precisions(), vect_get_and_check_slp_defs(), vect_pattern_recog(), vect_schedule_slp_node(), vect_slp_check_for_roots(), vect_slp_region(), _bb_vec_info::~_bb_vec_info(), and ~_loop_vec_info().
bool _loop_vec_info::can_use_partial_vectors_p |
auto_vec<vec_object_pair> _loop_vec_info::check_unequal_addrs |
auto_vec<dr_with_seg_len_pair_t> _loop_vec_info::comp_alias_ddrs |
tree _loop_vec_info::drs_advanced_by |
basic_block _loop_vec_info::early_break_dest_bb |
auto_vec<stmt_vec_info> _loop_vec_info::early_break_live_ivs |
bool _loop_vec_info::early_breaks |
bool _loop_vec_info::epil_using_partial_vectors_p |
_loop_vec_info* _loop_vec_info::epilogue_vinfo |
Referenced by vect_analyze_loop(), and vect_do_peeling().
|
inherited |
Referenced by vect_analyze_slp(), vect_fixup_store_groups_with_patterns(), and vect_slp_analyze_bb_1().
bool _loop_vec_info::has_mask_store |
unsigned int _loop_vec_info::inner_loop_cost_factor |
|
inherited |
Referenced by append_inv_pattern_def_seq(), and vect_slp_region().
hash_map<tree_operand_hash, tree>* _loop_vec_info::ivexpr_map |
Referenced by cse_and_gimplify_to_preheader(), and ~_loop_vec_info().
|
inherited |
vec_loop_lens _loop_vec_info::lens |
Referenced by ~_loop_vec_info().
class loop* _loop_vec_info::loop |
gcond* _loop_vec_info::loop_iv_cond |
auto_vec<vec_lower_bound> _loop_vec_info::lower_bounds |
edge _loop_vec_info::main_loop_edge |
_loop_vec_info* _loop_vec_info::main_loop_info |
tree _loop_vec_info::mask_skip_niters |
vec_loop_masks _loop_vec_info::masks |
Referenced by ~_loop_vec_info().
unsigned HOST_WIDE_INT _loop_vec_info::max_vectorization_factor |
auto_vec<stmt_vec_info> _loop_vec_info::may_misalign_stmts |
bool _loop_vec_info::must_use_partial_vectors_p |
|
inherited |
bool _loop_vec_info::no_data_dependencies |
tree _loop_vec_info::num_iters |
tree _loop_vec_info::num_iters_assumptions |
tree _loop_vec_info::num_iters_unchanged |
tree _loop_vec_info::num_itersm1 |
_loop_vec_info* _loop_vec_info::orig_loop_info |
signed char _loop_vec_info::partial_load_store_bias |
vect_partial_vector_style _loop_vec_info::partial_vector_style |
int _loop_vec_info::peeling_for_alignment |
Referenced by vect_transform_loop().
bool _loop_vec_info::peeling_for_gaps |
Referenced by vect_transform_loop().
bool _loop_vec_info::peeling_for_niter |
int _loop_vec_info::ptr_mask |
auto_vec<stmt_vec_info> _loop_vec_info::reduction_chains |
Referenced by vect_analyze_slp().
auto_vec<stmt_vec_info> _loop_vec_info::reductions |
Referenced by vect_analyze_slp(), and vect_fixup_scalar_cycles_with_patterns().
hash_map<tree, vect_reusable_accumulator> _loop_vec_info::reusable_accumulators |
Referenced by vect_create_epilog_for_reduction(), and vect_find_reusable_accumulator().
tree _loop_vec_info::rgroup_compare_type |
tree _loop_vec_info::rgroup_iv_type |
scalar_cond_masked_set_type _loop_vec_info::scalar_cond_masked_set |
Referenced by vect_record_loop_mask(), vectorizable_condition(), and vectorizable_operation().
auto_vec<stmt_info_for_cost> _loop_vec_info::scalar_cost_vec |
class vector_costs* _loop_vec_info::scalar_costs |
class loop* _loop_vec_info::scalar_loop |
edge _loop_vec_info::scalar_loop_iv_exit |
profile_probability _loop_vec_info::scalar_loop_scaling |
Referenced by check_scan_store(), vect_analyze_loop_2(), vectorizable_scan_store(), and ~_loop_vec_info().
|
inherited |
tree _loop_vec_info::simd_if_cond |
Referenced by _loop_vec_info().
edge _loop_vec_info::skip_main_loop_edge |
edge _loop_vec_info::skip_this_loop_edge |
Referenced by vect_create_epilog_for_reduction(), vect_do_peeling(), and vect_transform_cycle_phi().
|
inherited |
Referenced by vect_optimize_slp_pass::build_vertices(), get_vectype_for_scalar_type(), vect_optimize_slp_pass::start_choosing_layouts(), vect_bb_partition_graph(), vect_bb_slp_mark_live_stmts(), vect_build_slp_instance(), vect_gather_slp_loads(), vect_get_vector_types_for_stmt(), vect_lower_load_permutations(), vect_optimize_slp(), vect_slp_analyze_operations(), vect_transform_loop(), and vec_info::~vec_info().
poly_uint64 _loop_vec_info::slp_unrolling_factor |
|
inherited |
Referenced by vec_info::set_vinfo_for_stmt(), and vect_pattern_recog().
|
inherited |
unsigned int _loop_vec_info::suggested_unroll_factor |
unsigned int _loop_vec_info::th |
class dr_vec_info* _loop_vec_info::unaligned_dr |
|
inherited |
Referenced by get_vectype_for_scalar_type(), and vect_chooses_same_modes_p().
bool _loop_vec_info::using_decrementing_iv_p |
bool _loop_vec_info::using_partial_vectors_p |
bool _loop_vec_info::using_select_vl_p |
vec_cond_masked_set_type _loop_vec_info::vec_cond_masked_set |
Referenced by prepare_vec_mask(), vectorizable_operation(), and vectorizable_simd_clone_call().
edge _loop_vec_info::vec_epilogue_loop_iv_exit |
edge _loop_vec_info::vec_loop_iv_exit |
class vector_costs* _loop_vec_info::vector_costs |
|
inherited |
bool _loop_vec_info::vectorizable |
poly_uint64 _loop_vec_info::vectorization_factor |
Referenced by vect_transform_loops().
poly_uint64 _loop_vec_info::versioning_threshold |