On Thu, Nov 03, 2011 at 10:47:32AM +0200, Ira Rosen wrote:
> On 1 November 2011 11:35, Ira Rosen <ira.ro...@linaro.org> wrote:
> > At the moment SLP allows only unary and binary operations building SLP
> > instance as a binary tree. This patch rewrites the analysis and SLP
> > tree creation to support any number of operands. A node in SLP tree
> > now has a VEC of children nodes - a node for each operand defined in
> > the loop/basic block.
> > This patch doesn't remove the unary/binary operation constraint yet.
> >
> > Bootstrapped and tested on powerpc64-suse-linux.
> > Comments are welcome.
> 
> I committed the attached patch after testing it also on i486-linux-gnu.
> It fixes PR 50912 as well.

The Changelog entry doesn't mention tree-vect-data-refs.c at all, yet
the patch modifies it and the commit too.
To me it looks like you've reverted the tree-vect-data-refs.c part
of your PR50730
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180367
change and as can be seen on gcc-testresults, the testcase now fails
FAIL: gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c scan-tree-dump-times slp "not 
vectorized: more than one data ref in stmt" 0

Was it intentional?

> > ChangeLog:
> >
> >        * tree-vectorizer.h (slp_void_p): New.
> >        (struct _slp_tree): Replace left and right with children.  Update
> >        documentation.
> >        (struct _slp_oprnd_info): New.
> >        (vect_get_vec_defs): Declare.
> >        (vect_get_slp_defs): Update arguments.
> >        * tree-vect-loop.c (vect_create_epilog_for_reduction): Call
> >        vect_get_vec_defs instead of vect_get_slp_defs.
> >        (vectorizable_reduction): Likewise.
> >        * tree-vect-stmts.c (vect_get_vec_defs): Remove static, add argument.
> >        Update call to vect_get_slp_defs.
> >        (vectorizable_conversion): Update call to vect_get_vec_defs.
> >        (vectorizable_assignment, vectorizable_shift,
> >        vectorizable_operation): Likewise.
> >        (vectorizable_type_demotion): Call vect_get_vec_defs instead of
> >        vect_get_slp_defs.
> >        (vectorizable_type_promotion, vectorizable_store): Likewise.
> >        (vect_analyze_stmt): Fix typo.
> >        * tree-vect-slp.c (vect_free_slp_tree): Update SLP tree traversal.
> >        (vect_print_slp_tree, vect_mark_slp_stmts,
> >        vect_mark_slp_stmts_relevant, vect_slp_rearrange_stmts,
> >        vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations,
> >        vect_schedule_slp_instance): Likewise.
> >        (vect_create_new_slp_node): New.
> >        (vect_create_oprnd_info, vect_free_oprnd_info): Likewise.
> >        (vect_get_and_check_slp_defs): Pass information about defs using
> >        oprnds_info, allow any number of operands.
> >        (vect_build_slp_tree): Likewise.  Update calls to
> >        vect_get_and_check_slp_defs.  Fix comments.
> >        (vect_analyze_slp_instance): Move node creation to
> >        vect_create_new_slp_node.
> >        (vect_get_slp_defs): Allow any number of operands.
> >

> --- tree-vect-data-refs.c     (revision 180818)
> +++ tree-vect-data-refs.c     (working copy)
> @@ -2524,7 +2524,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>    VEC (data_reference_p, heap) *datarefs;
>    struct data_reference *dr;
>    tree scalar_type;
> -  bool res, stop_bb_analysis = false;
> +  bool res;
>  
>    if (vect_print_dump_info (REPORT_DETAILS))
>      fprintf (vect_dump, "=== vect_analyze_data_refs ===\n");
> @@ -2586,12 +2586,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>        stmt = DR_STMT (dr);
>        stmt_info = vinfo_for_stmt (stmt);
>  
> -      if (stop_bb_analysis)
> -        {
> -          STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -          continue;
> -        }
> -
>        /* Check that analysis of the data-ref succeeded.  */
>        if (!DR_BASE_ADDRESS (dr) || !DR_OFFSET (dr) || !DR_INIT (dr)
>            || !DR_STEP (dr))
> @@ -2602,13 +2596,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>                print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
>              }
>  
> -          if (bb_vinfo)
> -            {
> -              STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -              stop_bb_analysis = true;
> -              continue;
> -            }
> -
>            return false;
>          }
>  
> @@ -2617,15 +2604,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>            if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
>              fprintf (vect_dump, "not vectorized: base addr of dr is a "
>                       "constant");
> -
> -          if (bb_vinfo)
> -            {
> -              STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -              stop_bb_analysis = true;
> -              continue;
> -            }
> -
> -           return false;
> +          return false;
>          }
>  
>        if (TREE_THIS_VOLATILE (DR_REF (dr)))
> @@ -2635,14 +2614,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>                fprintf (vect_dump, "not vectorized: volatile type ");
>                print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
>              }
> -
> -          if (bb_vinfo)
> -            {
> -              STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -              stop_bb_analysis = true;
> -              continue;
> -            }
> -
>            return false;
>          }
>  
> @@ -2658,14 +2629,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>                         "exception ");
>                print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
>              }
> -
> -          if (bb_vinfo)
> -            {
> -              STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -              stop_bb_analysis = true;
> -              continue;
> -            }
> -
>            return false;
>          }
>  
> @@ -2783,14 +2746,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>                         "not vectorized: more than one data ref in stmt: ");
>                print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
>              }
> -
> -          if (bb_vinfo)
> -            {
> -              STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -              stop_bb_analysis = true;
> -              continue;
> -            }
> -
>            return false;
>          }
>  
> @@ -2815,7 +2770,6 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
>              {
>                /* Mark the statement as not vectorizable.  */
>                STMT_VINFO_VECTORIZABLE (stmt_info) = false;
> -              stop_bb_analysis = true;
>                continue;
>              }
>            else

        Jakub

Reply via email to