Mercurial > hg > CbC > CbC_gcc
annotate gcc/tree-vectorizer.h @ 130:e108057fa461
merge
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 08:08:40 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
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 |
111 | 2 Copyright (C) 2003-2017 Free Software Foundation, Inc. |
0 | 3 Contributed by Dorit Naishlos <dorit@il.ibm.com> |
4 | |
5 This file is part of GCC. | |
6 | |
7 GCC is free software; you can redistribute it and/or modify it under | |
8 the terms of the GNU General Public License as published by the Free | |
9 Software Foundation; either version 3, or (at your option) any later | |
10 version. | |
11 | |
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with GCC; see the file COPYING3. If not see | |
19 <http://www.gnu.org/licenses/>. */ | |
20 | |
21 #ifndef GCC_TREE_VECTORIZER_H | |
22 #define GCC_TREE_VECTORIZER_H | |
23 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 #include "tree-data-ref.h" |
111 | 25 #include "tree-hash-traits.h" |
26 #include "target.h" | |
0 | 27 |
28 /* Used for naming of new temporaries. */ | |
29 enum vect_var_kind { | |
30 vect_simple_var, | |
31 vect_pointer_var, | |
111 | 32 vect_scalar_var, |
33 vect_mask_var | |
0 | 34 }; |
35 | |
36 /* Defines type of operation. */ | |
37 enum operation_type { | |
38 unary_op = 1, | |
39 binary_op, | |
40 ternary_op | |
41 }; | |
42 | |
43 /* Define type of available alignment support. */ | |
44 enum dr_alignment_support { | |
45 dr_unaligned_unsupported, | |
46 dr_unaligned_supported, | |
47 dr_explicit_realign, | |
48 dr_explicit_realign_optimized, | |
49 dr_aligned | |
50 }; | |
51 | |
52 /* Define type of def-use cross-iteration cycle. */ | |
53 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
|
54 vect_uninitialized_def = 0, |
0 | 55 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
|
56 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
|
57 vect_internal_def, |
0 | 58 vect_induction_def, |
59 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
|
60 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
|
61 vect_nested_cycle, |
0 | 62 vect_unknown_def_type |
63 }; | |
64 | |
111 | 65 /* Define type of reduction. */ |
66 enum vect_reduction_type { | |
67 TREE_CODE_REDUCTION, | |
68 COND_REDUCTION, | |
69 INTEGER_INDUC_COND_REDUCTION, | |
70 CONST_COND_REDUCTION | |
71 }; | |
72 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
73 #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
|
74 || ((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
|
75 || ((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
|
76 |
111 | 77 /* Structure to encapsulate information about a group of like |
78 instructions to be presented to the target cost model. */ | |
79 struct stmt_info_for_cost { | |
80 int count; | |
81 enum vect_cost_for_stmt kind; | |
82 gimple *stmt; | |
83 int misalign; | |
84 }; | |
85 | |
86 typedef vec<stmt_info_for_cost> stmt_vector_for_cost; | |
87 | |
88 /* Maps base addresses to an innermost_loop_behavior that gives the maximum | |
89 known alignment for that base. */ | |
90 typedef hash_map<tree_operand_hash, | |
91 innermost_loop_behavior *> vec_base_alignments; | |
92 | |
0 | 93 /************************************************************************ |
94 SLP | |
95 ************************************************************************/ | |
111 | 96 typedef struct _slp_tree *slp_tree; |
0 | 97 |
111 | 98 /* A computation tree of an SLP instance. Each node corresponds to a group of |
0 | 99 stmts to be packed in a SIMD stmt. */ |
111 | 100 struct _slp_tree { |
101 /* Nodes that contain def-stmts of this node statements operands. */ | |
102 vec<slp_tree> children; | |
0 | 103 /* A group of scalar stmts to be vectorized together. */ |
111 | 104 vec<gimple *> stmts; |
105 /* Load permutation relative to the stores, NULL if there is no | |
106 permutation. */ | |
107 vec<unsigned> load_permutation; | |
0 | 108 /* Vectorized stmt/s. */ |
111 | 109 vec<gimple *> 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
|
110 /* 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
|
111 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
|
112 scalar elements in one scalar iteration (GROUP_SIZE) multiplied by VF |
0 | 113 divided by vector size. */ |
114 unsigned int vec_stmts_size; | |
111 | 115 /* Whether the scalar computations use two different operators. */ |
116 bool two_operators; | |
117 /* The DEF type of this node. */ | |
118 enum vect_def_type def_type; | |
119 }; | |
0 | 120 |
121 | |
122 /* SLP instance is a sequence of stmts in a loop that can be packed into | |
123 SIMD stmts. */ | |
124 typedef struct _slp_instance { | |
125 /* The root of SLP tree. */ | |
126 slp_tree root; | |
127 | |
128 /* Size of groups of scalar stmts that will be replaced by SIMD stmt/s. */ | |
129 unsigned int group_size; | |
130 | |
131 /* The unrolling factor required to vectorized this SLP instance. */ | |
132 unsigned int unrolling_factor; | |
133 | |
111 | 134 /* The group of nodes that contain loads of this SLP instance. */ |
135 vec<slp_tree> loads; | |
0 | 136 |
111 | 137 /* The SLP node containing the reduction PHIs. */ |
138 slp_tree reduc_phis; | |
0 | 139 } *slp_instance; |
140 | |
141 | |
142 /* Access Functions. */ | |
143 #define SLP_INSTANCE_TREE(S) (S)->root | |
144 #define SLP_INSTANCE_GROUP_SIZE(S) (S)->group_size | |
145 #define SLP_INSTANCE_UNROLLING_FACTOR(S) (S)->unrolling_factor | |
146 #define SLP_INSTANCE_LOADS(S) (S)->loads | |
147 | |
111 | 148 #define SLP_TREE_CHILDREN(S) (S)->children |
0 | 149 #define SLP_TREE_SCALAR_STMTS(S) (S)->stmts |
150 #define SLP_TREE_VEC_STMTS(S) (S)->vec_stmts | |
151 #define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size | |
111 | 152 #define SLP_TREE_LOAD_PERMUTATION(S) (S)->load_permutation |
153 #define SLP_TREE_TWO_OPERATORS(S) (S)->two_operators | |
154 #define SLP_TREE_DEF_TYPE(S) (S)->def_type | |
155 | |
0 | 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 |
111 | 158 /* Describes two objects whose addresses must be unequal for the vectorized |
159 loop to be valid. */ | |
160 typedef std::pair<tree, tree> vec_object_pair; | |
161 | |
162 /* Vectorizer state common between loop and basic-block vectorization. */ | |
163 struct vec_info { | |
164 enum vec_kind { bb, loop }; | |
165 | |
166 vec_info (vec_kind, void *); | |
167 ~vec_info (); | |
168 | |
169 /* The type of vectorization. */ | |
170 vec_kind kind; | |
171 | |
172 /* All SLP instances. */ | |
173 auto_vec<slp_instance> slp_instances; | |
174 | |
175 /* All data references. Freed by free_data_refs, so not an auto_vec. */ | |
176 vec<data_reference_p> datarefs; | |
177 | |
178 /* Maps base addresses to an innermost_loop_behavior that gives the maximum | |
179 known alignment for that base. */ | |
180 vec_base_alignments base_alignments; | |
181 | |
182 /* All data dependences. Freed by free_dependence_relations, so not | |
183 an auto_vec. */ | |
184 vec<ddr_p> ddrs; | |
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
|
185 |
111 | 186 /* All interleaving chains of stores, represented by the first |
187 stmt in the chain. */ | |
188 auto_vec<gimple *> grouped_stores; | |
189 | |
190 /* Cost data used by the target cost model. */ | |
191 void *target_cost_data; | |
192 }; | |
193 | |
194 struct _loop_vec_info; | |
195 struct _bb_vec_info; | |
196 | |
197 template<> | |
198 template<> | |
199 inline bool | |
200 is_a_helper <_loop_vec_info *>::test (vec_info *i) | |
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
|
201 { |
111 | 202 return i->kind == vec_info::loop; |
203 } | |
204 | |
205 template<> | |
206 template<> | |
207 inline bool | |
208 is_a_helper <_bb_vec_info *>::test (vec_info *i) | |
209 { | |
210 return i->kind == vec_info::bb; | |
211 } | |
212 | |
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
|
213 |
0 | 214 /*-----------------------------------------------------------------*/ |
215 /* Info on vectorized loops. */ | |
216 /*-----------------------------------------------------------------*/ | |
111 | 217 typedef struct _loop_vec_info : public vec_info { |
218 _loop_vec_info (struct loop *); | |
219 ~_loop_vec_info (); | |
0 | 220 |
221 /* The loop to which this info struct refers to. */ | |
222 struct loop *loop; | |
223 | |
224 /* The loop basic blocks. */ | |
225 basic_block *bbs; | |
226 | |
111 | 227 /* Number of latch executions. */ |
228 tree num_itersm1; | |
0 | 229 /* Number of iterations. */ |
230 tree num_iters; | |
111 | 231 /* Number of iterations of the original loop. */ |
0 | 232 tree num_iters_unchanged; |
111 | 233 /* Condition under which this loop is analyzed and versioned. */ |
234 tree num_iters_assumptions; | |
0 | 235 |
111 | 236 /* Threshold of number of iterations below which vectorzation will not be |
237 performed. It is calculated from MIN_PROFITABLE_ITERS and | |
238 PARAM_MIN_VECT_LOOP_BOUND. */ | |
239 unsigned int th; | |
0 | 240 |
241 /* Unrolling factor */ | |
242 int vectorization_factor; | |
243 | |
111 | 244 /* Maximum runtime vectorization factor, or MAX_VECTORIZATION_FACTOR |
245 if there is no particular limit. */ | |
246 unsigned HOST_WIDE_INT max_vectorization_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 |
0 | 248 /* Unknown DRs according to which loop was peeled. */ |
249 struct data_reference *unaligned_dr; | |
250 | |
251 /* peeling_for_alignment indicates whether peeling for alignment will take | |
252 place, and what the peeling factor should be: | |
253 peeling_for_alignment = X means: | |
254 If X=0: Peeling for alignment will not be applied. | |
255 If X>0: Peel first X iterations. | |
256 If X=-1: Generate a runtime test to calculate the number of iterations | |
257 to be peeled, using the dataref recorded in the field | |
258 unaligned_dr. */ | |
259 int peeling_for_alignment; | |
260 | |
261 /* The mask used to check the alignment of pointers or arrays. */ | |
262 int ptr_mask; | |
263 | |
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
|
264 /* The loop nest in which the data dependences are computed. */ |
111 | 265 auto_vec<loop_p> loop_nest; |
0 | 266 |
267 /* Data Dependence Relations defining address ranges that are candidates | |
268 for a run-time aliasing check. */ | |
111 | 269 auto_vec<ddr_p> may_alias_ddrs; |
270 | |
271 /* Data Dependence Relations defining address ranges together with segment | |
272 lengths from which the run-time aliasing check is built. */ | |
273 auto_vec<dr_with_seg_len_pair_t> comp_alias_ddrs; | |
274 | |
275 /* Check that the addresses of each pair of objects is unequal. */ | |
276 auto_vec<vec_object_pair> check_unequal_addrs; | |
0 | 277 |
278 /* Statements in the loop that have data references that are candidates for a | |
279 runtime (loop versioning) misalignment check. */ | |
111 | 280 auto_vec<gimple *> may_misalign_stmts; |
0 | 281 |
111 | 282 /* Reduction cycles detected in the loop. Used in loop-aware SLP. */ |
283 auto_vec<gimple *> reductions; | |
284 | |
285 /* All reduction chains in the loop, represented by the first | |
0 | 286 stmt in the chain. */ |
111 | 287 auto_vec<gimple *> reduction_chains; |
0 | 288 |
111 | 289 /* Cost vector for a single scalar iteration. */ |
290 auto_vec<stmt_info_for_cost> scalar_cost_vec; | |
0 | 291 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
292 /* The unrolling factor needed to SLP the loop. In case of that pure SLP is |
0 | 293 applied to the loop, i.e., no unrolling is needed, this is 1. */ |
294 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
|
295 |
111 | 296 /* Cost of a single scalar iteration. */ |
297 int single_scalar_iteration_cost; | |
298 | |
299 /* Is the loop vectorizable? */ | |
300 bool vectorizable; | |
301 | |
302 /* When we have grouped data accesses with gaps, we may introduce invalid | |
303 memory accesses. We peel the last iteration of the loop to prevent | |
304 this. */ | |
305 bool peeling_for_gaps; | |
306 | |
307 /* When the number of iterations is not a multiple of the vector size | |
308 we need to peel off iterations at the end to form an epilogue loop. */ | |
309 bool peeling_for_niter; | |
310 | |
311 /* Reductions are canonicalized so that the last operand is the reduction | |
312 operand. If this places a constant into RHS1, this decanonicalizes | |
313 GIMPLE for other phases, so we must track when this has occurred and | |
314 fix it up. */ | |
315 bool operands_swapped; | |
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
|
316 |
111 | 317 /* True if there are no loop carried data dependencies in the loop. |
318 If loop->safelen <= 1, then this is always true, either the loop | |
319 didn't have any loop carried data dependencies, or the loop is being | |
320 vectorized guarded with some runtime alias checks, or couldn't | |
321 be vectorized at all, but then this field shouldn't be used. | |
322 For loop->safelen >= 2, the user has asserted that there are no | |
323 backward dependencies, but there still could be loop carried forward | |
324 dependencies in such loops. This flag will be false if normal | |
325 vectorizer data dependency analysis would fail or require versioning | |
326 for alias, but because of loop->safelen >= 2 it has been vectorized | |
327 even without versioning for alias. E.g. in: | |
328 #pragma omp simd | |
329 for (int i = 0; i < m; i++) | |
330 a[i] = a[i + k] * c; | |
331 (or #pragma simd or #pragma ivdep) we can vectorize this and it will | |
332 DTRT even for k > 0 && k < m, but without safelen we would not | |
333 vectorize this, so this field would be false. */ | |
334 bool no_data_dependencies; | |
335 | |
336 /* Mark loops having masked stores. */ | |
337 bool has_mask_store; | |
338 | |
339 /* If if-conversion versioned this loop before conversion, this is the | |
340 loop version without if-conversion. */ | |
341 struct loop *scalar_loop; | |
342 | |
343 /* For loops being epilogues of already vectorized loops | |
344 this points to the original vectorized loop. Otherwise NULL. */ | |
345 _loop_vec_info *orig_loop_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
|
346 |
0 | 347 } *loop_vec_info; |
348 | |
349 /* 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
|
350 #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
|
351 #define LOOP_VINFO_BBS(L) (L)->bbs |
111 | 352 #define LOOP_VINFO_NITERSM1(L) (L)->num_itersm1 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
353 #define LOOP_VINFO_NITERS(L) (L)->num_iters |
111 | 354 /* Since LOOP_VINFO_NITERS and LOOP_VINFO_NITERSM1 can change after |
355 prologue peeling retain total unchanged scalar loop iterations for | |
356 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
|
357 #define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged |
111 | 358 #define LOOP_VINFO_NITERS_ASSUMPTIONS(L) (L)->num_iters_assumptions |
359 #define LOOP_VINFO_COST_MODEL_THRESHOLD(L) (L)->th | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
360 #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
|
361 #define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor |
111 | 362 #define LOOP_VINFO_MAX_VECT_FACTOR(L) (L)->max_vectorization_factor |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
363 #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
|
364 #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
|
365 #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
|
366 #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
|
367 #define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters)) |
111 | 368 #define LOOP_VINFO_PEELING_FOR_ALIGNMENT(L) (L)->peeling_for_alignment |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
369 #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
|
370 #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
|
371 #define LOOP_VINFO_MAY_ALIAS_DDRS(L) (L)->may_alias_ddrs |
111 | 372 #define LOOP_VINFO_COMP_ALIAS_DDRS(L) (L)->comp_alias_ddrs |
373 #define LOOP_VINFO_CHECK_UNEQUAL_ADDRS(L) (L)->check_unequal_addrs | |
374 #define LOOP_VINFO_GROUPED_STORES(L) (L)->grouped_stores | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
375 #define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances |
0 | 376 #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
|
377 #define LOOP_VINFO_REDUCTIONS(L) (L)->reductions |
111 | 378 #define LOOP_VINFO_REDUCTION_CHAINS(L) (L)->reduction_chains |
379 #define LOOP_VINFO_TARGET_COST_DATA(L) (L)->target_cost_data | |
380 #define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps | |
381 #define LOOP_VINFO_OPERANDS_SWAPPED(L) (L)->operands_swapped | |
382 #define LOOP_VINFO_PEELING_FOR_NITER(L) (L)->peeling_for_niter | |
383 #define LOOP_VINFO_NO_DATA_DEPENDENCIES(L) (L)->no_data_dependencies | |
384 #define LOOP_VINFO_SCALAR_LOOP(L) (L)->scalar_loop | |
385 #define LOOP_VINFO_HAS_MASK_STORE(L) (L)->has_mask_store | |
386 #define LOOP_VINFO_SCALAR_ITERATION_COST(L) (L)->scalar_cost_vec | |
387 #define LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST(L) (L)->single_scalar_iteration_cost | |
388 #define LOOP_VINFO_ORIG_LOOP_INFO(L) (L)->orig_loop_info | |
0 | 389 |
111 | 390 #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \ |
391 ((L)->may_misalign_stmts.length () > 0) | |
392 #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \ | |
393 ((L)->comp_alias_ddrs.length () > 0 \ | |
394 || (L)->check_unequal_addrs.length () > 0) | |
395 #define LOOP_REQUIRES_VERSIONING_FOR_NITERS(L) \ | |
396 (LOOP_VINFO_NITERS_ASSUMPTIONS (L)) | |
397 #define LOOP_REQUIRES_VERSIONING(L) \ | |
398 (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (L) \ | |
399 || LOOP_REQUIRES_VERSIONING_FOR_ALIAS (L) \ | |
400 || LOOP_REQUIRES_VERSIONING_FOR_NITERS (L)) | |
0 | 401 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
402 #define LOOP_VINFO_NITERS_KNOWN_P(L) \ |
111 | 403 (tree_fits_shwi_p ((L)->num_iters) && tree_to_shwi ((L)->num_iters) > 0) |
404 | |
405 #define LOOP_VINFO_EPILOGUE_P(L) \ | |
406 (LOOP_VINFO_ORIG_LOOP_INFO (L) != NULL) | |
407 | |
408 #define LOOP_VINFO_ORIG_MAX_VECT_FACTOR(L) \ | |
409 (LOOP_VINFO_MAX_VECT_FACTOR (LOOP_VINFO_ORIG_LOOP_INFO (L))) | |
0 | 410 |
411 static inline loop_vec_info | |
412 loop_vec_info_for_loop (struct loop *loop) | |
413 { | |
414 return (loop_vec_info) loop->aux; | |
415 } | |
416 | |
417 static inline bool | |
111 | 418 nested_in_vect_loop_p (struct loop *loop, gimple *stmt) |
0 | 419 { |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
420 return (loop->inner |
0 | 421 && (loop->inner == (gimple_bb (stmt))->loop_father)); |
422 } | |
423 | |
111 | 424 typedef struct _bb_vec_info : public vec_info |
425 { | |
426 _bb_vec_info (gimple_stmt_iterator, gimple_stmt_iterator); | |
427 ~_bb_vec_info (); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
428 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
429 basic_block bb; |
111 | 430 gimple_stmt_iterator region_begin; |
431 gimple_stmt_iterator region_end; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
432 } *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
|
433 |
111 | 434 #define BB_VINFO_BB(B) (B)->bb |
435 #define BB_VINFO_GROUPED_STORES(B) (B)->grouped_stores | |
436 #define BB_VINFO_SLP_INSTANCES(B) (B)->slp_instances | |
437 #define BB_VINFO_DATAREFS(B) (B)->datarefs | |
438 #define BB_VINFO_DDRS(B) (B)->ddrs | |
439 #define BB_VINFO_TARGET_COST_DATA(B) (B)->target_cost_data | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
440 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
441 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
|
442 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
|
443 { |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
444 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
|
445 } |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
446 |
0 | 447 /*-----------------------------------------------------------------*/ |
448 /* Info on vectorized defs. */ | |
449 /*-----------------------------------------------------------------*/ | |
450 enum stmt_vec_info_type { | |
451 undef_vec_info_type = 0, | |
452 load_vec_info_type, | |
453 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
|
454 shift_vec_info_type, |
0 | 455 op_vec_info_type, |
456 call_vec_info_type, | |
111 | 457 call_simd_clone_vec_info_type, |
0 | 458 assignment_vec_info_type, |
459 condition_vec_info_type, | |
111 | 460 comparison_vec_info_type, |
0 | 461 reduc_vec_info_type, |
462 induc_vec_info_type, | |
463 type_promotion_vec_info_type, | |
464 type_demotion_vec_info_type, | |
465 type_conversion_vec_info_type, | |
466 loop_exit_ctrl_vec_info_type | |
467 }; | |
468 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
469 /* 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
|
470 block. */ |
0 | 471 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
|
472 vect_unused_in_scope = 0, |
111 | 473 |
474 /* The def is only used outside the loop. */ | |
475 vect_used_only_live, | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
476 /* 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
|
477 use is a reduction stmt. */ |
0 | 478 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
|
479 /* 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
|
480 not part of reduction). */ |
0 | 481 vect_used_in_outer, |
482 | |
483 /* 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
|
484 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
|
485 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
|
486 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
|
487 to identify computations that we can change the order in which they are |
0 | 488 computed. */ |
489 vect_used_by_reduction, | |
490 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
491 vect_used_in_scope |
0 | 492 }; |
493 | |
494 /* The type of vectorization that can be applied to the stmt: regular loop-based | |
495 vectorization; pure SLP - the stmt is a part of SLP instances and does not | |
496 have uses outside SLP instances; or hybrid SLP and loop-based - the stmt is | |
497 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
|
498 uses outside SLP sequences. |
0 | 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 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
|
501 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
|
502 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
|
503 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
|
504 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
|
505 Loop hybrid SLP means that we exploit both intra-iteration and |
0 | 506 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
|
507 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
|
508 within an iteration, so we obtain the rest of the parallelism from subsequent |
0 | 509 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
|
510 enum slp_vect_type { |
0 | 511 loop_vect = 0, |
512 pure_slp, | |
513 hybrid | |
514 }; | |
515 | |
111 | 516 /* Describes how we're going to vectorize an individual load or store, |
517 or a group of loads or stores. */ | |
518 enum vect_memory_access_type { | |
519 /* An access to an invariant address. This is used only for loads. */ | |
520 VMAT_INVARIANT, | |
521 | |
522 /* A simple contiguous access. */ | |
523 VMAT_CONTIGUOUS, | |
524 | |
525 /* A contiguous access that goes down in memory rather than up, | |
526 with no additional permutation. This is used only for stores | |
527 of invariants. */ | |
528 VMAT_CONTIGUOUS_DOWN, | |
529 | |
530 /* A simple contiguous access in which the elements need to be permuted | |
531 after loading or before storing. Only used for loop vectorization; | |
532 SLP uses separate permutes. */ | |
533 VMAT_CONTIGUOUS_PERMUTE, | |
534 | |
535 /* A simple contiguous access in which the elements need to be reversed | |
536 after loading or before storing. */ | |
537 VMAT_CONTIGUOUS_REVERSE, | |
538 | |
539 /* An access that uses IFN_LOAD_LANES or IFN_STORE_LANES. */ | |
540 VMAT_LOAD_STORE_LANES, | |
541 | |
542 /* An access in which each scalar element is loaded or stored | |
543 individually. */ | |
544 VMAT_ELEMENTWISE, | |
545 | |
546 /* A hybrid of VMAT_CONTIGUOUS and VMAT_ELEMENTWISE, used for grouped | |
547 SLP accesses. Each unrolled iteration uses a contiguous load | |
548 or store for the whole group, but the groups from separate iterations | |
549 are combined in the same way as for VMAT_ELEMENTWISE. */ | |
550 VMAT_STRIDED_SLP, | |
551 | |
552 /* The access uses gather loads or scatter stores. */ | |
553 VMAT_GATHER_SCATTER | |
554 }; | |
0 | 555 |
556 typedef struct data_reference *dr_p; | |
557 | |
558 typedef struct _stmt_vec_info { | |
559 | |
560 enum stmt_vec_info_type type; | |
561 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
562 /* 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
|
563 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
|
564 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
|
565 |
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
566 /* 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
|
567 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
|
568 |
111 | 569 /* Is this statement vectorizable or should it be skipped in (partial) |
570 vectorization. */ | |
571 bool vectorizable; | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
572 |
0 | 573 /* The stmt to which this info struct refers to. */ |
111 | 574 gimple *stmt; |
0 | 575 |
111 | 576 /* The vec_info with respect to which STMT is vectorized. */ |
577 vec_info *vinfo; | |
0 | 578 |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
579 /* The vector type to be used for the LHS of this statement. */ |
0 | 580 tree vectype; |
581 | |
582 /* The vectorized version of the stmt. */ | |
111 | 583 gimple *vectorized_stmt; |
0 | 584 |
585 | |
111 | 586 /* 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
|
587 data-ref (array/pointer/struct access). A GIMPLE stmt is expected to have |
111 | 588 at most one such data-ref. */ |
0 | 589 |
590 /* Information about the data-ref (access function, etc), | |
591 relative to the inner-most containing loop. */ | |
592 struct data_reference *data_ref_info; | |
593 | |
594 /* Information about the data-ref relative to this loop | |
595 nest (the loop that is being considered for vectorization). */ | |
111 | 596 innermost_loop_behavior dr_wrt_vec_loop; |
597 | |
598 /* For loop PHI nodes, the base and evolution part of it. This makes sure | |
599 this information is still available in vect_update_ivs_after_vectorizer | |
600 where we may not be able to re-analyze the PHI nodes evolution as | |
601 peeling for the prologue loop can make it unanalyzable. The evolution | |
602 part is still correct after peeling, but the base may have changed from | |
603 the version here. */ | |
604 tree loop_phi_evolution_base_unchanged; | |
605 tree loop_phi_evolution_part; | |
0 | 606 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
607 /* 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
|
608 some other stmt S that is in some way "related" to this stmt. |
0 | 609 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
|
610 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
|
611 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
|
612 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
|
613 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
|
614 the last stmt in the original sequence of stmts that constitutes the |
0 | 615 pattern). */ |
111 | 616 gimple *related_stmt; |
617 | |
618 /* Used to keep a sequence of def stmts of a pattern stmt if such exists. */ | |
619 gimple_seq pattern_def_seq; | |
0 | 620 |
621 /* List of datarefs that are known to have the same alignment as the dataref | |
622 of this stmt. */ | |
111 | 623 vec<dr_p> same_align_refs; |
624 | |
625 /* Selected SIMD clone's function info. First vector element | |
626 is SIMD clone's function decl, followed by a pair of trees (base + step) | |
627 for linear arguments (pair of NULLs for other arguments). */ | |
628 vec<tree> simd_clone_info; | |
0 | 629 |
630 /* Classify the def of this stmt. */ | |
631 enum vect_def_type def_type; | |
632 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
633 /* 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
|
634 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
|
635 |
111 | 636 /* Interleaving and reduction chains info. */ |
637 /* First element in the group. */ | |
638 gimple *first_element; | |
639 /* Pointer to the next element in the group. */ | |
640 gimple *next_element; | |
641 /* For data-refs, in case that two or more stmts share data-ref, this is the | |
642 pointer to the previously detected stmt with the same dr. */ | |
643 gimple *same_dr_stmt; | |
644 /* The size of the group. */ | |
0 | 645 unsigned int size; |
646 /* For stores, number of stores from this group seen. We vectorize the last | |
647 one. */ | |
648 unsigned int store_count; | |
649 /* For loads only, the gap from the previous load. For consecutive loads, GAP | |
650 is 1. */ | |
651 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
|
652 |
111 | 653 /* The minimum negative dependence distance this stmt participates in |
654 or zero if none. */ | |
655 unsigned int min_neg_dist; | |
656 | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
657 /* 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
|
658 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
|
659 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
|
660 enum vect_relevant relevant; |
0 | 661 |
111 | 662 /* For loads if this is a gather, for stores if this is a scatter. */ |
663 bool gather_scatter_p; | |
664 | |
665 /* True if this is an access with loop-invariant stride. */ | |
666 bool strided_p; | |
667 | |
668 /* For both loads and stores. */ | |
669 bool simd_lane_access_p; | |
670 | |
671 /* Classifies how the load or store is going to be implemented | |
672 for loop vectorization. */ | |
673 vect_memory_access_type memory_access_type; | |
674 | |
675 /* For reduction loops, this is the type of reduction. */ | |
676 enum vect_reduction_type v_reduc_type; | |
677 | |
678 /* For CONST_COND_REDUCTION, record the reduc code. */ | |
679 enum tree_code const_cond_reduc_code; | |
680 | |
681 /* On a reduction PHI the reduction type as detected by | |
682 vect_force_simple_reduction. */ | |
683 enum vect_reduction_type reduc_type; | |
0 | 684 |
111 | 685 /* On a reduction PHI the def returned by vect_force_simple_reduction. |
686 On the def returned by vect_force_simple_reduction the | |
687 corresponding PHI. */ | |
688 gimple *reduc_def; | |
689 | |
690 /* The number of scalar stmt references from active SLP instances. */ | |
691 unsigned int num_slp_uses; | |
692 } *stmt_vec_info; | |
693 | |
694 /* Information about a gather/scatter call. */ | |
695 struct gather_scatter_info { | |
696 /* The FUNCTION_DECL for the built-in gather/scatter function. */ | |
697 tree decl; | |
63
b7f97abdc517
update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
698 |
111 | 699 /* The loop-invariant base value. */ |
700 tree base; | |
701 | |
702 /* The original scalar offset, which is a non-loop-invariant SSA_NAME. */ | |
703 tree offset; | |
704 | |
705 /* Each offset element should be multiplied by this amount before | |
706 being added to the base. */ | |
707 int scale; | |
708 | |
709 /* The definition type for the vectorized offset. */ | |
710 enum vect_def_type offset_dt; | |
711 | |
712 /* The type of the vectorized offset. */ | |
713 tree offset_vectype; | |
714 }; | |
0 | 715 |
716 /* Access Functions. */ | |
717 #define STMT_VINFO_TYPE(S) (S)->type | |
718 #define STMT_VINFO_STMT(S) (S)->stmt | |
111 | 719 inline loop_vec_info |
720 STMT_VINFO_LOOP_VINFO (stmt_vec_info stmt_vinfo) | |
721 { | |
722 if (loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (stmt_vinfo->vinfo)) | |
723 return loop_vinfo; | |
724 return NULL; | |
725 } | |
726 inline bb_vec_info | |
727 STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo) | |
728 { | |
729 if (bb_vec_info bb_vinfo = dyn_cast <bb_vec_info> (stmt_vinfo->vinfo)) | |
730 return bb_vinfo; | |
731 return NULL; | |
732 } | |
0 | 733 #define STMT_VINFO_RELEVANT(S) (S)->relevant |
734 #define STMT_VINFO_LIVE_P(S) (S)->live | |
735 #define STMT_VINFO_VECTYPE(S) (S)->vectype | |
736 #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
|
737 #define STMT_VINFO_VECTORIZABLE(S) (S)->vectorizable |
0 | 738 #define STMT_VINFO_DATA_REF(S) (S)->data_ref_info |
111 | 739 #define STMT_VINFO_GATHER_SCATTER_P(S) (S)->gather_scatter_p |
740 #define STMT_VINFO_STRIDED_P(S) (S)->strided_p | |
741 #define STMT_VINFO_MEMORY_ACCESS_TYPE(S) (S)->memory_access_type | |
742 #define STMT_VINFO_SIMD_LANE_ACCESS_P(S) (S)->simd_lane_access_p | |
743 #define STMT_VINFO_VEC_REDUCTION_TYPE(S) (S)->v_reduc_type | |
744 #define STMT_VINFO_VEC_CONST_COND_REDUC_CODE(S) (S)->const_cond_reduc_code | |
0 | 745 |
111 | 746 #define STMT_VINFO_DR_WRT_VEC_LOOP(S) (S)->dr_wrt_vec_loop |
747 #define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_wrt_vec_loop.base_address | |
748 #define STMT_VINFO_DR_INIT(S) (S)->dr_wrt_vec_loop.init | |
749 #define STMT_VINFO_DR_OFFSET(S) (S)->dr_wrt_vec_loop.offset | |
750 #define STMT_VINFO_DR_STEP(S) (S)->dr_wrt_vec_loop.step | |
751 #define STMT_VINFO_DR_BASE_ALIGNMENT(S) (S)->dr_wrt_vec_loop.base_alignment | |
752 #define STMT_VINFO_DR_BASE_MISALIGNMENT(S) \ | |
753 (S)->dr_wrt_vec_loop.base_misalignment | |
754 #define STMT_VINFO_DR_OFFSET_ALIGNMENT(S) \ | |
755 (S)->dr_wrt_vec_loop.offset_alignment | |
756 #define STMT_VINFO_DR_STEP_ALIGNMENT(S) \ | |
757 (S)->dr_wrt_vec_loop.step_alignment | |
0 | 758 |
759 #define STMT_VINFO_IN_PATTERN_P(S) (S)->in_pattern_p | |
760 #define STMT_VINFO_RELATED_STMT(S) (S)->related_stmt | |
111 | 761 #define STMT_VINFO_PATTERN_DEF_SEQ(S) (S)->pattern_def_seq |
0 | 762 #define STMT_VINFO_SAME_ALIGN_REFS(S) (S)->same_align_refs |
111 | 763 #define STMT_VINFO_SIMD_CLONE_INFO(S) (S)->simd_clone_info |
0 | 764 #define STMT_VINFO_DEF_TYPE(S) (S)->def_type |
111 | 765 #define STMT_VINFO_GROUP_FIRST_ELEMENT(S) (S)->first_element |
766 #define STMT_VINFO_GROUP_NEXT_ELEMENT(S) (S)->next_element | |
767 #define STMT_VINFO_GROUP_SIZE(S) (S)->size | |
768 #define STMT_VINFO_GROUP_STORE_COUNT(S) (S)->store_count | |
769 #define STMT_VINFO_GROUP_GAP(S) (S)->gap | |
770 #define STMT_VINFO_GROUP_SAME_DR_STMT(S) (S)->same_dr_stmt | |
771 #define STMT_VINFO_GROUPED_ACCESS(S) ((S)->first_element != NULL && (S)->data_ref_info) | |
772 #define STMT_VINFO_LOOP_PHI_EVOLUTION_BASE_UNCHANGED(S) (S)->loop_phi_evolution_base_unchanged | |
773 #define STMT_VINFO_LOOP_PHI_EVOLUTION_PART(S) (S)->loop_phi_evolution_part | |
774 #define STMT_VINFO_MIN_NEG_DIST(S) (S)->min_neg_dist | |
775 #define STMT_VINFO_NUM_SLP_USES(S) (S)->num_slp_uses | |
776 #define STMT_VINFO_REDUC_TYPE(S) (S)->reduc_type | |
777 #define STMT_VINFO_REDUC_DEF(S) (S)->reduc_def | |
0 | 778 |
111 | 779 #define GROUP_FIRST_ELEMENT(S) (S)->first_element |
780 #define GROUP_NEXT_ELEMENT(S) (S)->next_element | |
781 #define GROUP_SIZE(S) (S)->size | |
782 #define GROUP_STORE_COUNT(S) (S)->store_count | |
783 #define GROUP_GAP(S) (S)->gap | |
784 #define GROUP_SAME_DR_STMT(S) (S)->same_dr_stmt | |
0 | 785 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
786 #define STMT_VINFO_RELEVANT_P(S) ((S)->relevant != vect_unused_in_scope) |
0 | 787 |
788 #define HYBRID_SLP_STMT(S) ((S)->slp_type == hybrid) | |
789 #define PURE_SLP_STMT(S) ((S)->slp_type == pure_slp) | |
790 #define STMT_SLP_TYPE(S) (S)->slp_type | |
791 | |
111 | 792 struct dataref_aux { |
793 /* The misalignment in bytes of the reference, or -1 if not known. */ | |
794 int misalignment; | |
795 /* The byte alignment that we'd ideally like the reference to have, | |
796 and the value that misalignment is measured against. */ | |
797 int target_alignment; | |
798 /* If true the alignment of base_decl needs to be increased. */ | |
799 bool base_misaligned; | |
800 tree base_decl; | |
801 }; | |
802 | |
803 #define DR_VECT_AUX(dr) ((dataref_aux *)(dr)->aux) | |
804 | |
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
|
805 #define VECT_MAX_COST 1000 |
0 | 806 |
807 /* The maximum number of intermediate steps required in multi-step type | |
808 conversion. */ | |
809 #define MAX_INTERM_CVT_STEPS 3 | |
810 | |
111 | 811 /* The maximum vectorization factor supported by any target (V64QI). */ |
812 #define MAX_VECTORIZATION_FACTOR 64 | |
813 | |
814 /* Nonzero if TYPE represents a (scalar) boolean type or type | |
815 in the middle-end compatible with it (unsigned precision 1 integral | |
816 types). Used to determine which types should be vectorized as | |
817 VECTOR_BOOLEAN_TYPE_P. */ | |
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 |
111 | 819 #define VECT_SCALAR_BOOLEAN_TYPE_P(TYPE) \ |
820 (TREE_CODE (TYPE) == BOOLEAN_TYPE \ | |
821 || ((TREE_CODE (TYPE) == INTEGER_TYPE \ | |
822 || TREE_CODE (TYPE) == ENUMERAL_TYPE) \ | |
823 && TYPE_PRECISION (TYPE) == 1 \ | |
824 && TYPE_UNSIGNED (TYPE))) | |
0 | 825 |
111 | 826 extern vec<stmt_vec_info> stmt_vec_info_vec; |
0 | 827 |
828 void init_stmt_vec_info_vec (void); | |
829 void free_stmt_vec_info_vec (void); | |
830 | |
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
|
831 /* 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
|
832 |
0 | 833 static inline stmt_vec_info |
111 | 834 vinfo_for_stmt (gimple *stmt) |
0 | 835 { |
111 | 836 int uid = gimple_uid (stmt); |
837 if (uid <= 0) | |
0 | 838 return NULL; |
839 | |
111 | 840 return stmt_vec_info_vec[uid - 1]; |
0 | 841 } |
842 | |
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
|
843 /* 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
|
844 |
0 | 845 static inline void |
111 | 846 set_vinfo_for_stmt (gimple *stmt, stmt_vec_info info) |
0 | 847 { |
848 unsigned int uid = gimple_uid (stmt); | |
849 if (uid == 0) | |
850 { | |
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
|
851 gcc_checking_assert (info); |
111 | 852 uid = stmt_vec_info_vec.length () + 1; |
0 | 853 gimple_set_uid (stmt, uid); |
111 | 854 stmt_vec_info_vec.safe_push (info); |
0 | 855 } |
856 else | |
111 | 857 { |
858 gcc_checking_assert (info == NULL); | |
859 stmt_vec_info_vec[uid - 1] = info; | |
860 } | |
0 | 861 } |
862 | |
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 /* 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
|
864 |
111 | 865 static inline gimple * |
866 get_earlier_stmt (gimple *stmt1, gimple *stmt2) | |
0 | 867 { |
868 unsigned int uid1, uid2; | |
869 | |
870 if (stmt1 == NULL) | |
871 return stmt2; | |
872 | |
873 if (stmt2 == NULL) | |
874 return stmt1; | |
875 | |
876 uid1 = gimple_uid (stmt1); | |
877 uid2 = gimple_uid (stmt2); | |
878 | |
879 if (uid1 == 0 || uid2 == 0) | |
880 return NULL; | |
881 | |
111 | 882 gcc_checking_assert (uid1 <= stmt_vec_info_vec.length () |
883 && uid2 <= stmt_vec_info_vec.length ()); | |
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
|
884 |
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
|
885 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
|
886 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
|
887 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
|
888 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
|
889 } |
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
|
890 |
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
|
891 /* 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
|
892 |
111 | 893 static inline gimple * |
894 get_later_stmt (gimple *stmt1, gimple *stmt2) | |
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
|
895 { |
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
|
896 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
|
897 |
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
|
898 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
|
899 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
|
900 |
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
|
901 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
|
902 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
|
903 |
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
|
904 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
|
905 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
|
906 |
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
|
907 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
|
908 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
|
909 |
111 | 910 gcc_assert (uid1 <= stmt_vec_info_vec.length ()); |
911 gcc_assert (uid2 <= stmt_vec_info_vec.length ()); | |
0 | 912 |
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
|
913 if (uid1 > uid2) |
0 | 914 return stmt1; |
915 else | |
916 return stmt2; | |
917 } | |
918 | |
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
|
919 /* 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
|
920 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
|
921 |
0 | 922 static inline bool |
923 is_pattern_stmt_p (stmt_vec_info stmt_info) | |
924 { | |
111 | 925 gimple *related_stmt; |
0 | 926 stmt_vec_info related_stmt_info; |
927 | |
928 related_stmt = STMT_VINFO_RELATED_STMT (stmt_info); | |
929 if (related_stmt | |
930 && (related_stmt_info = vinfo_for_stmt (related_stmt)) | |
931 && STMT_VINFO_IN_PATTERN_P (related_stmt_info)) | |
932 return true; | |
933 | |
934 return false; | |
935 } | |
936 | |
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
|
937 /* 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
|
938 |
0 | 939 static inline bool |
940 is_loop_header_bb_p (basic_block bb) | |
941 { | |
942 if (bb == (bb->loop_father)->header) | |
943 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
|
944 gcc_checking_assert (EDGE_COUNT (bb->preds) == 1); |
0 | 945 return false; |
946 } | |
947 | |
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
|
948 /* 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
|
949 |
0 | 950 static inline int |
951 vect_pow2 (int x) | |
952 { | |
953 int i, res = 1; | |
954 | |
955 for (i = 0; i < x; i++) | |
956 res *= 2; | |
957 | |
958 return res; | |
959 } | |
960 | |
111 | 961 /* Alias targetm.vectorize.builtin_vectorization_cost. */ |
962 | |
963 static inline int | |
964 builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, | |
965 tree vectype, int misalign) | |
966 { | |
967 return targetm.vectorize.builtin_vectorization_cost (type_of_cost, | |
968 vectype, misalign); | |
969 } | |
970 | |
971 /* Get cost by calling cost target builtin. */ | |
972 | |
973 static inline | |
974 int vect_get_stmt_cost (enum vect_cost_for_stmt type_of_cost) | |
975 { | |
976 return builtin_vectorization_cost (type_of_cost, NULL, 0); | |
977 } | |
978 | |
979 /* Alias targetm.vectorize.init_cost. */ | |
980 | |
981 static inline void * | |
982 init_cost (struct loop *loop_info) | |
983 { | |
984 return targetm.vectorize.init_cost (loop_info); | |
985 } | |
986 | |
987 /* Alias targetm.vectorize.add_stmt_cost. */ | |
988 | |
989 static inline unsigned | |
990 add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, | |
991 stmt_vec_info stmt_info, int misalign, | |
992 enum vect_cost_model_location where) | |
993 { | |
994 return targetm.vectorize.add_stmt_cost (data, count, kind, | |
995 stmt_info, misalign, where); | |
996 } | |
997 | |
998 /* Alias targetm.vectorize.finish_cost. */ | |
999 | |
1000 static inline void | |
1001 finish_cost (void *data, unsigned *prologue_cost, | |
1002 unsigned *body_cost, unsigned *epilogue_cost) | |
1003 { | |
1004 targetm.vectorize.finish_cost (data, prologue_cost, body_cost, epilogue_cost); | |
1005 } | |
1006 | |
1007 /* Alias targetm.vectorize.destroy_cost_data. */ | |
1008 | |
1009 static inline void | |
1010 destroy_cost_data (void *data) | |
1011 { | |
1012 targetm.vectorize.destroy_cost_data (data); | |
1013 } | |
1014 | |
0 | 1015 /*-----------------------------------------------------------------*/ |
1016 /* Info on data references alignment. */ | |
1017 /*-----------------------------------------------------------------*/ | |
111 | 1018 inline void |
1019 set_dr_misalignment (struct data_reference *dr, int val) | |
1020 { | |
1021 dataref_aux *data_aux = DR_VECT_AUX (dr); | |
1022 | |
1023 if (!data_aux) | |
1024 { | |
1025 data_aux = XCNEW (dataref_aux); | |
1026 dr->aux = data_aux; | |
1027 } | |
1028 | |
1029 data_aux->misalignment = val; | |
1030 } | |
1031 | |
1032 inline int | |
1033 dr_misalignment (struct data_reference *dr) | |
1034 { | |
1035 return DR_VECT_AUX (dr)->misalignment; | |
1036 } | |
0 | 1037 |
1038 /* Reflects actual alignment of first access in the vectorized loop, | |
1039 taking into account peeling/versioning if applied. */ | |
111 | 1040 #define DR_MISALIGNMENT(DR) dr_misalignment (DR) |
1041 #define SET_DR_MISALIGNMENT(DR, VAL) set_dr_misalignment (DR, VAL) | |
1042 #define DR_MISALIGNMENT_UNKNOWN (-1) | |
0 | 1043 |
111 | 1044 /* Only defined once DR_MISALIGNMENT is defined. */ |
1045 #define DR_TARGET_ALIGNMENT(DR) DR_VECT_AUX (DR)->target_alignment | |
1046 | |
1047 /* Return true if data access DR is aligned to its target alignment | |
1048 (which may be less than a full vector). */ | |
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
|
1049 |
0 | 1050 static inline bool |
1051 aligned_access_p (struct data_reference *data_ref_info) | |
1052 { | |
1053 return (DR_MISALIGNMENT (data_ref_info) == 0); | |
1054 } | |
1055 | |
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
|
1056 /* 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
|
1057 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
|
1058 |
0 | 1059 static inline bool |
1060 known_alignment_for_access_p (struct data_reference *data_ref_info) | |
1061 { | |
111 | 1062 return (DR_MISALIGNMENT (data_ref_info) != DR_MISALIGNMENT_UNKNOWN); |
1063 } | |
1064 | |
1065 /* Return the minimum alignment in bytes that the vectorized version | |
1066 of DR is guaranteed to have. */ | |
1067 | |
1068 static inline unsigned int | |
1069 vect_known_alignment_in_bytes (struct data_reference *dr) | |
1070 { | |
1071 if (DR_MISALIGNMENT (dr) == DR_MISALIGNMENT_UNKNOWN) | |
1072 return TYPE_ALIGN_UNIT (TREE_TYPE (DR_REF (dr))); | |
1073 if (DR_MISALIGNMENT (dr) == 0) | |
1074 return DR_TARGET_ALIGNMENT (dr); | |
1075 return DR_MISALIGNMENT (dr) & -DR_MISALIGNMENT (dr); | |
1076 } | |
1077 | |
1078 /* Return the behavior of DR with respect to the vectorization context | |
1079 (which for outer loop vectorization might not be the behavior recorded | |
1080 in DR itself). */ | |
1081 | |
1082 static inline innermost_loop_behavior * | |
1083 vect_dr_behavior (data_reference *dr) | |
1084 { | |
1085 gimple *stmt = DR_STMT (dr); | |
1086 stmt_vec_info stmt_info = vinfo_for_stmt (stmt); | |
1087 loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); | |
1088 if (loop_vinfo == NULL | |
1089 || !nested_in_vect_loop_p (LOOP_VINFO_LOOP (loop_vinfo), stmt)) | |
1090 return &DR_INNERMOST (dr); | |
1091 else | |
1092 return &STMT_VINFO_DR_WRT_VEC_LOOP (stmt_info); | |
0 | 1093 } |
1094 | |
111 | 1095 /* Return true if the vect cost model is unlimited. */ |
1096 static inline bool | |
1097 unlimited_cost_model (loop_p loop) | |
1098 { | |
1099 if (loop != NULL && loop->force_vectorize | |
1100 && flag_simd_cost_model != VECT_COST_MODEL_DEFAULT) | |
1101 return flag_simd_cost_model == VECT_COST_MODEL_UNLIMITED; | |
1102 return (flag_vect_cost_model == VECT_COST_MODEL_UNLIMITED); | |
1103 } | |
1104 | |
1105 /* Return the number of copies needed for loop vectorization when | |
1106 a statement operates on vectors of type VECTYPE. This is the | |
1107 vectorization factor divided by the number of elements in | |
1108 VECTYPE and is always known at compile time. */ | |
1109 | |
1110 static inline unsigned int | |
1111 vect_get_num_copies (loop_vec_info loop_vinfo, tree vectype) | |
1112 { | |
1113 gcc_checking_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo) | |
1114 % TYPE_VECTOR_SUBPARTS (vectype) == 0); | |
1115 return (LOOP_VINFO_VECT_FACTOR (loop_vinfo) | |
1116 / TYPE_VECTOR_SUBPARTS (vectype)); | |
1117 } | |
1118 | |
1119 /* Return the size of the value accessed by unvectorized data reference DR. | |
1120 This is only valid once STMT_VINFO_VECTYPE has been calculated for the | |
1121 associated gimple statement, since that guarantees that DR accesses | |
1122 either a scalar or a scalar equivalent. ("Scalar equivalent" here | |
1123 includes things like V1SI, which can be vectorized in the same way | |
1124 as a plain SI.) */ | |
1125 | |
1126 inline unsigned int | |
1127 vect_get_scalar_dr_size (struct data_reference *dr) | |
1128 { | |
1129 return tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (dr)))); | |
1130 } | |
1131 | |
1132 /* Source location */ | |
1133 extern source_location vect_location; | |
0 | 1134 |
1135 /*-----------------------------------------------------------------*/ | |
1136 /* Function prototypes. */ | |
1137 /*-----------------------------------------------------------------*/ | |
1138 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1139 /* 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
|
1140 in tree-vect-loop-manip.c. */ |
0 | 1141 extern void slpeel_make_loop_iterate_ntimes (struct loop *, tree); |
1142 extern bool slpeel_can_duplicate_loop_p (const struct loop *, const_edge); | |
111 | 1143 struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *, |
1144 struct loop *, edge); | |
1145 extern void vect_loop_versioning (loop_vec_info, unsigned int, bool); | |
1146 extern struct loop *vect_do_peeling (loop_vec_info, tree, tree, | |
1147 tree *, int, bool, bool); | |
1148 extern source_location find_loop_location (struct loop *); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1149 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
|
1150 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1151 /* 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
|
1152 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
|
1153 extern tree get_vectype_for_scalar_type (tree); |
111 | 1154 extern tree get_mask_type_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
|
1155 extern tree get_same_sized_vectype (tree, tree); |
111 | 1156 extern bool vect_is_simple_use (tree, vec_info *, gimple **, |
1157 enum vect_def_type *); | |
1158 extern bool vect_is_simple_use (tree, vec_info *, gimple **, | |
1159 enum vect_def_type *, tree *); | |
1160 extern bool supportable_widening_operation (enum tree_code, gimple *, tree, | |
1161 tree, enum tree_code *, | |
1162 enum tree_code *, int *, | |
1163 vec<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
|
1164 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
|
1165 enum tree_code *, |
111 | 1166 int *, vec<tree> *); |
1167 extern stmt_vec_info new_stmt_vec_info (gimple *stmt, vec_info *); | |
1168 extern void free_stmt_vec_info (gimple *stmt); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1169 extern void vect_model_simple_cost (stmt_vec_info, int, enum vect_def_type *, |
111 | 1170 int, stmt_vector_for_cost *, |
1171 stmt_vector_for_cost *); | |
1172 extern void vect_model_store_cost (stmt_vec_info, int, vect_memory_access_type, | |
1173 enum vect_def_type, slp_tree, | |
1174 stmt_vector_for_cost *, | |
1175 stmt_vector_for_cost *); | |
1176 extern void vect_model_load_cost (stmt_vec_info, int, vect_memory_access_type, | |
1177 slp_tree, stmt_vector_for_cost *, | |
1178 stmt_vector_for_cost *); | |
1179 extern unsigned record_stmt_cost (stmt_vector_for_cost *, int, | |
1180 enum vect_cost_for_stmt, stmt_vec_info, | |
1181 int, enum vect_cost_model_location); | |
1182 extern void vect_finish_stmt_generation (gimple *, gimple *, | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1183 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
|
1184 extern bool vect_mark_stmts_to_be_vectorized (loop_vec_info); |
111 | 1185 extern tree vect_get_vec_def_for_operand_1 (gimple *, enum vect_def_type); |
1186 extern tree vect_get_vec_def_for_operand (tree, gimple *, tree = NULL); | |
1187 extern void vect_get_vec_defs (tree, tree, gimple *, vec<tree> *, | |
1188 vec<tree> *, slp_tree); | |
1189 extern void vect_get_vec_defs_for_stmt_copy (enum vect_def_type *, | |
1190 vec<tree> *, vec<tree> *); | |
1191 extern tree vect_init_vector (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
|
1192 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
|
1193 extern tree vect_get_vec_def_for_stmt_copy (enum vect_def_type, tree); |
111 | 1194 extern bool vect_transform_stmt (gimple *, gimple_stmt_iterator *, |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1195 bool *, slp_tree, slp_instance); |
111 | 1196 extern void vect_remove_stores (gimple *); |
1197 extern bool vect_analyze_stmt (gimple *, bool *, slp_tree, slp_instance); | |
1198 extern bool vectorizable_condition (gimple *, gimple_stmt_iterator *, | |
1199 gimple **, tree, int, slp_tree); | |
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
|
1200 extern void vect_get_load_cost (struct data_reference *, int, bool, |
111 | 1201 unsigned int *, unsigned int *, |
1202 stmt_vector_for_cost *, | |
1203 stmt_vector_for_cost *, bool); | |
1204 extern void vect_get_store_cost (struct data_reference *, int, | |
1205 unsigned int *, stmt_vector_for_cost *); | |
1206 extern bool vect_supportable_shift (enum tree_code, tree); | |
1207 extern tree vect_gen_perm_mask_any (tree, vec_perm_indices); | |
1208 extern tree vect_gen_perm_mask_checked (tree, vec_perm_indices); | |
1209 extern void optimize_mask_stores (struct loop*); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1210 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1211 /* 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
|
1212 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
|
1213 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
|
1214 (struct data_reference *, bool); |
111 | 1215 extern tree vect_get_smallest_scalar_type (gimple *, HOST_WIDE_INT *, |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1216 HOST_WIDE_INT *); |
111 | 1217 extern bool vect_analyze_data_ref_dependences (loop_vec_info, int *); |
1218 extern bool vect_slp_analyze_instance_dependence (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
|
1219 extern bool vect_enhance_data_refs_alignment (loop_vec_info); |
111 | 1220 extern bool vect_analyze_data_refs_alignment (loop_vec_info); |
1221 extern bool vect_verify_datarefs_alignment (loop_vec_info); | |
1222 extern bool vect_slp_analyze_and_verify_instance_alignment (slp_instance); | |
1223 extern bool vect_analyze_data_ref_accesses (vec_info *); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1224 extern bool vect_prune_runtime_alias_test_list (loop_vec_info); |
111 | 1225 extern bool vect_check_gather_scatter (gimple *, loop_vec_info, |
1226 gather_scatter_info *); | |
1227 extern bool vect_analyze_data_refs (vec_info *, int *); | |
1228 extern void vect_record_base_alignments (vec_info *); | |
1229 extern tree vect_create_data_ref_ptr (gimple *, tree, struct loop *, tree, | |
1230 tree *, gimple_stmt_iterator *, | |
1231 gimple **, bool, bool *, | |
1232 tree = NULL_TREE); | |
1233 extern tree bump_vector_ptr (tree, gimple *, gimple_stmt_iterator *, gimple *, | |
1234 tree); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1235 extern tree vect_create_destination_var (tree, tree); |
111 | 1236 extern bool vect_grouped_store_supported (tree, unsigned HOST_WIDE_INT); |
1237 extern bool vect_store_lanes_supported (tree, unsigned HOST_WIDE_INT); | |
1238 extern bool vect_grouped_load_supported (tree, bool, unsigned HOST_WIDE_INT); | |
1239 extern bool vect_load_lanes_supported (tree, unsigned HOST_WIDE_INT); | |
1240 extern void vect_permute_store_chain (vec<tree> ,unsigned int, gimple *, | |
1241 gimple_stmt_iterator *, vec<tree> *); | |
1242 extern tree vect_setup_realignment (gimple *, gimple_stmt_iterator *, tree *, | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1243 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
|
1244 struct loop **); |
111 | 1245 extern void vect_transform_grouped_load (gimple *, vec<tree> , int, |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1246 gimple_stmt_iterator *); |
111 | 1247 extern void vect_record_grouped_load_vectors (gimple *, vec<tree> ); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1248 extern tree vect_get_new_vect_var (tree, enum vect_var_kind, const char *); |
111 | 1249 extern tree vect_get_new_ssa_name (tree, enum vect_var_kind, |
1250 const char * = NULL); | |
1251 extern tree vect_create_addr_base_for_vector_ref (gimple *, gimple_seq *, | |
1252 tree, tree = NULL_TREE); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1253 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1254 /* 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
|
1255 /* FORNOW: Used in tree-parloops.c. */ |
111 | 1256 extern gimple *vect_force_simple_reduction (loop_vec_info, gimple *, |
1257 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
|
1258 /* Drive for loop analysis stage. */ |
111 | 1259 extern loop_vec_info vect_analyze_loop (struct loop *, loop_vec_info); |
1260 extern tree vect_build_loop_niters (loop_vec_info, bool * = NULL); | |
1261 extern void vect_gen_vector_loop_niters (loop_vec_info, tree, tree *, bool); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1262 /* Drive for loop transformation stage. */ |
111 | 1263 extern struct loop *vect_transform_loop (loop_vec_info); |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1264 extern loop_vec_info vect_analyze_loop_form (struct loop *); |
111 | 1265 extern bool vectorizable_live_operation (gimple *, gimple_stmt_iterator *, |
1266 slp_tree, int, gimple **); | |
1267 extern bool vectorizable_reduction (gimple *, gimple_stmt_iterator *, | |
1268 gimple **, slp_tree, slp_instance); | |
1269 extern bool vectorizable_induction (gimple *, gimple_stmt_iterator *, | |
1270 gimple **, slp_tree); | |
1271 extern tree get_initial_def_for_reduction (gimple *, tree, tree *); | |
1272 extern bool vect_worthwhile_without_simd_p (vec_info *, tree_code); | |
1273 extern int vect_get_known_peeling_cost (loop_vec_info, int, int *, | |
1274 stmt_vector_for_cost *, | |
1275 stmt_vector_for_cost *, | |
1276 stmt_vector_for_cost *); | |
0 | 1277 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1278 /* 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
|
1279 extern void vect_free_slp_instance (slp_instance); |
111 | 1280 extern bool vect_transform_slp_perm_load (slp_tree, vec<tree> , |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1281 gimple_stmt_iterator *, int, |
111 | 1282 slp_instance, bool, unsigned *); |
1283 extern bool vect_slp_analyze_operations (vec_info *); | |
1284 extern bool vect_schedule_slp (vec_info *); | |
1285 extern bool vect_analyze_slp (vec_info *, unsigned); | |
1286 extern bool vect_make_slp_decision (loop_vec_info); | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1287 extern void vect_detect_hybrid_slp (loop_vec_info); |
111 | 1288 extern void vect_get_slp_defs (vec<tree> , slp_tree, vec<vec<tree> > *); |
1289 extern bool vect_slp_bb (basic_block); | |
1290 extern gimple *vect_find_last_scalar_stmt_in_slp (slp_tree); | |
1291 extern bool is_simple_and_all_uses_invariant (gimple *, loop_vec_info); | |
0 | 1292 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1293 /* In tree-vect-patterns.c. */ |
0 | 1294 /* Pattern recognition functions. |
1295 Additional pattern recognition functions can (and will) be added | |
1296 in the future. */ | |
111 | 1297 typedef gimple *(* vect_recog_func_ptr) (vec<gimple *> *, tree *, tree *); |
1298 #define NUM_PATTERNS 14 | |
1299 void vect_pattern_recog (vec_info *); | |
0 | 1300 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1301 /* 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
|
1302 unsigned vectorize_loops (void); |
111 | 1303 bool vect_stmt_in_region_p (vec_info *, gimple *); |
1304 void vect_free_loop_info_assumptions (struct loop *); | |
0 | 1305 |
1306 #endif /* GCC_TREE_VECTORIZER_H */ |