GCC Middle and Back End API Reference
vec_info Class Reference

#include <tree-vectorizer.h>

Inheritance diagram for vec_info:
Collaboration diagram for vec_info:

Public Types

enum  vec_kind { bb , loop }
 
typedef hash_set< int_hash< machine_mode, E_VOIDmode, E_BLKmode > > mode_set
 

Public Member Functions

 vec_info (vec_kind, vec_info_shared *)
 
 ~vec_info ()
 
stmt_vec_info add_stmt (gimple *)
 
stmt_vec_info add_pattern_stmt (gimple *, stmt_vec_info)
 
stmt_vec_info lookup_stmt (gimple *)
 
stmt_vec_info lookup_def (tree)
 
stmt_vec_info lookup_single_use (tree)
 
class dr_vec_infolookup_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)
 

Data Fields

vec_kind kind
 
vec_info_sharedshared
 
vec< stmt_vec_infostmt_vec_infos
 
bool stmt_vec_info_ro
 
bool any_known_not_updated_vssa
 
auto_vec< slp_instanceslp_instances
 
vec_base_alignments base_alignments
 
auto_vec< stmt_vec_infogrouped_stores
 
mode_set used_vector_modes
 
machine_mode vector_mode
 
basic_blockbbs
 
unsigned int nbbs
 
gimple_seq inv_pattern_def_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)
 

Detailed Description

Vectorizer state common between loop and basic-block vectorization.   

Member Typedef Documentation

◆ mode_set

hash_set<int_hash<machine_mode, E_VOIDmode, E_BLKmode> > vec_info::mode_set

Member Enumeration Documentation

◆ vec_kind

Enumerator
bb 
loop 

Constructor & Destructor Documentation

◆ vec_info()

vec_info::vec_info ( vec_info::vec_kind kind_in,
vec_info_shared * shared_ )
Initialize the vec_info with kind KIND_IN and target cost data
TARGET_COST_DATA_IN.   

References stmt_vec_infos.

◆ ~vec_info()

vec_info::~vec_info ( )

Member Function Documentation

◆ add_pattern_stmt()

stmt_vec_info vec_info::add_pattern_stmt ( gimple * stmt,
stmt_vec_info stmt_info )
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 new_stmt_vec_info(), set_vinfo_for_stmt(), and STMT_VINFO_RELATED_STMT.

Referenced by addsub_pattern::build(), and complex_pattern::build().

◆ add_stmt()

◆ free_stmt_vec_info()

void vec_info::free_stmt_vec_info ( stmt_vec_info stmt_info)
private

◆ free_stmt_vec_infos()

void vec_info::free_stmt_vec_infos ( void )
private
Free the contents of stmt_vec_infos.   

References free_stmt_vec_info(), NULL, and stmt_vec_infos.

Referenced by ~vec_info().

◆ insert_on_entry()

void vec_info::insert_on_entry ( stmt_vec_info context,
gimple * new_stmt )
Like insert_seq_on_entry but just inserts the single stmt NEW_STMT.   

References gsi_insert_before_without_update(), GSI_SAME_STMT, gsi_start(), insert_seq_on_entry(), and NULL.

Referenced by vect_init_vector_1().

◆ insert_seq_on_entry()

void vec_info::insert_seq_on_entry ( stmt_vec_info context,
gimple_seq seq )
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 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 insert_on_entry(), vect_create_constant_vectors(), and vect_slp_region().

◆ lookup_def()

◆ lookup_dr()

◆ lookup_single_use()

stmt_vec_info vec_info::lookup_single_use ( tree lhs)
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 lookup_stmt(), NULL, and single_imm_use().

◆ lookup_stmt()

stmt_vec_info vec_info::lookup_stmt ( gimple * stmt)
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 stmt_vec_infos.

Referenced by check_scan_store(), gather_scalar_reductions(), lookup_def(), lookup_dr(), 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_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().

◆ move_dr()

void vec_info::move_dr ( stmt_vec_info new_stmt_info,
stmt_vec_info old_stmt_info )

◆ new_stmt_vec_info()

◆ remove_stmt()

void vec_info::remove_stmt ( stmt_vec_info stmt_info)
Permanently remove the statement described by STMT_INFO from the
function.   

References free_stmt_vec_info(), gcc_assert, gsi_for_stmt(), gsi_remove(), NULL, release_defs(), 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().

◆ replace_stmt()

void vec_info::replace_stmt ( gimple_stmt_iterator * gsi,
stmt_vec_info stmt_info,
gimple * new_stmt )
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().

◆ set_vinfo_for_stmt()

void vec_info::set_vinfo_for_stmt ( gimple * stmt,
stmt_vec_info info,
bool check_ro = true )
private

Field Documentation

◆ any_known_not_updated_vssa

bool vec_info::any_known_not_updated_vssa

◆ base_alignments

◆ bbs

◆ grouped_stores

◆ inv_pattern_def_seq

gimple_seq vec_info::inv_pattern_def_seq

◆ kind

vec_kind vec_info::kind

◆ nbbs

◆ shared

◆ slp_instances

◆ stmt_vec_info_ro

bool vec_info::stmt_vec_info_ro

◆ stmt_vec_infos

◆ used_vector_modes

mode_set vec_info::used_vector_modes

◆ vector_mode


The documentation for this class was generated from the following files: