This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Loop-aware SLP 4/5


This part adds an adjustment of vectorization cost model to SLP.

SLP costs are calculated for each SLP computation tree recursively during
its analysis, and added to the overall costs if we decide to SLP.

Thanks,
Ira

ChangeLog:

      * tree-vectorizer.h (_slp_tree): Add new fields for costs and their
      access functions.
      (_slp_instance): Likewise.
      (vect_model_simple_cost, vect_model_store_cost,
vect_model_load_cost):
      Declare (make extern).
      * tree-vect-analyze.c (vect_update_slp_costs_according_to_vf): New.
      (vect_analyze_operations): Call
vect_update_slp_costs_according_to_vf.
      (vect_get_and_check_slp_defs): Calculate costs. Add arguments.
      (vect_build_slp_tree): Likewise.
      (vect_analyze_slp_instance): Initialize cost fields. Update
      arguments of vect_build_slp_tree.
      * tree-vect-transform.c (vect_estimate_min_profitable_iters): Take
      SLP costs into account.
      (vect_model_simple_cost): Make extern, add SLP parameter and handle
      SLP.
      (vect_model_store_cost, vect_model_load_cost): Likewise.
      (vectorizable_call): Add argument to vect_model_simple_cost.
      (vectorizable_assignment): Call vect_model_simple_cost only for not
      pure SLP stmts.
      (vectorizable_operation): Likewise.
      (vectorizable_type_demotion): Add argument to
      vect_model_simple_cost.
      (vectorizable_type_promotion): Likewise.
      (vectorizable_store): Call vect_model_simple_cost only for not pure
      SLP stmts.
      (vectorizable_load): Likewise.

(See attached file: slp-part4.txt)

Attachment: slp-part4.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]