Mercurial > hg > CbC > CbC_gcc
annotate gcc/tree-vectorizer.h @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
rev | line source |
---|---|
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1 /* Vectorizer |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
3 Free Software Foundation, Inc. |
0 | 4 Contributed by Dorit Naishlos <dorit@il.ibm.com> |
5 | |
6 This file is part of GCC. | |
7 | |
8 GCC is free software; you can redistribute it and/or modify it under | |
9 the terms of the GNU General Public License as published by the Free | |
10 Software Foundation; either version 3, or (at your option) any later | |
11 version. | |
12 | |
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with GCC; see the file COPYING3. If not see | |
20 <http://www.gnu.org/licenses/>. */ | |
21 | |
22 #ifndef GCC_TREE_VECTORIZER_H | |
23 #define GCC_TREE_VECTORIZER_H | |
24 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 #include "tree-data-ref.h" |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 |
0 | 27 typedef source_location LOC; |
28 #define UNKNOWN_LOC UNKNOWN_LOCATION | |
29 #define EXPR_LOC(e) EXPR_LOCATION(e) | |
30 #define LOC_FILE(l) LOCATION_FILE (l) | |
31 #define LOC_LINE(l) LOCATION_LINE (l) | |
32 | |
33 /* Used for naming of new temporaries. */ | |
34 enum vect_var_kind { | |
35 vect_simple_var, | |
36 vect_pointer_var, | |
37 vect_scalar_var | |
38 }; | |
39 | |
40 /* Defines type of operation. */ | |
41 enum operation_type { | |
42 unary_op = 1, | |
43 binary_op, | |
44 ternary_op | |
45 }; | |
46 | |
47 /* Define type of available alignment support. */ | |
48 enum dr_alignment_support { | |
49 dr_unaligned_unsupported, | |
50 dr_unaligned_supported, | |
51 dr_explicit_realign, | |
52 dr_explicit_realign_optimized, | |
53 dr_aligned | |
54 }; | |
55 | |
56 /* Define type of def-use cross-iteration cycle. */ | |
57 enum vect_def_type { | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
58 vect_uninitialized_def = 0, |
0 | 59 vect_constant_def = 1, |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
60 vect_external_def, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
61 vect_internal_def, |
0 | 62 vect_induction_def, |
63 vect_reduction_def, | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
64 vect_double_reduction_def, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
65 vect_nested_cycle, |
0 | 66 vect_unknown_def_type |
67 }; | |
68 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
69 #define VECTORIZABLE_CYCLE_DEF(D) (((D) == vect_reduction_def) \ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
70 || ((D) == vect_double_reduction_def) \ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
71 || ((D) == vect_nested_cycle)) |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
72 |
0 | 73 /************************************************************************ |
74 SLP | |
75 ************************************************************************/ | |
76 | |
77 /* A computation tree of an SLP instance. Each node corresponds to a group of | |
78 stmts to be packed in a SIMD stmt. */ | |
79 typedef struct _slp_tree { | |
80 /* Only binary and unary operations are supported. LEFT child corresponds to | |
81 the first operand and RIGHT child to the second if the operation is | |
82 binary. */ | |
83 struct _slp_tree *left; | |
84 struct _slp_tree *right; | |
85 /* A group of scalar stmts to be vectorized together. */ | |
86 VEC (gimple, heap) *stmts; | |
87 /* Vectorized stmt/s. */ | |
88 VEC (gimple, heap) *vec_stmts; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
89 /* Number of vector stmts that are created to replace the group of scalar |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
90 stmts. It is calculated during the transformation phase as the number of |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
91 scalar elements in one scalar iteration (GROUP_SIZE) multiplied by VF |
0 | 92 divided by vector size. */ |
93 unsigned int vec_stmts_size; | |
94 /* Vectorization costs associated with SLP node. */ | |
95 struct | |
96 { | |
97 int outside_of_loop; /* Statements generated outside loop. */ | |
98 int inside_of_loop; /* Statements generated inside loop. */ | |
99 } cost; | |
100 } *slp_tree; | |
101 | |
102 DEF_VEC_P(slp_tree); | |
103 DEF_VEC_ALLOC_P(slp_tree, heap); | |
104 | |
105 /* SLP instance is a sequence of stmts in a loop that can be packed into | |
106 SIMD stmts. */ | |
107 typedef struct _slp_instance { | |
108 /* The root of SLP tree. */ | |
109 slp_tree root; | |
110 | |
111 /* Size of groups of scalar stmts that will be replaced by SIMD stmt/s. */ | |
112 unsigned int group_size; | |
113 | |
114 /* The unrolling factor required to vectorized this SLP instance. */ | |
115 unsigned int unrolling_factor; | |
116 | |
117 /* Vectorization costs associated with SLP instance. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
118 struct |
0 | 119 { |
120 int outside_of_loop; /* Statements generated outside loop. */ | |
121 int inside_of_loop; /* Statements generated inside loop. */ | |
122 } cost; | |
123 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
124 /* Loads permutation relatively to the stores, NULL if there is no |
0 | 125 permutation. */ |
126 VEC (int, heap) *load_permutation; | |
127 | |
128 /* The group of nodes that contain loads of this SLP instance. */ | |
129 VEC (slp_tree, heap) *loads; | |
130 | |
131 /* The first scalar load of the instance. The created vector loads will be | |
132 inserted before this statement. */ | |
133 gimple first_load; | |
134 } *slp_instance; | |
135 | |
136 DEF_VEC_P(slp_instance); | |
137 DEF_VEC_ALLOC_P(slp_instance, heap); | |
138 | |
139 /* Access Functions. */ | |
140 #define SLP_INSTANCE_TREE(S) (S)->root | |
141 #define SLP_INSTANCE_GROUP_SIZE(S) (S)->group_size | |
142 #define SLP_INSTANCE_UNROLLING_FACTOR(S) (S)->unrolling_factor | |
143 #define SLP_INSTANCE_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop | |
144 #define SLP_INSTANCE_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop | |
145 #define SLP_INSTANCE_LOAD_PERMUTATION(S) (S)->load_permutation | |
146 #define SLP_INSTANCE_LOADS(S) (S)->loads | |
147 #define SLP_INSTANCE_FIRST_LOAD_STMT(S) (S)->first_load | |
148 | |
149 #define SLP_TREE_LEFT(S) (S)->left | |
150 #define SLP_TREE_RIGHT(S) (S)->right | |
151 #define SLP_TREE_SCALAR_STMTS(S) (S)->stmts | |
152 #define SLP_TREE_VEC_STMTS(S) (S)->vec_stmts | |
153 #define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size | |
154 #define SLP_TREE_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop | |
155 #define SLP_TREE_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop | |
156 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
157 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
158 typedef struct _vect_peel_info |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
159 { |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
160 int npeel; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
161 struct data_reference *dr; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
162 unsigned int count; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
163 } *vect_peel_info; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
164 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
165 typedef struct _vect_peel_extended_info |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
166 { |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
167 struct _vect_peel_info peel_info; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
168 unsigned int inside_cost; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
169 unsigned int outside_cost; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
170 } *vect_peel_extended_info; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
171 |
0 | 172 /*-----------------------------------------------------------------*/ |
173 /* Info on vectorized loops. */ | |
174 /*-----------------------------------------------------------------*/ | |
175 typedef struct _loop_vec_info { | |
176 | |
177 /* The loop to which this info struct refers to. */ | |
178 struct loop *loop; | |
179 | |
180 /* The loop basic blocks. */ | |
181 basic_block *bbs; | |
182 | |
183 /* Number of iterations. */ | |
184 tree num_iters; | |
185 tree num_iters_unchanged; | |
186 | |
187 /* Minimum number of iterations below which vectorization is expected to | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
188 not be profitable (as estimated by the cost model). |
0 | 189 -1 indicates that vectorization will not be profitable. |
190 FORNOW: This field is an int. Will be a tree in the future, to represent | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
191 values unknown at compile time. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
192 int min_profitable_iters; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
193 |
0 | 194 /* Is the loop vectorizable? */ |
195 bool vectorizable; | |
196 | |
197 /* Unrolling factor */ | |
198 int vectorization_factor; | |
199 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
200 /* The loop location in the source. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
201 LOC loop_line_number; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
202 |
0 | 203 /* Unknown DRs according to which loop was peeled. */ |
204 struct data_reference *unaligned_dr; | |
205 | |
206 /* peeling_for_alignment indicates whether peeling for alignment will take | |
207 place, and what the peeling factor should be: | |
208 peeling_for_alignment = X means: | |
209 If X=0: Peeling for alignment will not be applied. | |
210 If X>0: Peel first X iterations. | |
211 If X=-1: Generate a runtime test to calculate the number of iterations | |
212 to be peeled, using the dataref recorded in the field | |
213 unaligned_dr. */ | |
214 int peeling_for_alignment; | |
215 | |
216 /* The mask used to check the alignment of pointers or arrays. */ | |
217 int ptr_mask; | |
218 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
219 /* The loop nest in which the data dependences are computed. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
220 VEC (loop_p, heap) *loop_nest; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
221 |
0 | 222 /* All data references in the loop. */ |
223 VEC (data_reference_p, heap) *datarefs; | |
224 | |
225 /* All data dependences in the loop. */ | |
226 VEC (ddr_p, heap) *ddrs; | |
227 | |
228 /* Data Dependence Relations defining address ranges that are candidates | |
229 for a run-time aliasing check. */ | |
230 VEC (ddr_p, heap) *may_alias_ddrs; | |
231 | |
232 /* Statements in the loop that have data references that are candidates for a | |
233 runtime (loop versioning) misalignment check. */ | |
234 VEC(gimple,heap) *may_misalign_stmts; | |
235 | |
236 /* All interleaving chains of stores in the loop, represented by the first | |
237 stmt in the chain. */ | |
238 VEC(gimple, heap) *strided_stores; | |
239 | |
240 /* All SLP instances in the loop. This is a subset of the set of STRIDED_STORES | |
241 of the loop. */ | |
242 VEC(slp_instance, heap) *slp_instances; | |
243 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
244 /* The unrolling factor needed to SLP the loop. In case of that pure SLP is |
0 | 245 applied to the loop, i.e., no unrolling is needed, this is 1. */ |
246 unsigned slp_unrolling_factor; | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
247 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
248 /* Reduction cycles detected in the loop. Used in loop-aware SLP. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
249 VEC (gimple, heap) *reductions; |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
250 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
251 /* Hash table used to choose the best peeling option. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
252 htab_t peeling_htab; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
253 |
0 | 254 } *loop_vec_info; |
255 | |
256 /* Access Functions. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
257 #define LOOP_VINFO_LOOP(L) (L)->loop |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
258 #define LOOP_VINFO_BBS(L) (L)->bbs |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
259 #define LOOP_VINFO_NITERS(L) (L)->num_iters |
0 | 260 /* Since LOOP_VINFO_NITERS can change after prologue peeling |
261 retain total unchanged scalar loop iterations for cost model. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
262 #define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
263 #define LOOP_VINFO_COST_MODEL_MIN_ITERS(L) (L)->min_profitable_iters |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
264 #define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
265 #define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
266 #define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
267 #define LOOP_VINFO_LOOP_NEST(L) (L)->loop_nest |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
268 #define LOOP_VINFO_DATAREFS(L) (L)->datarefs |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
269 #define LOOP_VINFO_DDRS(L) (L)->ddrs |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
270 #define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters)) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
271 #define LOOP_PEELING_FOR_ALIGNMENT(L) (L)->peeling_for_alignment |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
272 #define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
273 #define LOOP_VINFO_MAY_MISALIGN_STMTS(L) (L)->may_misalign_stmts |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
274 #define LOOP_VINFO_LOC(L) (L)->loop_line_number |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
275 #define LOOP_VINFO_MAY_ALIAS_DDRS(L) (L)->may_alias_ddrs |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
276 #define LOOP_VINFO_STRIDED_STORES(L) (L)->strided_stores |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
277 #define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances |
0 | 278 #define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
279 #define LOOP_VINFO_REDUCTIONS(L) (L)->reductions |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
280 #define LOOP_VINFO_PEELING_HTAB(L) (L)->peeling_htab |
0 | 281 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
282 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
283 VEC_length (gimple, (L)->may_misalign_stmts) > 0 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
284 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
285 VEC_length (ddr_p, (L)->may_alias_ddrs) > 0 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
286 |
0 | 287 #define NITERS_KNOWN_P(n) \ |
288 (host_integerp ((n),0) \ | |
289 && TREE_INT_CST_LOW ((n)) > 0) | |
290 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
291 #define LOOP_VINFO_NITERS_KNOWN_P(L) \ |
0 | 292 NITERS_KNOWN_P((L)->num_iters) |
293 | |
294 static inline loop_vec_info | |
295 loop_vec_info_for_loop (struct loop *loop) | |
296 { | |
297 return (loop_vec_info) loop->aux; | |
298 } | |
299 | |
300 static inline bool | |
301 nested_in_vect_loop_p (struct loop *loop, gimple stmt) | |
302 { | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
303 return (loop->inner |
0 | 304 && (loop->inner == (gimple_bb (stmt))->loop_father)); |
305 } | |
306 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
307 typedef struct _bb_vec_info { |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
308 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
309 basic_block bb; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
310 /* All interleaving chains of stores in the basic block, represented by the |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
311 first stmt in the chain. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
312 VEC(gimple, heap) *strided_stores; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
313 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
314 /* All SLP instances in the basic block. This is a subset of the set of |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
315 STRIDED_STORES of the basic block. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
316 VEC(slp_instance, heap) *slp_instances; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
317 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
318 /* All data references in the basic block. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
319 VEC (data_reference_p, heap) *datarefs; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
320 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
321 /* All data dependences in the basic block. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
322 VEC (ddr_p, heap) *ddrs; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
323 } *bb_vec_info; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
324 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
325 #define BB_VINFO_BB(B) (B)->bb |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
326 #define BB_VINFO_STRIDED_STORES(B) (B)->strided_stores |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
327 #define BB_VINFO_SLP_INSTANCES(B) (B)->slp_instances |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
328 #define BB_VINFO_DATAREFS(B) (B)->datarefs |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
329 #define BB_VINFO_DDRS(B) (B)->ddrs |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
330 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
331 static inline bb_vec_info |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
332 vec_info_for_bb (basic_block bb) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
333 { |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
334 return (bb_vec_info) bb->aux; |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
335 } |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
336 |
0 | 337 /*-----------------------------------------------------------------*/ |
338 /* Info on vectorized defs. */ | |
339 /*-----------------------------------------------------------------*/ | |
340 enum stmt_vec_info_type { | |
341 undef_vec_info_type = 0, | |
342 load_vec_info_type, | |
343 store_vec_info_type, | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
344 shift_vec_info_type, |
0 | 345 op_vec_info_type, |
346 call_vec_info_type, | |
347 assignment_vec_info_type, | |
348 condition_vec_info_type, | |
349 reduc_vec_info_type, | |
350 induc_vec_info_type, | |
351 type_promotion_vec_info_type, | |
352 type_demotion_vec_info_type, | |
353 type_conversion_vec_info_type, | |
354 loop_exit_ctrl_vec_info_type | |
355 }; | |
356 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
357 /* Indicates whether/how a variable is used in the scope of loop/basic |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
358 block. */ |
0 | 359 enum vect_relevant { |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
360 vect_unused_in_scope = 0, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
361 /* The def is in the inner loop, and the use is in the outer loop, and the |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
362 use is a reduction stmt. */ |
0 | 363 vect_used_in_outer_by_reduction, |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
364 /* The def is in the inner loop, and the use is in the outer loop (and is |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
365 not part of reduction). */ |
0 | 366 vect_used_in_outer, |
367 | |
368 /* defs that feed computations that end up (only) in a reduction. These | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
369 defs may be used by non-reduction stmts, but eventually, any |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
370 computations/values that are affected by these defs are used to compute |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
371 a reduction (i.e. don't get stored to memory, for example). We use this |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
372 to identify computations that we can change the order in which they are |
0 | 373 computed. */ |
374 vect_used_by_reduction, | |
375 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
376 vect_used_in_scope |
0 | 377 }; |
378 | |
379 /* The type of vectorization that can be applied to the stmt: regular loop-based | |
380 vectorization; pure SLP - the stmt is a part of SLP instances and does not | |
381 have uses outside SLP instances; or hybrid SLP and loop-based - the stmt is | |
382 a part of SLP instance and also must be loop-based vectorized, since it has | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
383 uses outside SLP sequences. |
0 | 384 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
385 In the loop context the meanings of pure and hybrid SLP are slightly |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
386 different. By saying that pure SLP is applied to the loop, we mean that we |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
387 exploit only intra-iteration parallelism in the loop; i.e., the loop can be |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
388 vectorized without doing any conceptual unrolling, cause we don't pack |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
389 together stmts from different iterations, only within a single iteration. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
390 Loop hybrid SLP means that we exploit both intra-iteration and |
0 | 391 inter-iteration parallelism (e.g., number of elements in the vector is 4 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
392 and the slp-group-size is 2, in which case we don't have enough parallelism |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
393 within an iteration, so we obtain the rest of the parallelism from subsequent |
0 | 394 iterations by unrolling the loop by 2). */ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
395 enum slp_vect_type { |
0 | 396 loop_vect = 0, |
397 pure_slp, | |
398 hybrid | |
399 }; | |
400 | |
401 | |
402 typedef struct data_reference *dr_p; | |
403 DEF_VEC_P(dr_p); | |
404 DEF_VEC_ALLOC_P(dr_p,heap); | |
405 | |
406 typedef struct _stmt_vec_info { | |
407 | |
408 enum stmt_vec_info_type type; | |
409 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
410 /* Indicates whether this stmts is part of a computation whose result is |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
411 used outside the loop. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
412 bool live; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
413 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
414 /* Stmt is part of some pattern (computation idiom) */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
415 bool in_pattern_p; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
416 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
417 /* For loads only, if there is a store with the same location, this field is |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
418 TRUE. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
419 bool read_write_dep; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
420 |
0 | 421 /* The stmt to which this info struct refers to. */ |
422 gimple stmt; | |
423 | |
424 /* The loop_vec_info with respect to which STMT is vectorized. */ | |
425 loop_vec_info loop_vinfo; | |
426 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
427 /* The vector type to be used for the LHS of this statement. */ |
0 | 428 tree vectype; |
429 | |
430 /* The vectorized version of the stmt. */ | |
431 gimple vectorized_stmt; | |
432 | |
433 | |
434 /** The following is relevant only for stmts that contain a non-scalar | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
435 data-ref (array/pointer/struct access). A GIMPLE stmt is expected to have |
0 | 436 at most one such data-ref. **/ |
437 | |
438 /* Information about the data-ref (access function, etc), | |
439 relative to the inner-most containing loop. */ | |
440 struct data_reference *data_ref_info; | |
441 | |
442 /* Information about the data-ref relative to this loop | |
443 nest (the loop that is being considered for vectorization). */ | |
444 tree dr_base_address; | |
445 tree dr_init; | |
446 tree dr_offset; | |
447 tree dr_step; | |
448 tree dr_aligned_to; | |
449 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
450 /* Used for various bookkeeping purposes, generally holding a pointer to |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
451 some other stmt S that is in some way "related" to this stmt. |
0 | 452 Current use of this field is: |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
453 If this stmt is part of a pattern (i.e. the field 'in_pattern_p' is |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
454 true): S is the "pattern stmt" that represents (and replaces) the |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
455 sequence of stmts that constitutes the pattern. Similarly, the |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
456 related_stmt of the "pattern stmt" points back to this stmt (which is |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
457 the last stmt in the original sequence of stmts that constitutes the |
0 | 458 pattern). */ |
459 gimple related_stmt; | |
460 | |
461 /* List of datarefs that are known to have the same alignment as the dataref | |
462 of this stmt. */ | |
463 VEC(dr_p,heap) *same_align_refs; | |
464 | |
465 /* Classify the def of this stmt. */ | |
466 enum vect_def_type def_type; | |
467 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
468 /* Whether the stmt is SLPed, loop-based vectorized, or both. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
469 enum slp_vect_type slp_type; |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
470 |
0 | 471 /* Interleaving info. */ |
472 /* First data-ref in the interleaving group. */ | |
473 gimple first_dr; | |
474 /* Pointer to the next data-ref in the group. */ | |
475 gimple next_dr; | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
476 /* In case that two or more stmts share data-ref, this is the pointer to the |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
477 previously detected stmt with the same dr. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
478 gimple same_dr_stmt; |
0 | 479 /* The size of the interleaving group. */ |
480 unsigned int size; | |
481 /* For stores, number of stores from this group seen. We vectorize the last | |
482 one. */ | |
483 unsigned int store_count; | |
484 /* For loads only, the gap from the previous load. For consecutive loads, GAP | |
485 is 1. */ | |
486 unsigned int gap; | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
487 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
488 /* Not all stmts in the loop need to be vectorized. e.g, the increment |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
489 of the loop induction variable and computation of array indexes. relevant |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
490 indicates whether the stmt needs to be vectorized. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
491 enum vect_relevant relevant; |
0 | 492 |
493 /* Vectorization costs associated with statement. */ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
494 struct |
0 | 495 { |
496 int outside_of_loop; /* Statements generated outside loop. */ | |
497 int inside_of_loop; /* Statements generated inside loop. */ | |
498 } cost; | |
499 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
500 /* The bb_vec_info with respect to which STMT is vectorized. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
501 bb_vec_info bb_vinfo; |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
502 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
503 /* Is this statement vectorizable or should it be skipped in (partial) |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
504 vectorization. */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
505 bool vectorizable; |
0 | 506 } *stmt_vec_info; |
507 | |
508 /* Access Functions. */ | |
509 #define STMT_VINFO_TYPE(S) (S)->type | |
510 #define STMT_VINFO_STMT(S) (S)->stmt | |
511 #define STMT_VINFO_LOOP_VINFO(S) (S)->loop_vinfo | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
512 #define STMT_VINFO_BB_VINFO(S) (S)->bb_vinfo |
0 | 513 #define STMT_VINFO_RELEVANT(S) (S)->relevant |
514 #define STMT_VINFO_LIVE_P(S) (S)->live | |
515 #define STMT_VINFO_VECTYPE(S) (S)->vectype | |
516 #define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
517 #define STMT_VINFO_VECTORIZABLE(S) (S)->vectorizable |
0 | 518 #define STMT_VINFO_DATA_REF(S) (S)->data_ref_info |
519 | |
520 #define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_base_address | |
521 #define STMT_VINFO_DR_INIT(S) (S)->dr_init | |
522 #define STMT_VINFO_DR_OFFSET(S) (S)->dr_offset | |
523 #define STMT_VINFO_DR_STEP(S) (S)->dr_step | |
524 #define STMT_VINFO_DR_ALIGNED_TO(S) (S)->dr_aligned_to | |
525 | |
526 #define STMT_VINFO_IN_PATTERN_P(S) (S)->in_pattern_p | |
527 #define STMT_VINFO_RELATED_STMT(S) (S)->related_stmt | |
528 #define STMT_VINFO_SAME_ALIGN_REFS(S) (S)->same_align_refs | |
529 #define STMT_VINFO_DEF_TYPE(S) (S)->def_type | |
530 #define STMT_VINFO_DR_GROUP_FIRST_DR(S) (S)->first_dr | |
531 #define STMT_VINFO_DR_GROUP_NEXT_DR(S) (S)->next_dr | |
532 #define STMT_VINFO_DR_GROUP_SIZE(S) (S)->size | |
533 #define STMT_VINFO_DR_GROUP_STORE_COUNT(S) (S)->store_count | |
534 #define STMT_VINFO_DR_GROUP_GAP(S) (S)->gap | |
535 #define STMT_VINFO_DR_GROUP_SAME_DR_STMT(S)(S)->same_dr_stmt | |
536 #define STMT_VINFO_DR_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep | |
537 #define STMT_VINFO_STRIDED_ACCESS(S) ((S)->first_dr != NULL) | |
538 | |
539 #define DR_GROUP_FIRST_DR(S) (S)->first_dr | |
540 #define DR_GROUP_NEXT_DR(S) (S)->next_dr | |
541 #define DR_GROUP_SIZE(S) (S)->size | |
542 #define DR_GROUP_STORE_COUNT(S) (S)->store_count | |
543 #define DR_GROUP_GAP(S) (S)->gap | |
544 #define DR_GROUP_SAME_DR_STMT(S) (S)->same_dr_stmt | |
545 #define DR_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep | |
546 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
547 #define STMT_VINFO_RELEVANT_P(S) ((S)->relevant != vect_unused_in_scope) |
0 | 548 #define STMT_VINFO_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop |
549 #define STMT_VINFO_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop | |
550 | |
551 #define HYBRID_SLP_STMT(S) ((S)->slp_type == hybrid) | |
552 #define PURE_SLP_STMT(S) ((S)->slp_type == pure_slp) | |
553 #define STMT_SLP_TYPE(S) (S)->slp_type | |
554 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
555 #define VECT_MAX_COST 1000 |
0 | 556 |
557 /* The maximum number of intermediate steps required in multi-step type | |
558 conversion. */ | |
559 #define MAX_INTERM_CVT_STEPS 3 | |
560 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
561 /* The maximum vectorization factor supported by any target (V32QI). */ |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
562 #define MAX_VECTORIZATION_FACTOR 32 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
563 |
0 | 564 /* Avoid GTY(()) on stmt_vec_info. */ |
565 typedef void *vec_void_p; | |
566 DEF_VEC_P (vec_void_p); | |
567 DEF_VEC_ALLOC_P (vec_void_p, heap); | |
568 | |
569 extern VEC(vec_void_p,heap) *stmt_vec_info_vec; | |
570 | |
571 void init_stmt_vec_info_vec (void); | |
572 void free_stmt_vec_info_vec (void); | |
573 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
574 /* Return a stmt_vec_info corresponding to STMT. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
575 |
0 | 576 static inline stmt_vec_info |
577 vinfo_for_stmt (gimple stmt) | |
578 { | |
579 unsigned int uid = gimple_uid (stmt); | |
580 if (uid == 0) | |
581 return NULL; | |
582 | |
583 return (stmt_vec_info) VEC_index (vec_void_p, stmt_vec_info_vec, uid - 1); | |
584 } | |
585 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
586 /* Set vectorizer information INFO for STMT. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
587 |
0 | 588 static inline void |
589 set_vinfo_for_stmt (gimple stmt, stmt_vec_info info) | |
590 { | |
591 unsigned int uid = gimple_uid (stmt); | |
592 if (uid == 0) | |
593 { | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
594 gcc_checking_assert (info); |
0 | 595 uid = VEC_length (vec_void_p, stmt_vec_info_vec) + 1; |
596 gimple_set_uid (stmt, uid); | |
597 VEC_safe_push (vec_void_p, heap, stmt_vec_info_vec, (vec_void_p) info); | |
598 } | |
599 else | |
600 VEC_replace (vec_void_p, stmt_vec_info_vec, uid - 1, (vec_void_p) info); | |
601 } | |
602 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
603 /* Return the earlier statement between STMT1 and STMT2. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
604 |
0 | 605 static inline gimple |
606 get_earlier_stmt (gimple stmt1, gimple stmt2) | |
607 { | |
608 unsigned int uid1, uid2; | |
609 | |
610 if (stmt1 == NULL) | |
611 return stmt2; | |
612 | |
613 if (stmt2 == NULL) | |
614 return stmt1; | |
615 | |
616 uid1 = gimple_uid (stmt1); | |
617 uid2 = gimple_uid (stmt2); | |
618 | |
619 if (uid1 == 0 || uid2 == 0) | |
620 return NULL; | |
621 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
622 gcc_checking_assert (uid1 <= VEC_length (vec_void_p, stmt_vec_info_vec) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
623 && uid2 <= VEC_length (vec_void_p, stmt_vec_info_vec)); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
624 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
625 if (uid1 < uid2) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
626 return stmt1; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
627 else |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
628 return stmt2; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
629 } |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
630 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
631 /* Return the later statement between STMT1 and STMT2. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
632 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
633 static inline gimple |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
634 get_later_stmt (gimple stmt1, gimple stmt2) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
635 { |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
636 unsigned int uid1, uid2; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
637 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
638 if (stmt1 == NULL) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
639 return stmt2; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
640 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
641 if (stmt2 == NULL) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
642 return stmt1; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
643 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
644 uid1 = gimple_uid (stmt1); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
645 uid2 = gimple_uid (stmt2); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
646 |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
647 if (uid1 == 0 || uid2 == 0) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
648 return NULL; |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
649 |
0 | 650 gcc_assert (uid1 <= VEC_length (vec_void_p, stmt_vec_info_vec)); |
651 gcc_assert (uid2 <= VEC_length (vec_void_p, stmt_vec_info_vec)); | |
652 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
653 if (uid1 > uid2) |
0 | 654 return stmt1; |
655 else | |
656 return stmt2; | |
657 } | |
658 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
659 /* Return TRUE if a statement represented by STMT_INFO is a part of a |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
660 pattern. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
661 |
0 | 662 static inline bool |
663 is_pattern_stmt_p (stmt_vec_info stmt_info) | |
664 { | |
665 gimple related_stmt; | |
666 stmt_vec_info related_stmt_info; | |
667 | |
668 related_stmt = STMT_VINFO_RELATED_STMT (stmt_info); | |
669 if (related_stmt | |
670 && (related_stmt_info = vinfo_for_stmt (related_stmt)) | |
671 && STMT_VINFO_IN_PATTERN_P (related_stmt_info)) | |
672 return true; | |
673 | |
674 return false; | |
675 } | |
676 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
677 /* Return true if BB is a loop header. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
678 |
0 | 679 static inline bool |
680 is_loop_header_bb_p (basic_block bb) | |
681 { | |
682 if (bb == (bb->loop_father)->header) | |
683 return true; | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
684 gcc_checking_assert (EDGE_COUNT (bb->preds) == 1); |
0 | 685 return false; |
686 } | |
687 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
688 /* Set inside loop vectorization cost. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
689 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
690 static inline void |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
691 stmt_vinfo_set_inside_of_loop_cost (stmt_vec_info stmt_info, slp_tree slp_node, |
0 | 692 int cost) |
693 { | |
694 if (slp_node) | |
695 SLP_TREE_INSIDE_OF_LOOP_COST (slp_node) = cost; | |
696 else | |
697 STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) = cost; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
698 } |
0 | 699 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
700 /* Set inside loop vectorization cost. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
701 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
702 static inline void |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
703 stmt_vinfo_set_outside_of_loop_cost (stmt_vec_info stmt_info, slp_tree slp_node, |
0 | 704 int cost) |
705 { | |
706 if (slp_node) | |
707 SLP_TREE_OUTSIDE_OF_LOOP_COST (slp_node) = cost; | |
708 else | |
709 STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = cost; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
710 } |
0 | 711 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
712 /* Return pow2 (X). */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
713 |
0 | 714 static inline int |
715 vect_pow2 (int x) | |
716 { | |
717 int i, res = 1; | |
718 | |
719 for (i = 0; i < x; i++) | |
720 res *= 2; | |
721 | |
722 return res; | |
723 } | |
724 | |
725 /*-----------------------------------------------------------------*/ | |
726 /* Info on data references alignment. */ | |
727 /*-----------------------------------------------------------------*/ | |
728 | |
729 /* Reflects actual alignment of first access in the vectorized loop, | |
730 taking into account peeling/versioning if applied. */ | |
731 #define DR_MISALIGNMENT(DR) ((int) (size_t) (DR)->aux) | |
732 #define SET_DR_MISALIGNMENT(DR, VAL) ((DR)->aux = (void *) (size_t) (VAL)) | |
733 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
734 /* Return TRUE if the data access is aligned, and FALSE otherwise. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
735 |
0 | 736 static inline bool |
737 aligned_access_p (struct data_reference *data_ref_info) | |
738 { | |
739 return (DR_MISALIGNMENT (data_ref_info) == 0); | |
740 } | |
741 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
742 /* Return TRUE if the alignment of the data access is known, and FALSE |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
743 otherwise. */ |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
744 |
0 | 745 static inline bool |
746 known_alignment_for_access_p (struct data_reference *data_ref_info) | |
747 { | |
748 return (DR_MISALIGNMENT (data_ref_info) != -1); | |
749 } | |
750 | |
751 /* vect_dump will be set to stderr or dump_file if exist. */ | |
752 extern FILE *vect_dump; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
753 extern LOC vect_loop_location; |
0 | 754 |
755 /*-----------------------------------------------------------------*/ | |
756 /* Function prototypes. */ | |
757 /*-----------------------------------------------------------------*/ | |
758 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
759 /* Simple loop peeling and versioning utilities for vectorizer's purposes - |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
760 in tree-vect-loop-manip.c. */ |
0 | 761 extern void slpeel_make_loop_iterate_ntimes (struct loop *, tree); |
762 extern bool slpeel_can_duplicate_loop_p (const struct loop *, const_edge); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
763 extern void vect_loop_versioning (loop_vec_info, bool, tree *, gimple_seq *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
764 extern void vect_do_peeling_for_loop_bound (loop_vec_info, tree *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
765 tree, gimple_seq); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
766 extern void vect_do_peeling_for_alignment (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
767 extern LOC find_loop_location (struct loop *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
768 extern bool vect_can_advance_ivs_p (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
769 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
770 /* In tree-vect-stmts.c. */ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
771 extern unsigned int current_vector_size; |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
772 extern tree get_vectype_for_scalar_type (tree); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
773 extern tree get_same_sized_vectype (tree, tree); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
774 extern bool vect_is_simple_use (tree, loop_vec_info, bb_vec_info, gimple *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
775 tree *, enum vect_def_type *); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
776 extern bool vect_is_simple_use_1 (tree, loop_vec_info, bb_vec_info, gimple *, |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
777 tree *, enum vect_def_type *, tree *); |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
778 extern bool supportable_widening_operation (enum tree_code, gimple, tree, tree, |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
779 tree *, tree *, enum tree_code *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
780 enum tree_code *, int *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
781 VEC (tree, heap) **); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
782 extern bool supportable_narrowing_operation (enum tree_code, tree, tree, |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
783 enum tree_code *, |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
784 int *, VEC (tree, heap) **); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
785 extern stmt_vec_info new_stmt_vec_info (gimple stmt, loop_vec_info, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
786 bb_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
787 extern void free_stmt_vec_info (gimple stmt); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
788 extern tree vectorizable_function (gimple, tree, tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
789 extern void vect_model_simple_cost (stmt_vec_info, int, enum vect_def_type *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
790 slp_tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
791 extern void vect_model_store_cost (stmt_vec_info, int, enum vect_def_type, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
792 slp_tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
793 extern void vect_model_load_cost (stmt_vec_info, int, slp_tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
794 extern void vect_finish_stmt_generation (gimple, gimple, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
795 gimple_stmt_iterator *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
796 extern bool vect_mark_stmts_to_be_vectorized (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
797 extern int cost_for_stmt (gimple); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
798 extern tree vect_get_vec_def_for_operand (tree, gimple, tree *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
799 extern tree vect_init_vector (gimple, tree, tree, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
800 gimple_stmt_iterator *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
801 extern tree vect_get_vec_def_for_stmt_copy (enum vect_def_type, tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
802 extern bool vect_transform_stmt (gimple, gimple_stmt_iterator *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
803 bool *, slp_tree, slp_instance); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
804 extern void vect_remove_stores (gimple); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
805 extern bool vect_analyze_stmt (gimple, bool *, slp_tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
806 extern bool vectorizable_condition (gimple, gimple_stmt_iterator *, gimple *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
807 tree, int); |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
808 extern void vect_get_load_cost (struct data_reference *, int, bool, |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
809 unsigned int *, unsigned int *); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
810 extern void vect_get_store_cost (struct data_reference *, int, unsigned int *); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
811 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
812 /* In tree-vect-data-refs.c. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
813 extern bool vect_can_force_dr_alignment_p (const_tree, unsigned int); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
814 extern enum dr_alignment_support vect_supportable_dr_alignment |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
815 (struct data_reference *, bool); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
816 extern tree vect_get_smallest_scalar_type (gimple, HOST_WIDE_INT *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
817 HOST_WIDE_INT *); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
818 extern bool vect_analyze_data_ref_dependences (loop_vec_info, bb_vec_info, |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
819 int *, bool *); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
820 extern bool vect_enhance_data_refs_alignment (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
821 extern bool vect_analyze_data_refs_alignment (loop_vec_info, bb_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
822 extern bool vect_verify_datarefs_alignment (loop_vec_info, bb_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
823 extern bool vect_analyze_data_ref_accesses (loop_vec_info, bb_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
824 extern bool vect_prune_runtime_alias_test_list (loop_vec_info); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
825 extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
826 extern tree vect_create_data_ref_ptr (gimple, struct loop *, tree, tree *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
827 gimple *, bool, bool *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
828 extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
829 extern tree vect_create_destination_var (tree, tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
830 extern bool vect_strided_store_supported (tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
831 extern bool vect_strided_load_supported (tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
832 extern bool vect_permute_store_chain (VEC(tree,heap) *,unsigned int, gimple, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
833 gimple_stmt_iterator *, VEC(tree,heap) **); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
834 extern tree vect_setup_realignment (gimple, gimple_stmt_iterator *, tree *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
835 enum dr_alignment_support, tree, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
836 struct loop **); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
837 extern bool vect_permute_load_chain (VEC(tree,heap) *,unsigned int, gimple, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
838 gimple_stmt_iterator *, VEC(tree,heap) **); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
839 extern bool vect_transform_strided_load (gimple, VEC(tree,heap) *, int, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
840 gimple_stmt_iterator *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
841 extern int vect_get_place_in_interleaving_chain (gimple, gimple); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
842 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
843 extern tree vect_create_addr_base_for_vector_ref (gimple, gimple_seq *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
844 tree, struct loop *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
845 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
846 /* In tree-vect-loop.c. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
847 /* FORNOW: Used in tree-parloops.c. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
848 extern void destroy_loop_vec_info (loop_vec_info, bool); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
849 extern gimple vect_force_simple_reduction (loop_vec_info, gimple, bool, bool *); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
850 /* Drive for loop analysis stage. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
851 extern loop_vec_info vect_analyze_loop (struct loop *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
852 /* Drive for loop transformation stage. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
853 extern void vect_transform_loop (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
854 extern loop_vec_info vect_analyze_loop_form (struct loop *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
855 extern bool vectorizable_live_operation (gimple, gimple_stmt_iterator *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
856 gimple *); |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
857 extern bool vectorizable_reduction (gimple, gimple_stmt_iterator *, gimple *, |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
858 slp_tree); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
859 extern bool vectorizable_induction (gimple, gimple_stmt_iterator *, gimple *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
860 extern int vect_estimate_min_profitable_iters (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
861 extern tree get_initial_def_for_reduction (gimple, tree, tree *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
862 extern int vect_min_worthwhile_factor (enum tree_code); |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
863 extern int vect_get_known_peeling_cost (loop_vec_info, int, int *, int); |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
864 extern int vect_get_single_scalar_iteraion_cost (loop_vec_info); |
0 | 865 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
866 /* In tree-vect-slp.c. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
867 extern void vect_free_slp_instance (slp_instance); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
868 extern bool vect_transform_slp_perm_load (gimple, VEC (tree, heap) *, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
869 gimple_stmt_iterator *, int, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
870 slp_instance, bool); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
871 extern bool vect_schedule_slp (loop_vec_info, bb_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
872 extern void vect_update_slp_costs_according_to_vf (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
873 extern bool vect_analyze_slp (loop_vec_info, bb_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
874 extern void vect_make_slp_decision (loop_vec_info); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
875 extern void vect_detect_hybrid_slp (loop_vec_info); |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
876 extern void vect_get_slp_defs (tree, tree, slp_tree, VEC (tree,heap) **, |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
877 VEC (tree,heap) **, int); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
878 extern LOC find_bb_location (basic_block); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
879 extern bb_vec_info vect_slp_analyze_bb (basic_block); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
880 extern void vect_slp_transform_bb (basic_block); |
0 | 881 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
882 /* In tree-vect-patterns.c. */ |
0 | 883 /* Pattern recognition functions. |
884 Additional pattern recognition functions can (and will) be added | |
885 in the future. */ | |
886 typedef gimple (* vect_recog_func_ptr) (gimple, tree *, tree *); | |
887 #define NUM_PATTERNS 4 | |
888 void vect_pattern_recog (loop_vec_info); | |
889 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
890 /* In tree-vectorizer.c. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
891 unsigned vectorize_loops (void); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
892 /* Vectorization debug information */ |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
63
diff
changeset
|
893 extern bool vect_print_dump_info (enum vect_verbosity_levels); |
0 | 894 |
895 #endif /* GCC_TREE_VECTORIZER_H */ |