[patch] Loop-aware SLP 1/5

Ira Rosen IRAR@il.ibm.com
Tue Aug 14 13:05:00 GMT 2007


This is the first part of loop-aware SLP patch. This part adds SLP data
structures and their initialization.
It also adds an SLP argument for vectorizable_... functions (e.g.,
vectorizable_store).

During SLP analysis a computation tree that represents an SLP instance (a
sequence of groups of SLPable stmts) in the loop is built. Each node
contains a group of scalar stmts that can be packed together into vector
stmt(s), the vector stmt(s) (after the transformation phase), and tree
information. We keep this data in struct _slp_tree.

SLP instance info (the root to its computation tree, the size of groups of
scalar stmts packed together, required unrolling factor) is represented by
struct _slp_instance. For each loop, we keep a VEC of its SLP instances.

Thanks,
Ira

ChangeLog:

      * tree-vectorizer.h (enum vect_def_type): Start enumeration from 1.
      (struct _slp_tree, struct _slp_instance): Define new data structures
along
      macros for their access.
      (struct _loop_vec_info): Define new fields: strided_stores,
slp_instances,
      and slp_unrolling_factor along macros for their access.
      (enum slp_vect_type): New.
      (struct _stmt_vec_info): Define new field, slp_type, and macros for
its
      access.
      (vect_free_slp_tree): Declare.
      (vectorizable_load): Add an argument of type slp_tree.
      ( vectorizable_store, vectorizable_operation,
vectorizable_conversion,
      vectorizable_assignment): Likewise.
      * tree-vectorizer.c (new_stmt_vec_info): Initialize the new field.
      (new_loop_vec_info): Likewise.
      (destroy_loop_vec_info): Free memory allocated for SLP structures.
      * tree-vect-analyze.c (vect_analyze_operations): Add argument for
calls
      to vectorizable_ () functions.
      (vect_free_slp_tree): New.
      * tree-vect-transform.c (vectorizable_conversion): Add a new argument
      for SLP.
      (vectorizable_store, vectorizable_operation, vectorizable_conversion,
      vectorizable_assignment): Likewise.
      (vect_transform_stmt): Add a new argument for SLP. Check that there
is
      no SLP transformation required for unsupported cases. Add SLP
      argument for supported cases.

(See attached file: slp-part1.txt)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: slp-part1.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070814/8fd26a63/attachment.txt>


More information about the Gcc-patches mailing list