OSDN Git Service

2004-12-17 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / tree-vectorizer.h
index 37c5706..20563af 100644 (file)
@@ -34,6 +34,14 @@ enum operation_type {
   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.                                        */
 /*-----------------------------------------------------------------*/
@@ -152,8 +160,8 @@ typedef struct _loop_vec_info {
   /* The loop exit_condition.  */
   tree exit_cond;
 
-  /* Number of iterations. -1 if unknown.  */
-  HOST_WIDE_INT num_iters;
+  /* Number of iterations.  */
+  tree num_iters;
 
   /* Is the loop vectorizable? */
   bool vectorizable;
@@ -161,6 +169,13 @@ typedef struct _loop_vec_info {
   /* Unrolling factor  */
   int vectorization_factor;
 
+  /* Unknown DRs according to which loop was peeled.  */
+  struct data_reference *unaligned_dr;
+
+  /* If true, loop is peeled.
+   unaligned_drs show in this case DRs used for peeling.  */
+  bool do_peeling_for_alignment;
+
   /* All data references in the loop that are being written to.  */
   varray_type data_ref_writes;
 
@@ -177,8 +192,14 @@ typedef struct _loop_vec_info {
 #define LOOP_VINFO_VECT_FACTOR(L)    (L)->vectorization_factor
 #define LOOP_VINFO_DATAREF_WRITES(L) (L)->data_ref_writes
 #define LOOP_VINFO_DATAREF_READS(L)  (L)->data_ref_reads
-
-#define LOOP_VINFO_NITERS_KNOWN_P(L) ((L)->num_iters > 0)
+#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_VINFO_UNALIGNED_DR(L)       (L)->unaligned_dr
+  
+
+#define LOOP_VINFO_NITERS_KNOWN_P(L)                     \
+(host_integerp ((L)->num_iters,0)                        \
+&& TREE_INT_CST_LOW ((L)->num_iters) > 0)      
 
 /*-----------------------------------------------------------------*/
 /* Function prototypes.                                            */