Mercurial > hg > CbC > CbC_gcc
annotate gcc/tree-vectorizer.h @ 66:b362627d71ba
bug-fix: modify tail-call-optimization enforcing rules. (calls.c.)
author | Ryoma SHINYA <shinya@firefly.cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Dec 2010 03:58:33 +0900 |
parents | 77e2b8dfacca |
children | b7f97abdc517 |
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 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
2 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 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 | |
69 /* Define verbosity levels. */ | |
70 enum verbosity_levels { | |
71 REPORT_NONE, | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
72 REPORT_VECTORIZED_LOCATIONS, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
73 REPORT_UNVECTORIZED_LOCATIONS, |
0 | 74 REPORT_COST, |
75 REPORT_ALIGNMENT, | |
76 REPORT_DR_DETAILS, | |
77 REPORT_BAD_FORM_LOOPS, | |
78 REPORT_OUTER_LOOPS, | |
79 REPORT_SLP, | |
80 REPORT_DETAILS, | |
81 /* New verbosity levels should be added before this one. */ | |
82 MAX_VERBOSITY_LEVEL | |
83 }; | |
84 | |
85 /************************************************************************ | |
86 SLP | |
87 ************************************************************************/ | |
88 | |
89 /* A computation tree of an SLP instance. Each node corresponds to a group of | |
90 stmts to be packed in a SIMD stmt. */ | |
91 typedef struct _slp_tree { | |
92 /* Only binary and unary operations are supported. LEFT child corresponds to | |
93 the first operand and RIGHT child to the second if the operation is | |
94 binary. */ | |
95 struct _slp_tree *left; | |
96 struct _slp_tree *right; | |
97 /* A group of scalar stmts to be vectorized together. */ | |
98 VEC (gimple, heap) *stmts; | |
99 /* Vectorized stmt/s. */ | |
100 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
|
101 /* 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
|
102 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
|
103 scalar elements in one scalar iteration (GROUP_SIZE) multiplied by VF |
0 | 104 divided by vector size. */ |
105 unsigned int vec_stmts_size; | |
106 /* Vectorization costs associated with SLP node. */ | |
107 struct | |
108 { | |
109 int outside_of_loop; /* Statements generated outside loop. */ | |
110 int inside_of_loop; /* Statements generated inside loop. */ | |
111 } cost; | |
112 } *slp_tree; | |
113 | |
114 DEF_VEC_P(slp_tree); | |
115 DEF_VEC_ALLOC_P(slp_tree, heap); | |
116 | |
117 /* SLP instance is a sequence of stmts in a loop that can be packed into | |
118 SIMD stmts. */ | |
119 typedef struct _slp_instance { | |
120 /* The root of SLP tree. */ | |
121 slp_tree root; | |
122 | |
123 /* Size of groups of scalar stmts that will be replaced by SIMD stmt/s. */ | |
124 unsigned int group_size; | |
125 | |
126 /* The unrolling factor required to vectorized this SLP instance. */ | |
127 unsigned int unrolling_factor; | |
128 | |
129 /* 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
|
130 struct |
0 | 131 { |
132 int outside_of_loop; /* Statements generated outside loop. */ | |
133 int inside_of_loop; /* Statements generated inside loop. */ | |
134 } cost; | |
135 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
136 /* Loads permutation relatively to the stores, NULL if there is no |
0 | 137 permutation. */ |
138 VEC (int, heap) *load_permutation; | |
139 | |
140 /* The group of nodes that contain loads of this SLP instance. */ | |
141 VEC (slp_tree, heap) *loads; | |
142 | |
143 /* The first scalar load of the instance. The created vector loads will be | |
144 inserted before this statement. */ | |
145 gimple first_load; | |
146 } *slp_instance; | |
147 | |
148 DEF_VEC_P(slp_instance); | |
149 DEF_VEC_ALLOC_P(slp_instance, heap); | |
150 | |
151 /* Access Functions. */ | |
152 #define SLP_INSTANCE_TREE(S) (S)->root | |
153 #define SLP_INSTANCE_GROUP_SIZE(S) (S)->group_size | |
154 #define SLP_INSTANCE_UNROLLING_FACTOR(S) (S)->unrolling_factor | |
155 #define SLP_INSTANCE_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop | |
156 #define SLP_INSTANCE_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop | |
157 #define SLP_INSTANCE_LOAD_PERMUTATION(S) (S)->load_permutation | |
158 #define SLP_INSTANCE_LOADS(S) (S)->loads | |
159 #define SLP_INSTANCE_FIRST_LOAD_STMT(S) (S)->first_load | |
160 | |
161 #define SLP_TREE_LEFT(S) (S)->left | |
162 #define SLP_TREE_RIGHT(S) (S)->right | |
163 #define SLP_TREE_SCALAR_STMTS(S) (S)->stmts | |
164 #define SLP_TREE_VEC_STMTS(S) (S)->vec_stmts | |
165 #define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size | |
166 #define SLP_TREE_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop | |
167 #define SLP_TREE_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop | |
168 | |
169 /*-----------------------------------------------------------------*/ | |
170 /* Info on vectorized loops. */ | |
171 /*-----------------------------------------------------------------*/ | |
172 typedef struct _loop_vec_info { | |
173 | |
174 /* The loop to which this info struct refers to. */ | |
175 struct loop *loop; | |
176 | |
177 /* The loop basic blocks. */ | |
178 basic_block *bbs; | |
179 | |
180 /* Number of iterations. */ | |
181 tree num_iters; | |
182 tree num_iters_unchanged; | |
183 | |
184 /* 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
|
185 not be profitable (as estimated by the cost model). |
0 | 186 -1 indicates that vectorization will not be profitable. |
187 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
|
188 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
|
189 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
|
190 |
0 | 191 /* Is the loop vectorizable? */ |
192 bool vectorizable; | |
193 | |
194 /* Unrolling factor */ | |
195 int vectorization_factor; | |
196 | |
197 /* Unknown DRs according to which loop was peeled. */ | |
198 struct data_reference *unaligned_dr; | |
199 | |
200 /* peeling_for_alignment indicates whether peeling for alignment will take | |
201 place, and what the peeling factor should be: | |
202 peeling_for_alignment = X means: | |
203 If X=0: Peeling for alignment will not be applied. | |
204 If X>0: Peel first X iterations. | |
205 If X=-1: Generate a runtime test to calculate the number of iterations | |
206 to be peeled, using the dataref recorded in the field | |
207 unaligned_dr. */ | |
208 int peeling_for_alignment; | |
209 | |
210 /* The mask used to check the alignment of pointers or arrays. */ | |
211 int ptr_mask; | |
212 | |
213 /* All data references in the loop. */ | |
214 VEC (data_reference_p, heap) *datarefs; | |
215 | |
216 /* All data dependences in the loop. */ | |
217 VEC (ddr_p, heap) *ddrs; | |
218 | |
219 /* Data Dependence Relations defining address ranges that are candidates | |
220 for a run-time aliasing check. */ | |
221 VEC (ddr_p, heap) *may_alias_ddrs; | |
222 | |
223 /* Statements in the loop that have data references that are candidates for a | |
224 runtime (loop versioning) misalignment check. */ | |
225 VEC(gimple,heap) *may_misalign_stmts; | |
226 | |
227 /* The loop location in the source. */ | |
228 LOC loop_line_number; | |
229 | |
230 /* All interleaving chains of stores in the loop, represented by the first | |
231 stmt in the chain. */ | |
232 VEC(gimple, heap) *strided_stores; | |
233 | |
234 /* All SLP instances in the loop. This is a subset of the set of STRIDED_STORES | |
235 of the loop. */ | |
236 VEC(slp_instance, heap) *slp_instances; | |
237 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
238 /* The unrolling factor needed to SLP the loop. In case of that pure SLP is |
0 | 239 applied to the loop, i.e., no unrolling is needed, this is 1. */ |
240 unsigned slp_unrolling_factor; | |
241 } *loop_vec_info; | |
242 | |
243 /* 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
|
244 #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
|
245 #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
|
246 #define LOOP_VINFO_NITERS(L) (L)->num_iters |
0 | 247 /* Since LOOP_VINFO_NITERS can change after prologue peeling |
248 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
|
249 #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
|
250 #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
|
251 #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
|
252 #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
|
253 #define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
254 #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
|
255 #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
|
256 #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
|
257 #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
|
258 #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
|
259 #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
|
260 #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
|
261 #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
|
262 #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
|
263 #define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances |
0 | 264 #define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor |
265 | |
55
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_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
|
267 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
|
268 #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
|
269 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
|
270 |
0 | 271 #define NITERS_KNOWN_P(n) \ |
272 (host_integerp ((n),0) \ | |
273 && TREE_INT_CST_LOW ((n)) > 0) | |
274 | |
55
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_NITERS_KNOWN_P(L) \ |
0 | 276 NITERS_KNOWN_P((L)->num_iters) |
277 | |
278 static inline loop_vec_info | |
279 loop_vec_info_for_loop (struct loop *loop) | |
280 { | |
281 return (loop_vec_info) loop->aux; | |
282 } | |
283 | |
284 static inline bool | |
285 nested_in_vect_loop_p (struct loop *loop, gimple stmt) | |
286 { | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
287 return (loop->inner |
0 | 288 && (loop->inner == (gimple_bb (stmt))->loop_father)); |
289 } | |
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 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
|
292 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
293 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
|
294 /* 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
|
295 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
|
296 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
|
297 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
298 /* 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
|
299 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
|
300 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
|
301 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
302 /* 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
|
303 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
|
304 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
305 /* 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
|
306 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
|
307 } *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 #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
|
310 #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
|
311 #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
|
312 #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
|
313 #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
|
314 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
315 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
|
316 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
|
317 { |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
318 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
|
319 } |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
320 |
0 | 321 /*-----------------------------------------------------------------*/ |
322 /* Info on vectorized defs. */ | |
323 /*-----------------------------------------------------------------*/ | |
324 enum stmt_vec_info_type { | |
325 undef_vec_info_type = 0, | |
326 load_vec_info_type, | |
327 store_vec_info_type, | |
328 op_vec_info_type, | |
329 call_vec_info_type, | |
330 assignment_vec_info_type, | |
331 condition_vec_info_type, | |
332 reduc_vec_info_type, | |
333 induc_vec_info_type, | |
334 type_promotion_vec_info_type, | |
335 type_demotion_vec_info_type, | |
336 type_conversion_vec_info_type, | |
337 loop_exit_ctrl_vec_info_type | |
338 }; | |
339 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
340 /* 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
|
341 block. */ |
0 | 342 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
|
343 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
|
344 /* 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
|
345 use is a reduction stmt. */ |
0 | 346 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
|
347 /* 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
|
348 not part of reduction). */ |
0 | 349 vect_used_in_outer, |
350 | |
351 /* 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
|
352 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
|
353 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
|
354 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
|
355 to identify computations that we can change the order in which they are |
0 | 356 computed. */ |
357 vect_used_by_reduction, | |
358 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
359 vect_used_in_scope |
0 | 360 }; |
361 | |
362 /* The type of vectorization that can be applied to the stmt: regular loop-based | |
363 vectorization; pure SLP - the stmt is a part of SLP instances and does not | |
364 have uses outside SLP instances; or hybrid SLP and loop-based - the stmt is | |
365 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
|
366 uses outside SLP sequences. |
0 | 367 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
368 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
|
369 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
|
370 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
|
371 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
|
372 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
|
373 Loop hybrid SLP means that we exploit both intra-iteration and |
0 | 374 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
|
375 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
|
376 within an iteration, so we obtain the rest of the parallelism from subsequent |
0 | 377 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
|
378 enum slp_vect_type { |
0 | 379 loop_vect = 0, |
380 pure_slp, | |
381 hybrid | |
382 }; | |
383 | |
384 | |
385 typedef struct data_reference *dr_p; | |
386 DEF_VEC_P(dr_p); | |
387 DEF_VEC_ALLOC_P(dr_p,heap); | |
388 | |
389 typedef struct _stmt_vec_info { | |
390 | |
391 enum stmt_vec_info_type type; | |
392 | |
393 /* The stmt to which this info struct refers to. */ | |
394 gimple stmt; | |
395 | |
396 /* The loop_vec_info with respect to which STMT is vectorized. */ | |
397 loop_vec_info loop_vinfo; | |
398 | |
399 /* Not all stmts in the loop need to be vectorized. e.g, the increment | |
400 of the loop induction variable and computation of array indexes. relevant | |
401 indicates whether the stmt needs to be vectorized. */ | |
402 enum vect_relevant relevant; | |
403 | |
404 /* Indicates whether this stmts is part of a computation whose result is | |
405 used outside the loop. */ | |
406 bool live; | |
407 | |
408 /* The vector type to be used. */ | |
409 tree vectype; | |
410 | |
411 /* The vectorized version of the stmt. */ | |
412 gimple vectorized_stmt; | |
413 | |
414 | |
415 /** 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
|
416 data-ref (array/pointer/struct access). A GIMPLE stmt is expected to have |
0 | 417 at most one such data-ref. **/ |
418 | |
419 /* Information about the data-ref (access function, etc), | |
420 relative to the inner-most containing loop. */ | |
421 struct data_reference *data_ref_info; | |
422 | |
423 /* Information about the data-ref relative to this loop | |
424 nest (the loop that is being considered for vectorization). */ | |
425 tree dr_base_address; | |
426 tree dr_init; | |
427 tree dr_offset; | |
428 tree dr_step; | |
429 tree dr_aligned_to; | |
430 | |
431 /* Stmt is part of some pattern (computation idiom) */ | |
432 bool in_pattern_p; | |
433 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
434 /* 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
|
435 some other stmt S that is in some way "related" to this stmt. |
0 | 436 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
|
437 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
|
438 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
|
439 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
|
440 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
|
441 the last stmt in the original sequence of stmts that constitutes the |
0 | 442 pattern). */ |
443 gimple related_stmt; | |
444 | |
445 /* List of datarefs that are known to have the same alignment as the dataref | |
446 of this stmt. */ | |
447 VEC(dr_p,heap) *same_align_refs; | |
448 | |
449 /* Classify the def of this stmt. */ | |
450 enum vect_def_type def_type; | |
451 | |
452 /* Interleaving info. */ | |
453 /* First data-ref in the interleaving group. */ | |
454 gimple first_dr; | |
455 /* Pointer to the next data-ref in the group. */ | |
456 gimple next_dr; | |
457 /* The size of the interleaving group. */ | |
458 unsigned int size; | |
459 /* For stores, number of stores from this group seen. We vectorize the last | |
460 one. */ | |
461 unsigned int store_count; | |
462 /* For loads only, the gap from the previous load. For consecutive loads, GAP | |
463 is 1. */ | |
464 unsigned int gap; | |
465 /* In case that two or more stmts share data-ref, this is the pointer to the | |
466 previously detected stmt with the same dr. */ | |
467 gimple same_dr_stmt; | |
468 /* For loads only, if there is a store with the same location, this field is | |
469 TRUE. */ | |
470 bool read_write_dep; | |
471 | |
472 /* 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
|
473 struct |
0 | 474 { |
475 int outside_of_loop; /* Statements generated outside loop. */ | |
476 int inside_of_loop; /* Statements generated inside loop. */ | |
477 } cost; | |
478 | |
479 /* Whether the stmt is SLPed, loop-based vectorized, or both. */ | |
480 enum slp_vect_type slp_type; | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
481 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
482 /* 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
|
483 bb_vec_info bb_vinfo; |
0 | 484 } *stmt_vec_info; |
485 | |
486 /* Access Functions. */ | |
487 #define STMT_VINFO_TYPE(S) (S)->type | |
488 #define STMT_VINFO_STMT(S) (S)->stmt | |
489 #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
|
490 #define STMT_VINFO_BB_VINFO(S) (S)->bb_vinfo |
0 | 491 #define STMT_VINFO_RELEVANT(S) (S)->relevant |
492 #define STMT_VINFO_LIVE_P(S) (S)->live | |
493 #define STMT_VINFO_VECTYPE(S) (S)->vectype | |
494 #define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt | |
495 #define STMT_VINFO_DATA_REF(S) (S)->data_ref_info | |
496 | |
497 #define STMT_VINFO_DR_BASE_ADDRESS(S) (S)->dr_base_address | |
498 #define STMT_VINFO_DR_INIT(S) (S)->dr_init | |
499 #define STMT_VINFO_DR_OFFSET(S) (S)->dr_offset | |
500 #define STMT_VINFO_DR_STEP(S) (S)->dr_step | |
501 #define STMT_VINFO_DR_ALIGNED_TO(S) (S)->dr_aligned_to | |
502 | |
503 #define STMT_VINFO_IN_PATTERN_P(S) (S)->in_pattern_p | |
504 #define STMT_VINFO_RELATED_STMT(S) (S)->related_stmt | |
505 #define STMT_VINFO_SAME_ALIGN_REFS(S) (S)->same_align_refs | |
506 #define STMT_VINFO_DEF_TYPE(S) (S)->def_type | |
507 #define STMT_VINFO_DR_GROUP_FIRST_DR(S) (S)->first_dr | |
508 #define STMT_VINFO_DR_GROUP_NEXT_DR(S) (S)->next_dr | |
509 #define STMT_VINFO_DR_GROUP_SIZE(S) (S)->size | |
510 #define STMT_VINFO_DR_GROUP_STORE_COUNT(S) (S)->store_count | |
511 #define STMT_VINFO_DR_GROUP_GAP(S) (S)->gap | |
512 #define STMT_VINFO_DR_GROUP_SAME_DR_STMT(S)(S)->same_dr_stmt | |
513 #define STMT_VINFO_DR_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep | |
514 #define STMT_VINFO_STRIDED_ACCESS(S) ((S)->first_dr != NULL) | |
515 | |
516 #define DR_GROUP_FIRST_DR(S) (S)->first_dr | |
517 #define DR_GROUP_NEXT_DR(S) (S)->next_dr | |
518 #define DR_GROUP_SIZE(S) (S)->size | |
519 #define DR_GROUP_STORE_COUNT(S) (S)->store_count | |
520 #define DR_GROUP_GAP(S) (S)->gap | |
521 #define DR_GROUP_SAME_DR_STMT(S) (S)->same_dr_stmt | |
522 #define DR_GROUP_READ_WRITE_DEPENDENCE(S) (S)->read_write_dep | |
523 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
524 #define STMT_VINFO_RELEVANT_P(S) ((S)->relevant != vect_unused_in_scope) |
0 | 525 #define STMT_VINFO_OUTSIDE_OF_LOOP_COST(S) (S)->cost.outside_of_loop |
526 #define STMT_VINFO_INSIDE_OF_LOOP_COST(S) (S)->cost.inside_of_loop | |
527 | |
528 #define HYBRID_SLP_STMT(S) ((S)->slp_type == hybrid) | |
529 #define PURE_SLP_STMT(S) ((S)->slp_type == pure_slp) | |
530 #define STMT_SLP_TYPE(S) (S)->slp_type | |
531 | |
532 /* These are some defines for the initial implementation of the vectorizer's | |
533 cost model. These will later be target specific hooks. */ | |
534 | |
535 /* Cost of conditional taken branch. */ | |
536 #ifndef TARG_COND_TAKEN_BRANCH_COST | |
537 #define TARG_COND_TAKEN_BRANCH_COST 3 | |
538 #endif | |
539 | |
540 /* Cost of conditional not taken branch. */ | |
541 #ifndef TARG_COND_NOT_TAKEN_BRANCH_COST | |
542 #define TARG_COND_NOT_TAKEN_BRANCH_COST 1 | |
543 #endif | |
544 | |
545 /* Cost of any scalar operation, excluding load and store. */ | |
546 #ifndef TARG_SCALAR_STMT_COST | |
547 #define TARG_SCALAR_STMT_COST 1 | |
548 #endif | |
549 | |
550 /* Cost of scalar load. */ | |
551 #ifndef TARG_SCALAR_LOAD_COST | |
552 #define TARG_SCALAR_LOAD_COST 1 | |
553 #endif | |
554 | |
555 /* Cost of scalar store. */ | |
556 #ifndef TARG_SCALAR_STORE_COST | |
557 #define TARG_SCALAR_STORE_COST 1 | |
558 #endif | |
559 | |
560 /* Cost of any vector operation, excluding load, store or vector to scalar | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
561 operation. */ |
0 | 562 #ifndef TARG_VEC_STMT_COST |
563 #define TARG_VEC_STMT_COST 1 | |
564 #endif | |
565 | |
566 /* Cost of vector to scalar operation. */ | |
567 #ifndef TARG_VEC_TO_SCALAR_COST | |
568 #define TARG_VEC_TO_SCALAR_COST 1 | |
569 #endif | |
570 | |
571 /* Cost of scalar to vector operation. */ | |
572 #ifndef TARG_SCALAR_TO_VEC_COST | |
573 #define TARG_SCALAR_TO_VEC_COST 1 | |
574 #endif | |
575 | |
576 /* Cost of aligned vector load. */ | |
577 #ifndef TARG_VEC_LOAD_COST | |
578 #define TARG_VEC_LOAD_COST 1 | |
579 #endif | |
580 | |
581 /* Cost of misaligned vector load. */ | |
582 #ifndef TARG_VEC_UNALIGNED_LOAD_COST | |
583 #define TARG_VEC_UNALIGNED_LOAD_COST 2 | |
584 #endif | |
585 | |
586 /* Cost of vector store. */ | |
587 #ifndef TARG_VEC_STORE_COST | |
588 #define TARG_VEC_STORE_COST 1 | |
589 #endif | |
590 | |
591 /* Cost of vector permutation. */ | |
592 #ifndef TARG_VEC_PERMUTE_COST | |
593 #define TARG_VEC_PERMUTE_COST 1 | |
594 #endif | |
595 | |
596 /* The maximum number of intermediate steps required in multi-step type | |
597 conversion. */ | |
598 #define MAX_INTERM_CVT_STEPS 3 | |
599 | |
600 /* Avoid GTY(()) on stmt_vec_info. */ | |
601 typedef void *vec_void_p; | |
602 DEF_VEC_P (vec_void_p); | |
603 DEF_VEC_ALLOC_P (vec_void_p, heap); | |
604 | |
605 extern VEC(vec_void_p,heap) *stmt_vec_info_vec; | |
606 | |
607 void init_stmt_vec_info_vec (void); | |
608 void free_stmt_vec_info_vec (void); | |
609 | |
610 static inline stmt_vec_info | |
611 vinfo_for_stmt (gimple stmt) | |
612 { | |
613 unsigned int uid = gimple_uid (stmt); | |
614 if (uid == 0) | |
615 return NULL; | |
616 | |
617 gcc_assert (uid <= VEC_length (vec_void_p, stmt_vec_info_vec)); | |
618 return (stmt_vec_info) VEC_index (vec_void_p, stmt_vec_info_vec, uid - 1); | |
619 } | |
620 | |
621 static inline void | |
622 set_vinfo_for_stmt (gimple stmt, stmt_vec_info info) | |
623 { | |
624 unsigned int uid = gimple_uid (stmt); | |
625 if (uid == 0) | |
626 { | |
627 gcc_assert (info); | |
628 uid = VEC_length (vec_void_p, stmt_vec_info_vec) + 1; | |
629 gimple_set_uid (stmt, uid); | |
630 VEC_safe_push (vec_void_p, heap, stmt_vec_info_vec, (vec_void_p) info); | |
631 } | |
632 else | |
633 VEC_replace (vec_void_p, stmt_vec_info_vec, uid - 1, (vec_void_p) info); | |
634 } | |
635 | |
636 static inline gimple | |
637 get_earlier_stmt (gimple stmt1, gimple stmt2) | |
638 { | |
639 unsigned int uid1, uid2; | |
640 | |
641 if (stmt1 == NULL) | |
642 return stmt2; | |
643 | |
644 if (stmt2 == NULL) | |
645 return stmt1; | |
646 | |
647 uid1 = gimple_uid (stmt1); | |
648 uid2 = gimple_uid (stmt2); | |
649 | |
650 if (uid1 == 0 || uid2 == 0) | |
651 return NULL; | |
652 | |
653 gcc_assert (uid1 <= VEC_length (vec_void_p, stmt_vec_info_vec)); | |
654 gcc_assert (uid2 <= VEC_length (vec_void_p, stmt_vec_info_vec)); | |
655 | |
656 if (uid1 < uid2) | |
657 return stmt1; | |
658 else | |
659 return stmt2; | |
660 } | |
661 | |
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 | |
677 static inline bool | |
678 is_loop_header_bb_p (basic_block bb) | |
679 { | |
680 if (bb == (bb->loop_father)->header) | |
681 return true; | |
682 gcc_assert (EDGE_COUNT (bb->preds) == 1); | |
683 return false; | |
684 } | |
685 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
686 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
|
687 stmt_vinfo_set_inside_of_loop_cost (stmt_vec_info stmt_info, slp_tree slp_node, |
0 | 688 int cost) |
689 { | |
690 if (slp_node) | |
691 SLP_TREE_INSIDE_OF_LOOP_COST (slp_node) = cost; | |
692 else | |
693 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
|
694 } |
0 | 695 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
696 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
|
697 stmt_vinfo_set_outside_of_loop_cost (stmt_vec_info stmt_info, slp_tree slp_node, |
0 | 698 int cost) |
699 { | |
700 if (slp_node) | |
701 SLP_TREE_OUTSIDE_OF_LOOP_COST (slp_node) = cost; | |
702 else | |
703 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
|
704 } |
0 | 705 |
706 static inline int | |
707 vect_pow2 (int x) | |
708 { | |
709 int i, res = 1; | |
710 | |
711 for (i = 0; i < x; i++) | |
712 res *= 2; | |
713 | |
714 return res; | |
715 } | |
716 | |
717 /*-----------------------------------------------------------------*/ | |
718 /* Info on data references alignment. */ | |
719 /*-----------------------------------------------------------------*/ | |
720 | |
721 /* Reflects actual alignment of first access in the vectorized loop, | |
722 taking into account peeling/versioning if applied. */ | |
723 #define DR_MISALIGNMENT(DR) ((int) (size_t) (DR)->aux) | |
724 #define SET_DR_MISALIGNMENT(DR, VAL) ((DR)->aux = (void *) (size_t) (VAL)) | |
725 | |
726 static inline bool | |
727 aligned_access_p (struct data_reference *data_ref_info) | |
728 { | |
729 return (DR_MISALIGNMENT (data_ref_info) == 0); | |
730 } | |
731 | |
732 static inline bool | |
733 known_alignment_for_access_p (struct data_reference *data_ref_info) | |
734 { | |
735 return (DR_MISALIGNMENT (data_ref_info) != -1); | |
736 } | |
737 | |
738 /* vect_dump will be set to stderr or dump_file if exist. */ | |
739 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
|
740 extern LOC vect_loop_location; |
0 | 741 |
742 /*-----------------------------------------------------------------*/ | |
743 /* Function prototypes. */ | |
744 /*-----------------------------------------------------------------*/ | |
745 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
746 /* 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
|
747 in tree-vect-loop-manip.c. */ |
0 | 748 extern void slpeel_make_loop_iterate_ntimes (struct loop *, tree); |
749 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
|
750 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
|
751 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
|
752 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
|
753 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
|
754 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
|
755 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
|
756 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
757 /* In tree-vect-stmts.c. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
758 extern tree get_vectype_for_scalar_type (tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
759 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
|
760 tree *, 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
|
761 extern bool supportable_widening_operation (enum tree_code, gimple, tree, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
762 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
|
763 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
|
764 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
|
765 extern bool supportable_narrowing_operation (enum tree_code, const_gimple, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
766 tree, 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
|
767 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
|
768 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
|
769 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
|
770 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
|
771 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
|
772 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
|
773 slp_tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
774 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
|
775 slp_tree); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
776 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
|
777 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
|
778 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
|
779 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
|
780 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
|
781 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
|
782 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
|
783 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
|
784 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
|
785 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
|
786 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
|
787 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
|
788 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
|
789 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
|
790 tree, int); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
791 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
792 /* 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
|
793 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
|
794 extern enum dr_alignment_support vect_supportable_dr_alignment |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
795 (struct data_reference *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
796 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
|
797 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
|
798 extern bool vect_analyze_data_ref_dependences (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
|
799 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
|
800 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
|
801 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
|
802 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
|
803 extern bool vect_prune_runtime_alias_test_list (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
|
804 extern bool vect_analyze_data_refs (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
|
805 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
|
806 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
|
807 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
|
808 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
|
809 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
|
810 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
|
811 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
|
812 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
|
813 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
|
814 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
|
815 struct loop **); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
816 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
|
817 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
|
818 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
|
819 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
|
820 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
|
821 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
|
822 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
|
823 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
|
824 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
825 /* 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
|
826 /* 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
|
827 extern void destroy_loop_vec_info (loop_vec_info, 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 gimple vect_is_simple_reduction (loop_vec_info, 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
|
829 /* 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
|
830 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
|
831 /* 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
|
832 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
|
833 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
|
834 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
|
835 gimple *); |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
836 extern bool vectorizable_reduction (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
|
837 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
|
838 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
|
839 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
|
840 extern int vect_min_worthwhile_factor (enum tree_code); |
0 | 841 |
842 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
843 /* 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
|
844 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
|
845 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
|
846 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
|
847 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
|
848 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
|
849 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
|
850 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
|
851 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
|
852 extern void vect_detect_hybrid_slp (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
|
853 extern void vect_get_slp_defs (slp_tree, 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
|
854 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
|
855 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
|
856 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
|
857 extern void vect_slp_transform_bb (basic_block); |
0 | 858 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
859 /* In tree-vect-patterns.c. */ |
0 | 860 /* Pattern recognition functions. |
861 Additional pattern recognition functions can (and will) be added | |
862 in the future. */ | |
863 typedef gimple (* vect_recog_func_ptr) (gimple, tree *, tree *); | |
864 #define NUM_PATTERNS 4 | |
865 void vect_pattern_recog (loop_vec_info); | |
866 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
867 /* 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
|
868 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
|
869 /* Vectorization debug information */ |
0 | 870 extern bool vect_print_dump_info (enum verbosity_levels); |
871 | |
872 #endif /* GCC_TREE_VECTORIZER_H */ |