This patch simply adds loop_vinfo as an extra argument to
vect_get_vec_def_for_operand and only generates a stmt_vinfo if required.
This is a required cleanup for patch [2/3].
Tested on x86 and aarch64.

gcc/
        * tree-vectorizer.h (vect_get_vec_def_for_operand): Pass loop_vinfo in.
        * tree-vect-stmts.c (vect_get_vec_def_for_operand): Pass loop_vinfo in.
        (vect_get_vec_defs): Pass down loop_vinfo.
        (vectorizable_mask_load_store): Likewise.
        (vectorizable_call): Likewise.
        (vectorizable_simd_clone_call): Likewise.
        (vect_get_loop_based_defs): Likewise.
        (vectorizable_conversion): Likewise.
        (vectorizable_operation): Likewise.
        (vectorizable_store): Likewise.
        (vectorizable_load): Likewise.
        (vectorizable_condition): Likewise.
        (vectorizable_comparison): Likewise.
        * tree-vect-loop.c (get_initial_def_for_induction): Likewise.
        (get_initial_def_for_reduction): Likewise.
        (vectorizable_reduction):  Likewise.


Alan.

Attachment: live1.patch
Description: Binary data

Reply via email to