Commit 0dc0a70b by Dorit Naishlos Committed by Dorit Nuzman

re PR tree-optimization/18009 (ICE in vect_transform_stmt, at…

re PR tree-optimization/18009 (ICE in vect_transform_stmt, at tree-vectorizer.c:2625 (testcase included))

        PR tree-optimization/18009
        * tree-vectorizer.h (enum dr_alignment_support): New type.
        (MAX_NUMBER_OF_UNALIGNED_DATA_REFS): Removed.
        (LOOP_UNALIGNED_DR): replaced with LOOP_VINFO_UNALIGNED_DR and holds a
        single data_reference (instead of a varray of references).
        * tree-vectorizer.c (new_loop_vec_info): Likewise.
        (vect_gen_niters_for_prolog_loop): Likewise.
        (vect_update_inits_of_drs): Likewise.

        (vect_update_inits_of_drs): Setting of DR_MISALIGNMENT moved to
        vect_enhance_data_refs_alignment.
        (vect_do_peeling_for_alignment): Likewise.
        (vect_enhance_data_refs_alignment): Decide if and by how much to peel;
        this functionality used to be in vect_analyze_data_refs_alignment.
        Also update DR_MISALIGNMENT due to peeling; this functionality used to
        be in vect_update_inits_of_drs and vect_do_peeling_for_alignment).
        (vect_analyze_data_refs_alignment): Decision on whether and by how much
        to peel moved to vect_enhance_data_refs_alignment. Call
        vect_supportable_dr_alignment.

        (vect_compute_data_ref_alignment): Set STMT_VINFO_VECTYPE.
        (vect_compute_data_refs_alignment): Return bool. Consider return value
        of vect_compute_data_ref_alignment and return true/false accordingly.
        (vect_enhance_data_refs_alignment): Consider return value of
        vect_compute_data_refs_alignment and return true/false accordingly.

        (vect_supportable_dr_alignment): New function.
        (vectorizable_store): Call vect_supportable_dr_alignment.
        (vectorizable_load): Call vect_supportable_dr_alignment. Alignment
        support checks moved from here to vect_supportable_dr_alignment.

        (vect_transform_loop): Avoid 80 columns overflow.

From-SVN: r90051
parent 89106ed5
2004-11-03 Dorit Naishlos <dorit@il.ibm.com>
PR tree-optimization/18009
* tree-vectorizer.h (enum dr_alignment_support): New type.
(MAX_NUMBER_OF_UNALIGNED_DATA_REFS): Removed.
(LOOP_UNALIGNED_DR): replaced with LOOP_VINFO_UNALIGNED_DR and holds a
single data_reference (instead of a varray of references).
* tree-vectorizer.c (new_loop_vec_info): Likewise.
(vect_gen_niters_for_prolog_loop): Likewise.
(vect_update_inits_of_drs): Likewise.
(vect_update_inits_of_drs): Setting of DR_MISALIGNMENT moved to
vect_enhance_data_refs_alignment.
(vect_do_peeling_for_alignment): Likewise.
(vect_enhance_data_refs_alignment): Decide if and by how much to peel;
this functionality used to be in vect_analyze_data_refs_alignment.
Also update DR_MISALIGNMENT due to peeling; this functionality used to
be in vect_update_inits_of_drs and vect_do_peeling_for_alignment).
(vect_analyze_data_refs_alignment): Decision on whether and by how much
to peel moved to vect_enhance_data_refs_alignment. Call
vect_supportable_dr_alignment.
(vect_compute_data_ref_alignment): Set STMT_VINFO_VECTYPE.
(vect_compute_data_refs_alignment): Return bool. Consider return value
of vect_compute_data_ref_alignment and return true/false accordingly.
(vect_enhance_data_refs_alignment): Consider return value of
vect_compute_data_refs_alignment and return true/false accordingly.
(vect_supportable_dr_alignment): New function.
(vectorizable_store): Call vect_supportable_dr_alignment.
(vectorizable_load): Call vect_supportable_dr_alignment. Alignment
support checks moved from here to vect_supportable_dr_alignment.
(vect_transform_loop): Avoid 80 columns overflow.
2004-11-03 Andrew Pinski <pinskia@physics.uc.edu> 2004-11-03 Andrew Pinski <pinskia@physics.uc.edu>
* timevar.c (timevar_enable): Change from * timevar.c (timevar_enable): Change from
......
...@@ -34,6 +34,14 @@ enum operation_type { ...@@ -34,6 +34,14 @@ enum operation_type {
binary_op binary_op
}; };
/* Define type of available alignment support. */
enum dr_alignment_support {
dr_unaligned_unsupported,
dr_unaligned_supported,
dr_unaligned_software_pipeline,
dr_aligned
};
/*-----------------------------------------------------------------*/ /*-----------------------------------------------------------------*/
/* Info on vectorized defs. */ /* Info on vectorized defs. */
/*-----------------------------------------------------------------*/ /*-----------------------------------------------------------------*/
...@@ -121,7 +129,6 @@ vinfo_for_stmt (tree stmt) ...@@ -121,7 +129,6 @@ vinfo_for_stmt (tree stmt)
/* The misalignment of the memory access in bytes. */ /* The misalignment of the memory access in bytes. */
#define DR_MISALIGNMENT(DR) (DR)->aux #define DR_MISALIGNMENT(DR) (DR)->aux
#define MAX_NUMBER_OF_UNALIGNED_DATA_REFS 1
static inline bool static inline bool
aligned_access_p (struct data_reference *data_ref_info) aligned_access_p (struct data_reference *data_ref_info)
...@@ -163,7 +170,7 @@ typedef struct _loop_vec_info { ...@@ -163,7 +170,7 @@ typedef struct _loop_vec_info {
int vectorization_factor; int vectorization_factor;
/* Unknown DRs according to which loop was peeled. */ /* Unknown DRs according to which loop was peeled. */
struct data_reference *unaligned_drs [MAX_NUMBER_OF_UNALIGNED_DATA_REFS]; struct data_reference *unaligned_dr;
/* If true, loop is peeled. /* If true, loop is peeled.
unaligned_drs show in this case DRs used for peeling. */ unaligned_drs show in this case DRs used for peeling. */
...@@ -187,7 +194,7 @@ typedef struct _loop_vec_info { ...@@ -187,7 +194,7 @@ typedef struct _loop_vec_info {
#define LOOP_VINFO_DATAREF_READS(L) (L)->data_ref_reads #define LOOP_VINFO_DATAREF_READS(L) (L)->data_ref_reads
#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters)) #define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters))
#define LOOP_DO_PEELING_FOR_ALIGNMENT(L) (L)->do_peeling_for_alignment #define LOOP_DO_PEELING_FOR_ALIGNMENT(L) (L)->do_peeling_for_alignment
#define LOOP_UNALIGNED_DR(L, I) (L)->unaligned_drs[(I)] #define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr
#define LOOP_VINFO_NITERS_KNOWN_P(L) \ #define LOOP_VINFO_NITERS_KNOWN_P(L) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment