GCC Middle and Back End API Reference
tree-vectorizer.c File Reference

Data Structures

struct  simduid_to_vf
struct  simd_array_to_simduid
struct  note_simd_array_uses_struct

Functions

static void adjust_simduid_builtins ()
static tree note_simd_array_uses_cb ()
static void note_simd_array_uses ()
void vect_destroy_datarefs ()
unsigned vectorize_loops ()
static unsigned int execute_vect_slp ()
static bool gate_vect_slp ()
gimple_opt_passmake_pass_slp_vectorize ()
static unsigned int increase_alignment ()
static bool gate_increase_alignment ()
simple_ipa_opt_passmake_pass_ipa_increase_alignment ()

Variables

LOC vect_location
vec< vec_void_pstmt_vec_info_vec

Function Documentation

static void adjust_simduid_builtins ( )
static
static unsigned int execute_vect_slp ( )
static
    Entry point to basic block SLP phase.  

Referenced by gate_vect_slp().

static bool gate_increase_alignment ( )
static
static bool gate_vect_slp ( )
static

References execute(), and execute_vect_slp().

static unsigned int increase_alignment ( )
static
   Increase alignment of global arrays to improve vectorization potential.
   TODO:
   - Consider also structs that have an array field.
   - Use ipa analysis to prune arrays that can't be vectorized?
     This should involve global alignment analysis and in the future also
     array padding.  
     Increase the alignment of all global arrays for vectorization.  
simple_ipa_opt_pass* make_pass_ipa_increase_alignment ( )
gimple_opt_pass* make_pass_slp_vectorize ( )
static void note_simd_array_uses ( )
static
static tree note_simd_array_uses_cb ( )
static
   Callback for note_simd_array_uses, called through walk_gimple_op.  

References simd_array_to_simduid::decl, and simd_array_to_simduid::simduid.

Referenced by note_simd_array_uses().

void vect_destroy_datarefs ( )
   A helper function to free data refs.  

References data_reference::aux, and free().

unsigned vectorize_loops ( void  )
   Function vectorize_loops.

   Entry point to loop vectorization phase.  
     Bail out if there are no loops.  
      ----------- Analyze loops. -----------  
     If some loop was duplicated, it gets bigger number
     than all previously defined loops.  This fact allows us to run
     only over initial loops skipping newly generated ones.  
           Now that the loop has been vectorized, allow it to be unrolled
           etc.  
      ----------- Finalize. -----------  
     Fold IFN_GOMP_SIMD_{VF,LANE,LAST_LANE} builtins.  
     Shrink any "omp array simd" temporary arrays to the
     actual vectorization factors.  
         If we vectorized any loop only virtual SSA form needs to be updated.
         ???  Also while we try hard to update loop-closed SSA form we fail
         to properly do this in some corner-cases (see PR56286).  

References adjust_simduid_builtins(), cfun, and function::has_simduid_loops.

Referenced by make_pass_tree_loop_init().


Variable Documentation

vec<vec_void_p> stmt_vec_info_vec
   Vector mapping GIMPLE stmt to stmt_vec_info. 
LOC vect_location
@verbatim 

Vectorizer Copyright (C) 2003-2013 Free Software Foundation, Inc. Contributed by Dorit Naishlos dorit.nosp@m.@il..nosp@m.ibm.c.nosp@m.om

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

   Loop and basic block vectorizer.

  This file contains drivers for the three vectorizers:
  (1) loop vectorizer (inter-iteration parallelism),
  (2) loop-aware SLP (intra-iteration parallelism) (invoked by the loop
      vectorizer)
  (3) BB vectorizer (out-of-loops), aka SLP

  The rest of the vectorizer's code is organized as follows:
  - tree-vect-loop.c - loop specific parts such as reductions, etc. These are
    used by drivers (1) and (2).
  - tree-vect-loop-manip.c - vectorizer's loop control-flow utilities, used by
    drivers (1) and (2).
  - tree-vect-slp.c - BB vectorization specific analysis and transformation,
    used by drivers (2) and (3).
  - tree-vect-stmts.c - statements analysis and transformation (used by all).
  - tree-vect-data-refs.c - vectorizer specific data-refs analysis and
    manipulations (used by all).
  - tree-vect-patterns.c - vectorizable code patterns detector (used by all)

  Here's a poor attempt at illustrating that:

     tree-vectorizer.c:
     loop_vect()  loop_aware_slp()  slp_vect()
          |        /           \          /
          |       /             \        /
          tree-vect-loop.c  tree-vect-slp.c
                | \      \  /      /   |
                |  \      \/      /    |
                |   \     /\     /     |
                |    \   /  \   /      |
         tree-vect-stmts.c  tree-vect-data-refs.c
                       \      /
                    tree-vect-patterns.c
   Loop or bb location.  

Referenced by dr_group_sort_cmp(), get_initial_def_for_reduction(), perm_mask_for_reverse(), vect_analyze_data_ref_accesses(), vect_analyze_loop_1(), vect_analyze_scalar_cycles(), vect_analyze_stmt(), vect_build_slp_tree_1(), vect_can_advance_ivs_p(), vect_compute_data_ref_alignment(), vect_create_cond_for_alias_checks(), vect_create_vectorized_promotion_stmts(), vect_do_peeling_for_loop_bound(), vect_find_same_alignment_drs(), vect_gen_perm_mask(), vect_get_mask_element(), vect_get_slp_defs(), vect_get_store_cost(), vect_get_vec_def_for_operand(), vect_loop_kill_debug_uses(), vect_mark_for_runtime_alias_test(), vect_mark_relevant(), vect_mark_slp_stmts_relevant(), vect_min_worthwhile_factor(), vect_model_reduction_cost(), vect_model_simple_cost(), vect_model_store_cost(), vect_pattern_recog_1(), vect_peeling_hash_choose_best_peeling(), vect_setup_realignment(), vect_slp_analyze_data_ref_dependence(), vect_stmt_relevant_p(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vect_update_misalignment_for_peel(), and vectorizable_live_operation().