comparison gcc/tree-vect-analyze.c @ 19:58ad6c70ea60

update gcc from 4.4.0 to 4.4.1.
author kent@firefly.cr.ie.u-ryukyu.ac.jp
date Thu, 24 Sep 2009 13:21:57 +0900
parents a06113de4d67
children 3bfb6c00c1e0
comparison
equal deleted inserted replaced
18:33936f7f2835 19:58ad6c70ea60
197 { 197 {
198 fprintf (vect_dump, "==> examining statement: "); 198 fprintf (vect_dump, "==> examining statement: ");
199 print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); 199 print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
200 } 200 }
201 201
202 if (gimple_has_volatile_ops (stmt))
203 {
204 if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
205 fprintf (vect_dump, "not vectorized: stmt has volatile"
206 " operands");
207
208 return false;
209 }
210
202 gcc_assert (stmt_info); 211 gcc_assert (stmt_info);
203 212
204 /* skip stmts which do not need to be vectorized. */ 213 /* skip stmts which do not need to be vectorized. */
205 if (!STMT_VINFO_RELEVANT_P (stmt_info) 214 if (!STMT_VINFO_RELEVANT_P (stmt_info)
206 && !STMT_VINFO_LIVE_P (stmt_info)) 215 && !STMT_VINFO_LIVE_P (stmt_info))
2185 struct data_reference *data_ref = dr; 2194 struct data_reference *data_ref = dr;
2186 unsigned int count = 1; 2195 unsigned int count = 1;
2187 tree next_step; 2196 tree next_step;
2188 tree prev_init = DR_INIT (data_ref); 2197 tree prev_init = DR_INIT (data_ref);
2189 gimple prev = stmt; 2198 gimple prev = stmt;
2190 HOST_WIDE_INT diff, count_in_bytes; 2199 HOST_WIDE_INT diff, count_in_bytes, gaps = 0;
2191 2200
2192 while (next) 2201 while (next)
2193 { 2202 {
2194 /* Skip same data-refs. In case that two or more stmts share data-ref 2203 /* Skip same data-refs. In case that two or more stmts share data-ref
2195 (supported only for loads), we vectorize only the first stmt, and 2204 (supported only for loads), we vectorize only the first stmt, and
2247 { 2256 {
2248 if (vect_print_dump_info (REPORT_DETAILS)) 2257 if (vect_print_dump_info (REPORT_DETAILS))
2249 fprintf (vect_dump, "interleaved store with gaps"); 2258 fprintf (vect_dump, "interleaved store with gaps");
2250 return false; 2259 return false;
2251 } 2260 }
2261
2262 gaps += diff - 1;
2252 } 2263 }
2253 2264
2254 /* Store the gap from the previous member of the group. If there is no 2265 /* Store the gap from the previous member of the group. If there is no
2255 gap in the access, DR_GROUP_GAP is always 1. */ 2266 gap in the access, DR_GROUP_GAP is always 1. */
2256 DR_GROUP_GAP (vinfo_for_stmt (next)) = diff; 2267 DR_GROUP_GAP (vinfo_for_stmt (next)) = diff;
2263 2274
2264 /* COUNT is the number of accesses found, we multiply it by the size of 2275 /* COUNT is the number of accesses found, we multiply it by the size of
2265 the type to get COUNT_IN_BYTES. */ 2276 the type to get COUNT_IN_BYTES. */
2266 count_in_bytes = type_size * count; 2277 count_in_bytes = type_size * count;
2267 2278
2268 /* Check that the size of the interleaving is not greater than STEP. */ 2279 /* Check that the size of the interleaving (including gaps) is not greater
2269 if (dr_step < count_in_bytes) 2280 than STEP. */
2281 if (dr_step && dr_step < count_in_bytes + gaps * type_size)
2270 { 2282 {
2271 if (vect_print_dump_info (REPORT_DETAILS)) 2283 if (vect_print_dump_info (REPORT_DETAILS))
2272 { 2284 {
2273 fprintf (vect_dump, "interleaving size is greater than step for "); 2285 fprintf (vect_dump, "interleaving size is greater than step for ");
2274 print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM); 2286 print_generic_expr (vect_dump, DR_REF (dr), TDF_SLIM);