comparison gcc/ChangeLog.graphite @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents
children b7f97abdc517
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
1 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
2
3 Revert patch fixing PR middle-end/42221.
4
5 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
6
7 PR middle-end/42180
8 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
9 GIMPLE_CALL.
10
11 * testsuite/gfortran.dg/graphite/pr42180.f90: Add compile flags.
12
13 2009-12-18 Sebastian Pop <sebastian.pop@amd.com>
14
15 PR middle-end/42180
16 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
17 that contain only one statement.
18
19 * testsuite/gfortran.dg/graphite/pr42180.f90: New.
20
21 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
22
23 PR middle-end/42393
24 * testsuite/gfortran.dg/graphite/pr42393.f90: New.
25
26 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
27
28 PR middle-end/42186
29 * testsuite/gfortran.dg/graphite/pr42186.f90: New.
30
31 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
32
33 PR middle-end/42205
34 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
35 Insert the reduction copy in the same block as the phi node.
36 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
37
38 * testsuite/gcc.dg/graphite/pr42205-1.c: New.
39 * testsuite/gcc.dg/graphite/pr42205-2.c: New.
40
41 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
42
43 PR middle-end/42221
44 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
45 the array indexing of ADDR_EXPRs.
46
47 * testsuite/gcc.dg/graphite/pr42221.c: New.
48
49 2009-12-17 Sebastian Pop <sebastian.pop@amd.com>
50
51 PR middle-end/42178
52 PR middle-end/42334
53 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
54 index. Call lst_interchange_select_inner only once.
55 (lst_interchange_select_inner): Update use of lst_try_interchange.
56 (lst_interchange_select_outer): Update.
57
58 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
59
60 PR middle-end/42178
61 PR middle-end/42334
62 * graphite-interchange.c (lst_try_interchange): Do not increment the
63 the OUTER index when there is no AFTER kernel. Do not increment the
64 OUTER index for after processing the AFTER kernel.
65 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
66 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
67 index. Do not pass to lst_interchange_select_inner the OUTER index.
68 (scop_do_interchange): Update use of lst_interchange_select_outer.
69
70 * testsuite/gfortran.dg/graphite/graphite.exp
71 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
72 * testsuite/gfortran.dg/graphite/interchange-1.f: Add comment. Clean
73 the graphite dump file.
74 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
75 * testsuite/gfortran.dg/graphite/pr42334-1.f: New.
76
77 2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
78
79 PR middle-end/42178
80 PR middle-end/42334
81 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
82 that are empty.
83 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
84 (lst_try_interchange): Reimplemented.
85 (lst_interchange_select_inner): Same.
86 (lst_do_interchange): Renamed lst_interchange_select_outer.
87 Reimplemented.
88 (scop_do_interchange): Update use of lst_interchange_select_outer.
89
90 * testsuite/g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
91 * testsuite/gcc.dg/graphite/block-0.c: Un-XFAILed.
92 * testsuite/gcc.dg/graphite/pr42211.c: New.
93 * testsuite/gfortran.dg/graphite/pr42334.f90: New.
94
95 2009-12-14 Sebastian Pop <sebastian.pop@amd.com>
96
97 PR middle-end/42181
98 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
99 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
100
101 * testsuite/gfortran.dg/graphite/pr42181.f90: New.
102
103 2009-12-12 Sebastian Pop <sebpop@gmail.com>
104
105 PR middle-end/42284
106 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
107 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
108 (detect_commutative_reduction_arg): Simplified.
109 (detect_commutative_reduction): Early return when the argument of
110 the close phi is not of an SSA_NAME.
111
112 * testsuite/gcc.dg/graphite/pr42284.c: New.
113
114 2009-12-11 Alexander Monakov <amonakov@ispras.ru>
115
116 * dbgcnt.def (graphite_scop): New counter.
117 * graphite.c: Include dbgcnt.h
118 (graphite_transform_loops): Use new counter to limit transformations.
119
120 2009-12-08 Sebastian Pop <sebpop@gmail.com>
121
122 PR middle-end/42285
123 * graphite-scop-detection.c (graphite_can_represent_init): Also
124 handle more complex MULT_EXPRs containing parameters by recursion
125 on the structure.
126
127 * testsuite/gfortran.dg/graphite/pr42285.f90: New.
128
129 2009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
130
131 * testsuite/g++.dg/graphite/pr42130.C: Fix type.
132
133 2009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
134
135 * testsuite/g++.dg/graphite/pr42130.C: Correct testcase.
136
137 2009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
138
139 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
140 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
141
142 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
143
144 PR middle-end/42130
145 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
146 translate_clast_for_loop): New.
147 (translate_clast_for): Add a condition around the loop, to do not
148 execute loops with zero iterations.
149 * testsuite/g++.dg/graphite/pr42130.C: New.
150 * testsuite/gcc.dg/graphite/pr35356-2.c: Adapt.
151
152 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
153
154 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
155 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
156 Remove context_loop and level.
157
158 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
159
160 * graphite-clast-to-gimple.c (translate_clast_user,
161 translate_clast_for, translate_clast_guard): Simplify and move common
162 elements to translate_clast().
163 (translate_clast): Simplify and get common elements.
164
165 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
166
167 * graphite-clast-to-gimple.c (translate_clast_user,
168 translate_clast_for, translate_clast_guard): Split out of
169 translate_clast.
170
171 2009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
172
173 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
174 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
175 debug_clast_name_indexes_1, debug_clast_name_indexes,
176 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
177 (clast_name_to_gcc, clast_to_gcc_expression,
178 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
179 gcc_type_for_clast_eq, graphite_translate_clast_equation,
180 graphite_create_guard_cond_expr, graphite_create_new_loop,
181 translate_clast): Add params_index.
182 (initialize_cloog_names): Create parameter strings from scratch, do
183 not reference other strings.
184 (create_params_index): New.
185 (gloog): Initialize params_index.
186 * graphite-scop-detection (free_scops_1): Removed.
187 (limit_scops): Use normal free_scops.
188 * graphite-sese-to-poly.c (save_var_names): Removed.
189 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
190 and SESE_PARAMS_INDEX.
191 * sese.c (new_sese, free_sese): Dito.
192 * sese.h (struct sese): Remove params_index, params_names.
193 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
194
195 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
196
197 Revert the following patch from 2009-09-14:
198 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
199 tree-scalar-evolution.h, and then tree-data-ref.h.
200 * graphite-clast-to-gimple.c: Same.
201 * graphite-dependences.c: Same.
202 * graphite-interchange.c: Same.
203 * graphite-poly.c: Same.
204 * graphite-scop-detection.c: Same.
205 * graphite-sese-to-poly.c: Same.
206 * graphite.c: Same.
207 * lambda-code.c: Same.
208 * matrix-reorg.c: Same.
209 * tree-data-ref.c: Same.
210 * tree-if-conv.c: Same.
211 * tree-loop-distribu: Same.: Same.
212 * tree-loop-linear.c: Same.
213 * tree-parloops.c: Same.
214 * tree-predcom.c: Same.
215 * tree-vect-patterns.c: Same.
216
217 2009-11-20 Sebastian Pop <sebastian.pop@amd.com>
218
219 Revert patch from 2009-09-14.
220 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
221 passes at -O1 and below.
222
223 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
224
225 PR middle-end/40281
226 * testsuite/gcc.dg/graphite/pr40281.c: New.
227
228 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
229 evolutions should not variate in inner loops.
230
231 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
232
233 PR middle-end/42050
234 * testsuite/gfortran.dg/graphite/pr42050.f90: New.
235
236 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
237
238 * graphite-interchange.c (memory_strides_in_loop_depth): New.
239 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
240
241 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
242
243 * graphite-blocking.c (scop_do_block): New.
244 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
245 * graphite-poly.h (scop_do_block): Declared.
246
247 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
248
249 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
250 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
251 to transform depth into the time_depth before calling
252 pbb_number_of_iterations_at_time.
253 (lst_do_strip_mine): Use a scalar variable instead of recomputing
254 lst_depth.
255
256 2009-11-18 Sebastian Pop <sebastian.pop@amd.com>
257
258 Reverted the patch for "scattering permutations" from 2009-10-28.
259
260 * graphite-poly.c (print_permutation): New.
261 (debug_permutation): New.
262 (new_poly_bb): Initialize PBB_PERMUTATION.
263 (free_poly_bb): Free PBB_PERMUTATION.
264 * graphite-poly.h (pbb_permutation_elt_p): Declared.
265 (struct pbb_permutation_elt): New.
266 (PBB_PERMUTATION_ELT_STRIDE): New.
267 (PBB_PERMUTATION_ELT_STRIDED_P): New.
268 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
269 (new_pbb_permutation_elt): New.
270 (pbb_permutation_elt_free): New.
271 (struct poly_bb): Add field permutation.
272 (PBB_PERMUTATION): New.
273 (print_permutation): Declared.
274 (debug_permutation): Declared.
275
276 2009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
277
278 * graphite-interchange.c (build_partial_difference): New.
279 (memory_stride_in_loop): Refactored the computation of
280 equality constraints into build_partial_difference function.
281 Added support for debugging stride computations.
282
283 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
284
285 * graphite-clast-to-gimple.c (gloog): Free if_region,
286 if_region->true_region, and if_region->region.
287 * sese.c (if_region_set_false_region): Free if_region->false_region.
288 (create_if_region_on_edge): Do not use GGC_NEW.
289 (move_sese_in_condition): Remove useless initialization.
290
291 2009-11-03 Sebastian Pop <sebastian.pop@amd.com>
292
293 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
294 for the loops created by the loop distribution. Do not modify the
295 input LSTs.
296 (lst_try_interchange_loops): Same. Use a temporary LST for the
297 transformed schedule. Call lst_update_scattering before data
298 dependence analysis.
299 (lst_try_interchange): Pass an extra parameter INDEX.
300 (lst_do_interchange_1): New.
301 (lst_do_interchange): Call lst_do_interchange_1.
302 (scop_do_interchange): Call lst_update_scattering.
303 * graphite-poly.c (apply_poly_transforms): Do not call
304 lst_update_scattering.
305 * graphite-poly.h (lst_pred): New.
306 (lst_succ): New.
307 (lst_find_first_pbb): Return NULL when not found.
308 (lst_empty_p): New.
309 (lst_insert_in_sequence): Allow LST1 to be NULL.
310 (lst_replace): New.
311 (lst_substitute_3): New.
312 * gcc.dg/graphite/interchange-1.c: XFail.
313 * gcc.dg/graphite/interchange-8.c: XFail.
314 * gcc.dg/graphite/interchange-11.c: XFail.
315
316 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
317
318 * graphite-interchange.c (lst_perfectly_nested_p): New.
319 (lst_perfect_nestify): New.
320 (lst_try_interchange_loops): Call store_lst_schedule,
321 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
322 (scop_do_interchange): Avoid redundant legality test.
323 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
324 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
325 * graphite-poly.h (psct_static_dim): New.
326 (lst_dewey_number_at_depth): New.
327 (lst_find_pbb): Restructured.
328 (lst_find_first_pbb): Restructured.
329 (lst_find_last_pbb): New.
330 (lst_contains_p): New.
331 (lst_contains_pbb): New.
332 (lst_create_nest): New.
333 (lst_remove_from_sequence): New.
334 (pbb_update_scattering): New.
335 (lst_update_scattering_under): New.
336 (lst_update_scattering_seq): New.
337 (lst_update_scattering): New.
338 (lst_insert_in_sequence): New.
339 (lst_distribute_lst): New.
340 (lst_remove_all_before_including_pbb): New.
341 (lst_remove_all_before_excluding_pbb): New.
342
343 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
344
345 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
346 get_loop_exit_edges.
347
348 2009-10-30 Sebastian Pop <sebastian.pop@amd.com>
349
350 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
351
352 2009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
353
354 * graphite-poly.c (print_permutation): New.
355 (debug_permutation): New.
356 (new_poly_bb): Initialize PBB_PERMUTATION.
357 (free_poly_bb): Free PBB_PERMUTATION.
358 * graphite-poly.h (pbb_permutation_elt_p): Declared.
359 (struct pbb_permutation_elt): New.
360 (PBB_PERMUTATION_ELT_STRIDE): New.
361 (PBB_PERMUTATION_ELT_STRIDED_P): New.
362 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
363 (new_pbb_permutation_elt): New.
364 (pbb_permutation_elt_free): New.
365 (struct poly_bb): Add field permutation.
366 (PBB_PERMUTATION): New.
367 (print_permutation): Declared.
368 (debug_permutation): Declared.
369
370 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
371
372 * graphite-clast-to-gimple.c (gloog): Do not call
373 sese_reset_aux_in_loops.
374 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
375 extra argument for domains. Do not use loop->aux.
376 (build_scop_iteration_domain): Initialize and free domains, pass it
377 to build_loop_iteration_domains and extract the information from
378 domains. Do not use loop->aux.
379 * sese.c (sese_reset_aux_in_loops): Removed.
380 * sese.h (sese_reset_aux_in_loops): Removed.
381
382 2009-10-26 Sebastian Pop <sebastian.pop@amd.com>
383
384 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
385 (dependency_in_loop_p): Same.
386 (translate_clast): Do not use loop->aux. Initialize
387 loop->can_be_parallel.
388 (mark_loops_parallel): Removed.
389 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
390 * graphite.c (free_aux_in_new_loops): Removed.
391 (graphite_finalize): Do not call free_aux_in_new_loops.
392 (graphite_transform_loops): Do not call mark_loops_parallel.
393
394 2009-10-26 Li Feng <nemokingdom@gmail.com>
395
396 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
397 (translate_clast): Pass an extra parameter LEVEL.
398 Call get_scattering_level.
399 * graphite-clast-to-gimple.h (get_scattering_level): New.
400
401 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
402
403 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
404 * cfgloop.h (struct loop): New field single_iv.
405
406 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
407 loop->aux anymore: use loop->single_iv.
408 (graphite_loop_normal_form): Moved...
409 (build_graphite_loop_normal_form): Removed.
410 (gloog): Do not call build_graphite_loop_normal_form.
411 (free_aux_in_new_loops): Moved...
412 (mark_loops_parallel): Restructure.
413 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
414 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
415 (scop_canonicalize_loops): New.
416 (build_poly_scop): Call scop_canonicalize_loops.
417 * graphite.c (free_aux_in_new_loops): ...here.
418
419 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
420
421 * g++.dg/graphite/graphite.exp: Add the same rules as in
422 gcc.dg/graphite/graphite.exp.
423
424 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
425
426 * g++.dg/graphite/id-1.C: New.
427
428 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
429
430 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
431 argument base_name.
432 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
433 (rewrite_phi_out_of_ssa): Same.
434 (rewrite_cross_bb_scalar_deps): Same.
435 (translate_scalar_reduction_to_array): Same.
436
437 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
438
439 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
440 dump_alias_graphs.
441
442 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
443
444 * graphite-sese-to-poly.c (dump_alias_graphs): New.
445 (build_scop_drs): Call dump_alias_graphs.
446
447 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
448
449 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
450 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
451 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
452 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
453 * graphite-poly.h (free_lst): New.
454 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
455 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
456
457 2009-10-22 Sebastian Pop <sebastian.pop@amd.com>
458
459 * graphite-poly.h (struct scop): Add a field saved_schedule.
460 (SCOP_SAVED_SCHEDULE): New.
461 (store_lst_schedule): New.
462 (restore_lst_schedule): New.
463 (store_scattering): Call store_lst_schedule.
464 (restore_scattering): Call restore_lst_schedule.
465
466 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
467
468 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
469 (pdr_add_alias_set): Same.
470 (build_poly_dr): Same.
471 (build_alias_set_optimal_p): Same.
472 (build_base_obj_set_for_drs): Same. Do not store the result of
473 graphds_dfs.
474
475 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
476
477 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
478 all_components_are_cliques to 1.
479
480 2009-10-20 Li Feng <nemokingdom@gmail.com>
481
482 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
483 the new structure.
484 (pdr_add_alias_set): Update retrieving alias_set_num.
485 (build_poly_dr): Update retrieving dr_base_object_set.
486 (partition_drs_to_sets): Remove.
487 (build_alias_set_optimal_p): New.
488 (build_alias_set_for_drs): Rename.
489 (build_scop_drs): Update.
490 * graphite-sese-to-poly.h (struct base_alias_pair): New.
491 (ALIAS_SET_INDEX): Remove.
492 (BASE_OBJECT_SET_INDEX): Remove.
493
494 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
495
496 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
497
498 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
499
500 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
501 loop upper bounds for 1-element arrays at end of structures.
502 * tree-flow.h (array_at_struct_end_p): Declared.
503 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
504
505 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
506
507 * g++.dg/graphite/pr41305.C: New.
508
509 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
510
511 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
512 construction of parameter constraints from loop iteration analysis.
513 * gcc.dg/graphite/run-id-2.c: New test.
514
515 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
516
517 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
518 and new_cstr.
519
520 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
521
522 * graphite-dependences.c (dependence_polyhedron_1): Remove
523 unused gdim dimensions from the DDR polyhedron.
524
525 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
526
527 * graphite-dependences.c (pddr_transformed_scattering): New.
528 (dot_original_deps_stmt_1): New.
529 (dot_transformed_deps_stmt_1): New.
530 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
531 dot_transformed_deps_stmt_1.
532 (dot_original_deps): New.
533 (dot_transformed_deps): New.
534 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
535
536 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
537
538 * graphite-dependences.c (reduction_dr_1): Remove wrong
539 assert: reduction BBs can have multiple reduction writes
540 to memory. interchange-3.f90 is an example.
541
542 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
543
544 * gfortran.dg/graphite/interchange-3.f90: New.
545
546 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
547
548 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
549
550 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
551
552 * graphite-dependences.c (dependence_polyhedron_1): Add the
553 context to the dependence polyhedron.
554
555 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
556
557 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
558 PBB_PDR_DUPLICATES_REMOVED.
559 (new_poly_bb): Same.
560
561 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
562
563 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
564 SCOP_CONTEXT.
565 (build_loop_iteration_domains): Extract bounds on parameters
566 based on the data size.
567 (build_scop_context): Do not initialize SCOP_CONTEXT;
568 add new constraints.
569
570 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
571
572 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
573 * graphite-ppl.h (graphite-ppl.h): Declared.
574
575 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
576
577 * graphite-ppl.c (ppl_print_linear_expr): New.
578 (debug_ppl_linear_expr): New.
579 * graphite-ppl.h (ppl_print_linear_expr): Declared.
580 (debug_ppl_linear_expr): Declared.
581
582 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
583
584 * graphite-interchange.c: Fix comments.
585 * gcc.dg/graphite/block-1.c: Fix comments.
586
587 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
588
589 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
590 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
591
592 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
593
594 Reapply the patch from Alexander Monakov that disappeared during
595 the last merges from trunk.
596
597 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
598
599 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
600 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
601
602 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
603
604 * graphite-interchange.c (memory_stride_in_loop): The depth
605 argument corresponds to a dynamic time dimension, so use
606 psct_dynamic_dim to refer to the transformed scattering dimension.
607
608 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
609
610 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
611
612 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
613
614 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
615 root of the LST.
616 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
617 the root of the LST.
618 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
619 fake loop.
620 (print_lst): Print the root of LST in a different format.
621 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
622
623 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
624
625 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
626
627 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
628
629 * doc/passes.texi: Document the Graphite infrastructure.
630
631 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
632
633 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
634 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
635 and check the SSA representation.
636
637 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
638
639 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
640
641 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
642
643 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
644
645 * gcc.dg/graphite/interchange-11.c: New.
646
647 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
648
649 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
650
651 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
652
653 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
654 Add -fno-loop-strip-mine and -fno-loop-interchange.
655 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
656 -fno-loop-strip-mine.
657 * gfortran.dg/graphite/graphite.exp: Same.
658
659 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
660
661 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
662 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
663 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
664 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
665 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
666 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
667 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
668 DEFAULT_FLAGS_GRAPHITE_SCOP.
669 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
670 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
671
672 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
673
674 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
675
676 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
677 Sebastian Pop <sebastian.pop@amd.com>
678
679 * graphite-interchange.c (build_linearized_memory_access): Pass an
680 offset as parameter.
681 (memory_stride_in_loop): Include transform scattering in the
682 access functions to be able to querry the strides in the
683 transformed loops.
684 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
685 not the psct_iterator_dim.
686
687 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
688
689 * graphite-blocking.c (pbb_do_strip_mine): Removed.
690 (lst_do_strip_mine_loop): New.
691 (lst_do_strip_mine): New.
692 (scop_do_strip_mine): Call lst_do_strip_mine.
693 * graphite-poly.h (lst_add_loop_under_loop): New.
694 (lst_find_first_pbb): New.
695
696 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
697
698 * graphite-poly.c (loop_to_lst): Fix LST creation.
699
700 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
701
702 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
703 sizeof(unsigned long) to make it run on 32bit systems.
704
705 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
706
707 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
708 SEGFAULT on 32bit.
709
710 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
711
712 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
713 Comment.
714 (write_alias_graph_to_ascii_dot): New.
715 (write_alias_graph_to_ascii_ecc): Ditto.
716 (partition_drs_to_sets): Add testing of optimality of current method
717 which assigns alias numbers according to DFS Comopnent number. used
718 as heuristic for the upcoming ECC algorithm.
719 (build_scop_drs): Write to file also with the ecc and dot format.
720
721 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
722
723 * gfortran.dg/graphite/interchange-1.f: XFail.
724
725 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
726
727 * graphite.c (graphite_initialize): Do not handle functions with
728 more than 100 basic blocks.
729
730 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
731
732 * graphite-blocking.c (pbb_do_strip_mine): Use
733 PARAM_LOOP_BLOCK_TILE_SIZE.
734
735 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
736
737 * graphite-poly.c (dot_lst_1): New.
738 (dot_lst): New.
739 * graphite-poly.h (dot_lst): Declared.
740
741 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
742
743 * graphite-dependences.c (dot_deps_stmt_1): New.
744 (dot_deps_stmt): New.
745 * graphite-dependences.h (dot_deps_stmt): Declared.
746
747 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
748
749 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
750 not replace cross BB scalar dependences ending on PHI nodes.
751 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
752
753 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
754
755 * graphite-poly.c (apply_poly_transforms): Implement the high
756 level driver for flag_loop_block.
757 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
758 flag_loop_block.
759
760 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
761 -floop-block.
762 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
763 Add -floop-block.
764
765 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
766
767 * graphite-poly.h (lst_find_pbb): New.
768 (find_lst_loop): New.
769
770 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
771
772 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
773 * graphite-poly.h (struct scop): Remove dep_graph field.
774 (SCOP_DEP_GRAPH): Removed.
775
776 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
777
778 * graphite-poly.h (copy_lst): Do full copy of LST.
779
780 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
781
782 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
783 when the loop stride is zero.
784
785 * gcc.dg/graphite/id-16.c: New.
786
787 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
788
789 * graphite-dependences.c (reduction_dr_1): New.
790 (reduction_dr_p): New.
791 (graphite_legal_transform_dr): Call reduction_dr_p.
792 (reduction_ddr): Renamed reduction_ddr_p.
793 * graphite-poly.h (same_pdr_p): New.
794 (number_of_write_pdrs): New.
795 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
796 (split_reduction_stmt): Do not split reduction statements
797 when there are no writes to memory.
798 (translate_scalar_reduction_to_array_for_stmt): Insert the
799 memory reduction statement just after the scalar reduction statement.
800
801 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
802 Un-XFAIL-ed.
803 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
804 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
805
806 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
807
808 * graphite-interchange.c (lst_apply_interchange): New.
809 (lst_interchange_profitable_p): New.
810 (lst_try_interchange_loops): New.
811 (lst_try_interchange): New.
812 (lst_do_interchange): New.
813 (pbb_do_interchange): Removed.
814 (scop_do_interchange): Call lst_do_interchange.
815
816 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
817
818 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
819 SCOP_TRANSFORMED_SCHEDULE.
820 (loop_to_lst): New.
821 (scop_to_lst): New.
822 (print_lst): New.
823 (debug_lst): New.
824 * graphite-poly.h (lst_p): New.
825 (struct lst): New.
826 (LST_LOOP_P): New.
827 (LST_LOOP_FATHER): New.
828 (LST_PBB): New.
829 (LST_SEQ): New.
830 (scop_to_lst): Declared.
831 (print_lst): Declared.
832 (debug_lst): Declared.
833 (new_lst_loop): New.
834 (new_lst_stmt): New.
835 (copy_lst): New.
836 (lst_depth): New.
837 (lst_dewey_number): New.
838 (struct scop): Add original_schedule and transformed_schedule fields.
839 (SCOP_ORIGINAL_SCHEDULE): New.
840 (SCOP_TRANSFORMED_SCHEDULE): New.
841 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
842
843 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
844
845 * graphite-dependences.c (reduction_ddr): New.
846 (graphite_legal_transform_bb): Call reduction_ddr.
847 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
848 Initialize PBB_IS_REDUCTION.
849 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
850 (PBB_IS_REDUCTION): New.
851 (new_poly_bb): Update declaration.
852 * graphite-scop-detection.h (build_scop_bbs): Removed.
853 (nb_reductions_in_loop): Removed.
854 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
855 parameter for reductions.
856 (try_generate_gimple_bb): Update call to new_poly_bb.
857 (build_scop_bbs_1): Same.
858 (build_scop_bbs): Same.
859 (gsi_for_phi_node): New.
860 (scalar_close_phi_node_p): Remove gcc_assert.
861 (split_reduction_stmt): New.
862 (is_reduction_operation_p): New.
863 (phi_contains_arg): New.
864 (follow_ssa_with_commutative_ops): New.
865 (detect_commutative_reduction_arg): New.
866 (detect_commutative_reduction_assign): New.
867 (follow_inital_value_to_phi): New.
868 (edge_initial_value_for_loop_phi): New.
869 (initial_value_for_loop_phi): New.
870 (detect_commutative_reduction): New.
871 (translate_scalar_reduction_to_array_for_stmt): New.
872 (insert_copyout): New.
873 (insert_copyin): New.
874 (translate_scalar_reduction_to_array): New.
875 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
876 (rewrite_commutative_reductions_out_of_ssa_loop): New.
877 (rewrite_commutative_reductions_out_of_ssa): New.
878 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
879 * sese.h (split_region_for_bb): New.
880
881 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
882 * gcc.dg/graphite/interchange-1.c: Fix format.
883 * gcc.dg/graphite/interchange-10.c: New.
884
885 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
886
887 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
888 buggy assert.
889
890 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
891
892 * graphite-sese-to-poly.c (scev_analyzable_p): New.
893 (rewrite_cross_bb_scalar_dependence): New.
894 (rewrite_cross_bb_scalar_deps): New.
895 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
896 Call rewrite_cross_bb_scalar_deps.
897
898 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
899
900 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
901 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
902 gsi_for_stmt.
903
904 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
905
906 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
907 * graphite-interchange.c (pbb_do_interchange): Same.
908 * graphite-poly.c (print_scattering_function): Same.
909 (debug_pdrs): Same.
910 * graphite-poly.h (pbb_loop): New.
911 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
912
913 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
914
915 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
916
917 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
918
919 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
920 so don't pass a pointer to it.
921 (build_alias_set_for_drs): Same.
922 (build_base_obj_set_for_drs): Same.
923 (build_scop_drs): Same.
924
925 2009-09-26 Li Feng <nemokingdom@gmail.com>
926
927 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
928 the alias graph of data references.
929
930 2009-09-25 Li Feng <nemokingdom@gmail.com>
931
932 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
933 (build_scop_drs): When debugging, write the alias graph to file,
934 otherwise, should be disabled.
935
936 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
937
938 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
939 (is_simple_operand): Remove call to stmt_simple_memref_p.
940 (stmt_simple_for_scop_p): Update call to is_simple_operand.
941
942 2009-09-17 David Edelsohn <edelsohn@gnu.org>
943
944 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
945 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
946 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
947 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
948 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
949
950 2009-09-17 Li Feng <nemokingdom@gmail.com>
951
952 PR middle-end/41118
953 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
954 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
955 (graphite_carried_dependence_level_k): Ditto.
956 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
957 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
958 (new_poly_dr): Adjust declaration.
959 * graphite-sese-to-poly.c (free_data_refs_aux): New.
960 (free_gimple_bb): Added free_data_refs_aux.
961 (build_poly_dr): Add dr_base_object_set.
962 (partition_drs_to_sets): New.
963 (dr_same_base_object_p): New.
964 (build_alias_set_for_drs): New.
965 (build_base_object_set_for_drs): New.
966 (build_scop_drs): Add build_base_obj_set_for_drs.
967 * graphite-sese-to-poly.h: Added #define for alias set number index and
968 base object set index.
969 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
970 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
971
972 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
973
974 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
975 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
976
977 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
978
979 * graphite-sese-to-poly.c (struct irp_data): Removed.
980 (idx_record_params): Removed.
981 (find_params_in_bb): Scan for parameters the access functions; don't
982 parse the tree representation.
983
984 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
985
986 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
987 passes at -O1 and below.
988
989 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
990
991 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
992 tree-scalar-evolution.h, and then tree-data-ref.h.
993 * graphite-clast-to-gimple.c: Same.
994 * graphite-dependences.c: Same.
995 * graphite-interchange.c: Same.
996 * graphite-poly.c: Same.
997 * graphite-scop-detection.c: Same.
998 * graphite-sese-to-poly.c: Same.
999 * graphite.c: Same.
1000 * lambda-code.c: Same.
1001 * matrix-reorg.c: Same.
1002 * tree-data-ref.c: Same.
1003 * tree-if-conv.c: Same.
1004 * tree-loop-distribu: Same.: Same.
1005 * tree-loop-linear.c: Same.
1006 * tree-parloops.c: Same.
1007 * tree-predcom.c: Same.
1008 * tree-vect-patterns.c: Same.
1009
1010 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
1011
1012 Partially revert the previous patch, except the following.
1013 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
1014 as parameters the operands of the not expression.
1015
1016 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1017
1018 * tree-scalar-evolution.c (instantiate_scev_assign): New.
1019 Do not call analyze_scalar_evolution on assignments.
1020 (instantiate_scev_phi): Call analyze_scalar_evolution.
1021 (instantiate_scev_name): Call instantiate_scev_assign and
1022 instantiate_scev_phi.
1023 (instantiate_scev_not): Adapted to pass as parameters the operands
1024 of the not expression.
1025
1026 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1027
1028 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
1029 to pass as parameters the operands of the binary expression.
1030
1031 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1032
1033 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
1034 instantiate_scev_not. Handle NEGATE_EXPR.
1035 (instantiate_scev_r): Handle NEGATE_EXPR.
1036
1037 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1038
1039 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
1040 instantiate_scev_r.
1041 (instantiate_scev_r): Move code in instantiate_scev_2
1042 and instantiate_scev_1.
1043
1044 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1045
1046 * tree-scalar-evolution.c (instantiate_scev_3): New.
1047 (instantiate_scev_1): Move code in instantiate_scev_3.
1048
1049 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1050
1051 * tree-scalar-evolution.c (instantiate_scev_poly): New.
1052 (instantiate_scev_1): Move code in instantiate_scev_poly.
1053
1054 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1055
1056 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
1057 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
1058
1059 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1060
1061 * tree-scalar-evolution.c (instantiate_scev_convert): New.
1062 (instantiate_scev_1): Move code in instantiate_scev_convert.
1063
1064 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1065
1066 * tree-scalar-evolution.c (instantiate_scev_binary): New.
1067 (instantiate_scev_1): Move code in instantiate_scev_binary.
1068
1069 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
1070
1071 * tree-scalar-evolution.c (instantiate_scev_name): New.
1072 (instantiate_scev_1): Move code in instantiate_scev_name.
1073
1074 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
1075
1076 * Merge from mainline (150992:151171).
1077
1078 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1079
1080 * graphite-dependences.c (graphite_legal_transform_bb): Call
1081 pbb_remove_duplicate_pdrs.
1082 * graphite-poly.c (can_collapse_pdr): Removed.
1083 (pdr_find_duplicate): Removed.
1084 (can_collapse_pdrs): New.
1085 (pbb_remove_duplicate_pdrs): New.
1086 (new_poly_dr): Do not look for duplicates.
1087 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
1088 (PBB_PDR_DUPLICATES_REMOVED): New.
1089 (pbb_remove_duplicate_pdrs): Declared.
1090
1091 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1092
1093 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
1094 the strides by multiplying by PDR_NB_REFS.
1095 * graphite-poly.c (can_collapse_pdr): New.
1096 (pdr_find_duplicate): New.
1097 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
1098 Initialize PDR_NB_REFS.
1099 * graphite-poly.h (struct poly_dr): Add field nb_refs.
1100 (PDR_NB_REFS): New.
1101 (new_poly_dr): Number of subscripts is a graphite_dim_t.
1102
1103 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1104
1105 Revert one of the previous commits:
1106 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1107 the computation of symmetric data dependence relations.
1108 (dependency_between_pbbs_p): Same.
1109
1110 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1111
1112 PR middle-end/40965
1113 * graphite-poly.c (apply_poly_transforms): Remove legality test before
1114 any transform.
1115
1116 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1117
1118 * graphite-dependences.c (pddr_original_scattering): Return NULL
1119 for read-read dependence relations.
1120 * graphite-poly.h (enum poly_dr_type): Fix comment.
1121 (pdr_read_p): New.
1122 (pdr_write_p): New.
1123 (pdr_may_write_p): New.
1124
1125 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1126
1127 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
1128 (struct poly_dr): Same.
1129 (new_poly_dr): Same.
1130 * graphite-poly.c (new_poly_dr): Same.
1131
1132 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1133 Sebastian Pop <sebastian.pop@amd.com>
1134
1135 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
1136 pbb_strip_mine_time_depth. Changed the implementation so that
1137 transformation is expressed as a transformation on
1138 time (scatttering) dimensions. Also, ensures that the 2d+1
1139 scheduling format is preserved.
1140 (pbb_strip_mine_profitable_p): Profitability is based on the
1141 iteration number of a given time (scattering) dimension,
1142 and not on a original loop depth dimension.
1143 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
1144 (pbb_do_strip_mine): Call psct_dynamic_dim.
1145 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
1146 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
1147 (pbb_nb_dynamic_scattering_transform): New.
1148 (psct_dynamic_dim): New.
1149
1150 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1151
1152 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1153 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
1154 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
1155 * graphite-interchange.c (build_linearized_memory_access): Same.
1156 (memory_stride_in_loop): Same.
1157
1158 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
1159
1160 * graphite-dependences.c (pddr_original_scattering): New.
1161 (graphite_legal_transform_dr): Call pddr_original_scattering.
1162 (dot_deps_1): New.
1163 (dot_deps): New.
1164 * graphite-dependences.h (dot_deps): Declared.
1165 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
1166 (print_pdr): Print PDR_ID.
1167 * graphite-poly.h (struct poly_dr): Add field id.
1168 (PDR_ID): New.
1169 (pbb_index): New.
1170 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
1171
1172 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
1173
1174 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
1175 not delete the original dependence relation.
1176
1177 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1178
1179 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
1180 the computation of symmetric data dependence relations.
1181 (dependency_between_pbbs_p): Same.
1182
1183 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1184
1185 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
1186 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
1187 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
1188 (free_poly_ddr): New.
1189 (pddr_is_empty): New.
1190 (dependence_polyhedron_1): Now returns a poly_ddr_p.
1191 (dependence_polyhedron): Same. Remove useless gcc_assert.
1192 Remove fprintfs.
1193 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
1194 (graphite_carried_dependence_level_k): Call pddr_is_empty.
1195 * graphite-dependences.h (enum poly_dependence_kind): New.
1196 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
1197 (PDRP_SOURCE): Renamed PDDR_SOURCE.
1198 (PDRP_SINK): Renamed PDDR_SINK.
1199 (PDRP_DDP): Renamed PDDR_DDP.
1200 (PDDR_KIND): New.
1201 (free_poly_ddr): Declared.
1202 * graphite-poly.c (new_scop): Use the new hash function names.
1203 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
1204 into original_pddrs.
1205 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
1206
1207 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
1208
1209 * Merge from mainline (150764:150992).
1210
1211 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1212
1213 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
1214 bounds with LT_EXPR to make niter analysis more precise on code
1215 generated by Graphite.
1216
1217 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
1218
1219 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
1220 (graphite_legal_transform_bb): Same.
1221 (poly_drs_may_alias_p): Same.
1222
1223 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
1224
1225 PR middle-end/40981
1226 * graphite-ppl.c (ppl_max_for_le): Correct the use of
1227 ppl_Pointset_Powerset_C_Polyhedron_maximize.
1228
1229 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1230
1231 * graphite-poly.c (print_pbb): Print PBB index.
1232
1233 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1234
1235 * Merge from mainline (r150672:150764).
1236
1237 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
1238
1239 * graphite-interchange.c (ppl_max_for_le): Moved...
1240 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
1241 * graphite-ppl.c (ppl_max_for_le): ... here.
1242 * graphite-ppl.h (ppl_max_for_le): Declared.
1243
1244 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
1245
1246 * Merge from mainline (r150372:150672).
1247
1248 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1249
1250 PR middle-end/40980
1251 * sese.c (convert_for_phi_arg): New.
1252 (add_guard_exit_phis): Use convert_for_phi_arg.
1253
1254 * testsuite/gfortran.dg/graphite/id-17.f: New.
1255
1256 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1257
1258 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
1259 unknown subscript upper bounds.
1260
1261 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
1262
1263 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1264 Pranav Garg <pranav.garg2107@gmail.com>
1265
1266 * graphite-interchange.c (gather_access_strides): Removed.
1267 (ppl_max_for_le): New.
1268 (build_linearized_memory_access): New.
1269 (memory_stride_in_loop): New.
1270 (pbb_interchange_profitable_p): Reimplemented.
1271 * graphite-ppl.h (ppl_new_id_map): New.
1272 (ppl_interchange): New.
1273
1274 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
1275
1276 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1277
1278 * graphite-interchange.c (compute_subscript): Removed.
1279 (compute_array_size_cstr): Removed.
1280 (compute_array_size_poly): Removed.
1281 (compute_array_size): Removed.
1282 (gather_access_strides_poly): Removed.
1283 (gather_access_strides): Empty.
1284
1285 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1286
1287 * graphite-dependences.c (dependence_polyhedron_1): Replace
1288 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
1289 (graphite_legal_transform_dr): Same.
1290 (graphite_carried_dependence_level_k): Same.
1291 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
1292 Initialize PDR_NB_SUBSCRIPTS.
1293 (print_pdr_access_layout): Replace pdr_nb_subscripts with
1294 PDR_NB_SUBSCRIPTS.
1295 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
1296 (PDR_NB_SUBSCRIPTS): New.
1297 (pdr_nb_subscripts): Removed.
1298 (pdr_dim): Simplified.
1299 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
1300 with PDR_NB_SUBSCRIPTS.
1301
1302 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1303
1304 * graphite-interchange.c (compute_array_size): Remove use of
1305 PDR_DATA_CONTAINER.
1306 * graphite-poly.c (new_poly_dr): Remove argument data_container.
1307 Do not initialize PDR_DATA_CONTAINER.
1308 (print_pdr): Do not print PDR_DATA_CONTAINER.
1309 * graphite-poly.h (struct poly_dr): Remove data_container field.
1310 (PDR_DATA_CONTAINER): Removed.
1311 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
1312 PDR_DATA_CONTAINER.
1313 (build_poly_dr): Same.
1314
1315 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
1316
1317 * testsuite/gcc.dg/graphite/interchange-9.c: New.
1318
1319 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1320 Sebastian Pop <sebastian.pop@amd.com>
1321
1322 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
1323 copy of the dependence polyhedron. Free the temporary objects.
1324 (graphite_carried_dependence_level_k): Free unused objects before
1325 returning.
1326
1327 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
1328 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
1329 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
1330 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
1331 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
1332
1333 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1334
1335 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
1336 Early return without analyzing the data dependences if no
1337 transform has been done. Call restore_scattering if the transform
1338 is not legal.
1339 (graphite-interchange.c): Same.
1340 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
1341 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
1342 (apply_poly_transforms): Do not gcc_assert that
1343 the transform is legal.
1344 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1345 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
1346 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
1347 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
1348 * graphite-poly.h (struct poly_scattering): New.
1349 (struct poly_bb): Add original, transformed, and saved fields.
1350 Remove transformed_scattering, original_scattering, nb_local_variables,
1351 and nb_scattering_transform fields.
1352 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
1353 (poly_scattering_new): New.
1354 (poly_scattering_free): New.
1355 (poly_scattering_copy): New.
1356 (store_scattering_pbb): New.
1357 (store_scattering): New.
1358 (restore_scattering_pbb): New.
1359 (restore_scattering): New.
1360 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1361 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
1362
1363 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1364
1365 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
1366 (print_scop): Same.
1367
1368 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1369
1370 * Makefile.in (graphite.o): Depends on PREDICT_H.
1371 * graphite.c: Include predict.h.
1372 (graphite_finalize): Call tree_estimate_probability.
1373 * predict.c (predict_loops): Do not call scev_initialize and
1374 scev_finalize.
1375 (tree_estimate_probability_bb): New.
1376 (tree_estimate_probability): Do not initialize loops: move that
1377 code to the driver. Call tree_estimate_probability_bb.
1378 (tree_estimate_probability_driver): New.
1379 (pass_profile): Use tree_estimate_probability_driver.
1380 * predict.h (tree_estimate_probability): Declared.
1381
1382 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
1383
1384 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
1385 * graphite-dependences.c (graphite_legal_transform): Add time to
1386 TV_GRAPHITE_DATA_DEPS.
1387 (dependency_between_pbbs_p): Same.
1388 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
1389
1390 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
1391
1392 * Merge from mainline (r149952:150372).
1393
1394 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1395
1396 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
1397 * graphite-blocking.c: Same.
1398 * graphite-clast-to-gimple.c: Same.
1399 * graphite-dependences.c: Same.
1400 * graphite-poly.c: Same.
1401 * graphite-poly.h: Same.
1402 * graphite-ppl.c: Same.
1403 * graphite-scop-detection.c: Same.
1404 * graphite-sese-to-poly.c: Same.
1405 * graphite.c: Same.
1406
1407 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1408
1409 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
1410 (remove_simple_copy_phi): New.
1411 (remove_invariant_phi): New.
1412 (simple_copy_phi_p): New.
1413 (reduction_phi_p): New.
1414 (gsi_for_ssa_name_def): New.
1415 (insert_out_of_ssa_copy): New.
1416 (insert_out_of_ssa_copy_on_edge): New.
1417 (create_zero_dim_array): New.
1418 (scalar_close_phi_node_p): New.
1419 (rewrite_close_phi_out_of_ssa): New.
1420 (rewrite_phi_out_of_ssa): New.
1421 (rewrite_reductions_out_of_ssa): New.
1422 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
1423
1424 * testsuite/gcc.dg/graphite/id-11.c: New.
1425 * testsuite/gcc.dg/graphite/id-15.c: New.
1426 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1427 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1428 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1429 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1430 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1431 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1432 * testsuite/gfortran.dg/graphite/id-13.f: New.
1433 * testsuite/gfortran.dg/graphite/id-5.f: New.
1434
1435 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1436
1437 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1438 check that nb_reductions_in_loop is zero.
1439 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1440 reduction phi nodes.
1441 (nb_reductions_in_loop): Removed.
1442 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1443 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1444 (bb_contains_non_iv_scalar_phi_nodes): Removed.
1445 (scop_contains_non_iv_scalar_phi_nodes): Removed.
1446 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1447
1448 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1449
1450 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1451 statements that have an empty iteration domain.
1452 * testsuite/gfortran.dg/graphite/id-16.f: New.
1453
1454 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1455
1456 * tree-scalar-evolution.c (instantiate_scev_1): Return
1457 chrec_dont_know when the result is not above instantiate_below.
1458 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1459 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1460 the tree has a known scalar evolution.
1461 * testsuite/gfortran.dg/graphite/id-14.f: New.
1462 * testsuite/gfortran.dg/graphite/id-15.f: New.
1463
1464 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1465
1466 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1467 insert_gsi.
1468 (rename_variables): Keep inserting renames after the ones already
1469 inserted.
1470
1471 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1472
1473 * graphite-sese-to-poly.c (compare_bb_depths): New.
1474 (graphite_sort_dominated_info): New.
1475 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1476 (build_scop_scattering): Fix comment.
1477
1478 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1479
1480 * graphite.c (graphite_finalize): Call print_loops instead of
1481 dump_function_to_file.
1482 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1483 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1484 loops generated in the graphite output file.
1485 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1486 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1487 * testsuite/gfortran.dg/graphite/id-12.f: New.
1488
1489 2009-07-24 Li Feng <nemokingdom@gmail.com>
1490
1491 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1492 Remove 2 XFAIL.
1493
1494 2009-07-24 Li Feng <nemokingdom@gmail.com>
1495 Tobias Grosser <grosser@fim.uni-passau.de>
1496
1497 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1498 alias set number build alias in ACCESSES polyhedron.
1499 (build_alias_set_for_drs): New.
1500 (build_pbb_drs): Added build_alias_set_for_drs.
1501 * graphite-dependences.c (poly_drs_may_alias_p): New.
1502 (graphite_carried_dependence_level_k): Check alias information
1503 before building polyhedron.
1504
1505 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1506
1507 * Makefile.in (lambda-code.o): Fix formatting.
1508
1509 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1510
1511 * Merge from mainline (r149350-149952)
1512
1513 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1514
1515 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1516 before interchange to prepare for loop blocking.
1517
1518 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1519
1520 * graphite-poly.c (apply_poly_transforms): Add checks after every
1521 transformation.
1522 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1523 done in apply_poly_transforms.
1524
1525 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1526
1527 * graphite-dependences.c (build_lexicographically_gt_constraint):
1528 Replace RES parameter with *RES.
1529 (dependence_polyhedron_1): Pass an address of the parameter RES
1530 instead of value of RES.
1531
1532 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1533
1534 * graphite.c (graphite_finalize): Fix comment.
1535 (graphite_transform_loops): Reset scev info after code generation
1536 of each scop.
1537
1538 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1539
1540 * graphite.c (graphite_finalize): Call scev_reset.
1541
1542 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1543
1544 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1545 GBB_CLOOG_IV_TYPES hash table twice.
1546 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1547 (add_condition_to_domain): Clear GMP values.
1548
1549 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1550
1551 * graphite-dependences.c: Fix formatting.
1552 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1553 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1554 * graphite-sese-to-poly.c: Fix formatting.
1555 * graphite.c (graphite_transform_loops): Create the hash table
1556 after the early return.
1557
1558 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1559
1560 * testsuite/gcc.dg/graphite/id-14.c: New.
1561 * testsuite/gcc.dg/graphite/pr40157.c: New.
1562 * testsuite/gfortran.dg/graphite/id-11.f: New.
1563
1564 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1565
1566 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1567 (build_poly_scop): Return false when there are no pbbs within
1568 loops to avoid to pass to cloog scops with no loops.
1569
1570 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1571
1572 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1573 useless test "i % 2".
1574 (build_pbb_scattering_polyhedrons): Fix formatting.
1575 (build_poly_dr): Same.
1576 * graphite.c (graphite_transform_loops): Restructure.
1577
1578 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1579
1580 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1581 reduction_list parameter.
1582 (rewrite_all_phi_nodes_with_iv): Same.
1583 (canonicalize_loop_ivs): Same.
1584 * tree-parloops.c (struct brli): Removed.
1585 (build_reduction_list_info): Removed.
1586 (build_new_reduction): New.
1587 (analyze_reduction_list): Removed.
1588 (gather_scalar_reductions): Find reductions instead of phi
1589 nodes that can't be canonicalized.
1590 (try_create_reduction_list): Remove reduction_list parameter.
1591 (gen_parallel_loop): Same.
1592 (parallelize_loops): Remove analyze_reductions variable,
1593 initialization and free.
1594 Change reduction_list htab initialization to reduction_info
1595 elements instead of ssa names.
1596 Call try_create_reduction_list and gen_parallel_loop without
1597 analyzed_reduction argument.
1598 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1599 canonicalize_loop_ivs with one less argument.
1600 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1601
1602 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1603
1604 * graphite-dependences.c (new_poly_dr_pair): New.
1605 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1606 (new_poly_dr_pair): New.
1607 (eq_poly_dr_pair_p): New.
1608 (hash_poly_dr_pair_p): New.
1609 * graphite-dependences.h (struct poly_dr_pair): New.
1610 (eq_poly_dr_pair_p): Declared.
1611 (hash_poly_dr_pair_p): Declared.
1612 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1613 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1614 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1615 * Makefile.in (graphite-poly.o): Add dependence on
1616 graphite-dependences.h.
1617
1618 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1619
1620 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1621 polynomials of degree > 1 pass to Graphite.
1622 * tree-chrec.c (scev_is_linear_expression): Call
1623 evolution_function_is_affine_multivariate_p.
1624 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1625
1626 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1627
1628 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1629 Instantiate scevs varying in outer loops.
1630 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1631
1632 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1633
1634 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1635 redundant constraint.
1636
1637 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1638
1639 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1640 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1641 based on the file names as in the C testsuite.
1642 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1643 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1644 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1645 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1646 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1647 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1648 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1649 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1650 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1651 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1652 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1653 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1654 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1655
1656 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1657
1658 * sese.c (expand_scalar_variables_call): New.
1659 (expand_scalar_variables_ssa_name): Handle calls in expander.
1660
1661 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1662
1663 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1664 Expect to see the pattern twice.
1665 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1666 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1667 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1668
1669 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1670
1671 * testsuite/gcc.dg/graphite/id-10.c: New.
1672 * testsuite/gcc.dg/graphite/id-12.c: New.
1673 * testsuite/gfortran.dg/graphite/id-7.f: New.
1674 * testsuite/gfortran.dg/graphite/id-8.f: New.
1675
1676 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1677
1678 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1679 zero.
1680
1681 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1682
1683 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1684
1685 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1686
1687 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1688
1689 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1690
1691 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1692 building PDR subscripts.
1693
1694 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1695
1696 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1697 computation of array sizes.
1698
1699 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1700
1701 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1702
1703 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1704
1705 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1706 build_pairwise_constraint, dr_equality_constraints,
1707 build_pairwise_scheduling_equality,
1708 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1709 build_lexicographically_gt_constraint, dependence_polyhedron,
1710 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1711 Move from NNC_Polyhedron to C_Polyhedron.
1712 * graphite-interchange.c (compute_array_size_poly,
1713 gather_access_strides): Dito.
1714 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1715 free_scop, pbb_number_of_iterations): Dito.
1716 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1717 pbb_dim_iter_domain, struct scop): Dito.
1718 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1719 new_Cloog_Domain_from_ppl_Polyhedron,
1720 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1721 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1722 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1723 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1724 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1725 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1726 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1727 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1728 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1729 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1730 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1731 build_scop_iteration_domain, build_poly_dr): Dito
1732
1733 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1734
1735 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1736 run-id-*.c files.
1737 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1738
1739 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1740
1741 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1742 positivity constraint on the symbolic number of iterations.
1743
1744 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1745
1746 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1747
1748 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1749 Tobias Grosser <grosser@fim.uni-passau.de>
1750
1751 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1752 (build_cloog_prog): Directly use SCOP_CONTEXT.
1753 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1754 (free_scop): Free SCOP_CONTEXT.
1755 (print_scop_context): New.
1756 (print_scop): Call print_scop_context.
1757 (debug_scop_context): New.
1758 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1759 (struct scop): Added field context.
1760 (SCOP_CONTEXT): New.
1761 * graphite-sese-to-poly.c (add_param_constraints): New.
1762 (build_scop_context): New.
1763 (build_poly_scop): Call build_scop_context.
1764
1765 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1766
1767 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1768 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1769 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1770 * graphite-ppl.h: Include double-int.h and tree.h.
1771 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1772 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1773 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1774 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1775
1776 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1777
1778 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1779 POINTER_PLUS_EXPR for pointer types.
1780 (clast_to_gcc_expression): Same.
1781
1782 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1783
1784 * graphite-poly.c (print_scattering_function): Early return when
1785 PBB_TRANSFORMED_SCATTERING is not initialized.
1786 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1787
1788 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1789
1790 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1791 to fix bootstrap.
1792
1793 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1794
1795 * tree-parloops.c (analyze_reduction_list): Change return
1796 value to void.
1797 (try_create_reduction_list): Move the call to
1798 analyze_reduction_list to the beginining.
1799 Call reduction_phi with analyzed_reductions as argument
1800 instead of reduction_list.
1801
1802 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1803
1804 * Merge from mainline (r148296:149346)
1805
1806 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1807
1808 * graphite-scop-detection.c (graphite_can_represent_init): New.
1809 (graphite_can_represent_scev): Call graphite_can_represent_init:
1810 check that the initial value does not contain multiplications of
1811 parameters.
1812 (stmt_has_simple_data_refs_p): New.
1813 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1814 (is_simple_operand): Fix formatting.
1815 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1816
1817 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1818
1819 * testsuite/gcc.dg/graphite/id-13.c: New.
1820 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1821 analyze_scalar_evolution, use scalar_evolution_in_region.
1822 (scan_tree_for_params_right_scev): Add extra assert.
1823 (parameter_index_in_region_1): Split from parameter_index_in_region.
1824 (idx_record_params): Use scalar_evolution_in_region.
1825 (find_params_in_bb): Same.
1826 (find_scop_parameters): Same.
1827 (build_loop_iteration_domains): Same.
1828 (create_linear_expr_from_tree): Same.
1829 * sese.c (scalar_evolution_in_region): New.
1830 * sese.h (scalar_evolution_in_region): Declared.
1831 (defined_in_sese_p): New.
1832 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1833 static anymore.
1834 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1835 Declared.
1836
1837 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1838
1839 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1840 TREE_DATA_REF_H also implies SCEV_H.
1841
1842 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1843
1844 * graphite-poly.c (print_scop_params): New.
1845 (print_scop): Call print_scop_params.
1846 (debug_scop_params): New.
1847 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1848
1849 2009-07-07 Li Feng <nemokingdom@gmail.com>
1850
1851 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1852 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1853 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1854 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1855 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1856 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1857
1858 2009-07-07 Li Feng <nemokingdom@gmail.com>
1859
1860 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1861 for dependency checking part.
1862 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1863 tests for dependency checking.
1864 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1865 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1866 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1867 flag -fdump-tree-graphite-all for autopar testsuites.
1868
1869 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1870
1871 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1872 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1873 canonicalize_loop_ivs): Moved...
1874 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1875
1876 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1877
1878 * tree-parloops.c (try_create_reduction_list): Pass an extra
1879 argument analyzed_reductions. Call analyze_reduction_list.
1880 (gen_parallel_loop): Do not call analyze_reduction_list.
1881 (parallelize_loops): Init and finalize analyzed_reductions.
1882
1883 2009-07-06 Li Feng <nemokingdom@gmail.com>
1884
1885 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1886 Added flag -fno-loop-strip-mine for autopar testcase.
1887
1888 2009-07-04 Li Feng <nemokingdom@gmail.com>
1889
1890 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1891 transformed scattering dimension instead of unmatch orignal when
1892 calling dependence_polyhedron.
1893
1894 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1895
1896 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1897
1898 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1899
1900 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1901 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1902
1903 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1904
1905 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1906 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1907 * graphite-poly.c (pbb_number_of_iterations): New.
1908 * graphite-poly.h (pbb_number_of_iterations): Declared.
1909 (pbb_iterator_dim, pbb_parameter_dim): New.
1910
1911 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1912
1913 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1914 last commit on type of lower and upper bound of loops.
1915
1916 2009-06-29 Li Feng <nemokingdom@gmail.com>
1917
1918 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1919 graphite-dependences.h.
1920 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1921 (mark_bb_with_pbb): New.
1922 (get_stmtfor_depth): New.
1923 (find_pbb_via_hash): New.
1924 (dependency_in_loop_p): New.
1925 (mark_loops_parallel): New.
1926 (free_aux_in_new_loops): New.
1927 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1928 bb with it's relevant pbb. Mark newly created loops. Remove mark
1929 innermost loop parallel without checking.
1930 (gloog): Add parameter BB_PBB_MAPPING.
1931 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1932 (gloog): Change declaration.
1933 (mark_loop_parallel): Make extern.
1934 (free_aux_in_new_loops): Declare.
1935 (bb_pbb_map_hash): New.
1936 (eq_bb_pbb_map): New.
1937 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1938 auto parallelization when flag_graphite_force_parallel is set.
1939 (graphite_finalize): Added free_aux_in_new_loops.
1940 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1941 the innermost loop that marked parallel. Use
1942 flag_graphite_force_parallel instead of loop->can_be_parallel.
1943 (loop_parallel_p): Move inner most checking out of function.
1944
1945 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1946
1947 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1948 type of lower and upper bound of loops signed long int.
1949
1950 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1951
1952 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1953 expression outside the loop.
1954
1955 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1956
1957 * gcc.dg/graphite/interchange-8.c: New.
1958
1959 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1960
1961 * gcc.dg/graphite/interchange-0.c: XFailed.
1962 * gcc.dg/graphite/interchange-5.c: XFailed.
1963 * gcc.dg/graphite/interchange-6.c: XFailed.
1964
1965 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1966
1967 * graphite-interchange.c (compute_array_size_poly): The end of the
1968 recursion should return 1.
1969
1970 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1971
1972 * graphite-interchange.c (compute_array_size_cstr): Allow the
1973 subscript multiplier to be -1.
1974 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1975 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1976 data_container. Initializes PDR_DATA_CONTAINER.
1977 (print_pdr_access_layout): New.
1978 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1979 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1980 data_container.
1981 (PDR_DATA_CONTAINER): New.
1982 (new_poly_dr): Update declaration.
1983 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1984 (build_poly_dr): Call pdr_add_data_dimensions.
1985
1986 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1987
1988 * graphite-poly.h (struct poly_dr): Fix comment.
1989 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1990 (pdr_add_memory_accesses): New.
1991 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1992
1993 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1994
1995 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1996 (print_pbb): Add call to print_pdrs.
1997 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1998
1999 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2000 Li Feng <nemokingdom@gmail.com>
2001
2002 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
2003 (dependency_between_pbbs_p): New.
2004 (lexicographically_gt_p): Assure !empty_p before polyhedron
2005 intersection assign.
2006 (build_lexicographically_gt_constraint): Correct lexicographically
2007 judging.
2008 * graphite-dependences.h: New.
2009 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
2010
2011 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2012
2013 * graphite-clast-to-gimple.c (print_clast_stmt): New.
2014 (gloog): Print to dump_file the generated clast.
2015 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
2016 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
2017
2018 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2019
2020 * graphite-poly.c (extend_scattering): Increment
2021 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
2022
2023 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
2024
2025 * graphite-interchange.c (compute_array_size_poly): Added exit of
2026 recursion condition. Continue iterating even after the first equality.
2027 (compute_array_size): Same.
2028
2029 2009-06-24 Li Feng <nemokingdom@gmail.com>
2030
2031 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
2032 -fdump-tree-final_cleanup to -fdump-tree-optimized.
2033 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
2034 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
2035 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
2036
2037 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2038
2039 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
2040 only when the use verifies is_gimple_reg.
2041
2042 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2043
2044 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
2045 Allocate scaldims after call to unify_scattering_dimensions.
2046
2047 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2048
2049 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
2050
2051 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2052 Albert Cohen <albert.cohen@inria.fr>
2053
2054 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
2055 variables for the strip mining.
2056
2057 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2058 Pranav Garg <pranav.garg2107@gmail.com>
2059
2060 * Makefile.in (OBJS-common): Added graphite-blocking.o.
2061 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
2062 (graphite-blocking.o): New rule.
2063 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
2064 * graphite-blocking.c: New.
2065 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
2066 flag_loop_strip_mine.
2067 (psct_scattering_dim_for_loop_depth): New.
2068 * graphite-poly.h (scop_do_strip_mine): Declared.
2069 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
2070 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
2071 flag_loop_strip_mine.
2072
2073 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2074
2075 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
2076 a GMP value and a PPL coefficient at each iteration of a loop.
2077
2078 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2079
2080 * graphite-dependences.c (dependence_polyhedron): Do not use
2081 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
2082 pbb_nb_scattering_transform.
2083 (graphite_legal_transform_dr): Same.
2084 * graphite-poly.c (extend_scattering): Same.
2085 (unify_scattering_dimensions): Same.
2086 (print_scattering_function): Same.
2087 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
2088 PBB_NB_LOCAL_VARIABLES.
2089 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
2090 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
2091 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
2092 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
2093 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
2094 (pbb_nb_scattering_transform): New.
2095 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
2096 (psco_scattering_dim): Add assert on parameters.
2097 (psct_scattering_dim): Same.
2098 (psct_scattering_dim_for_loop_depth): Declared.
2099 (psct_local_var_dim): New.
2100 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
2101 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
2102 correct layout, call pbb_nb_local_vars.
2103 (psct_add_local_variable, psct_add_scattering_dimension): New.
2104 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
2105 Initialize PBB_NB_SCATTERING_TRANSFORM.
2106
2107 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2108
2109 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
2110 (set_coef): Renamed ppl_set_coef.
2111 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
2112
2113 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
2114
2115 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
2116 test a boolean against 1.
2117 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
2118 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
2119 (pbb_do_interchange): Returns true when a transform has been performed.
2120 (scop_do_interchange): Same.
2121 * graphite-poly.c (apply_poly_transforms): Use the return value of
2122 scop_do_interchange.
2123 * graphite-poly.h (scop_do_interchange): Update declaration.
2124
2125 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
2126
2127 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
2128 after last use.
2129 * sese.c (sese_reset_aux_in_loops): New.
2130 * sese.h (sese_reset_aux_in_loops): New.
2131
2132 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2133
2134 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
2135 multiplier and multiply the constant by the multiplier.
2136 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
2137 (build_poly_dr): Do not use the multiplier to define the subscript.
2138
2139 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2140
2141 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
2142 compiler's data reference. Initialize PDR_CDR.
2143 (print_pdr): Call dump_data_reference.
2144 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
2145 Add compiler_dr field.
2146 (PDR_BB): Renamed PDR_PBB.
2147 (PDR_CDR): New.
2148 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
2149 GCC's data reference representation.
2150 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
2151 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
2152
2153 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2154
2155 * graphite-poly.c (print_scattering_function): Also print the layout.
2156 * graphite-poly.h (pbb_nb_local_vars): New.
2157
2158 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2159
2160 * graphite-poly.c (print_pbb_domain): Also print the layout names.
2161
2162 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
2163
2164 * graphite-poly.c (print_pdr, debug_pdr): New.
2165 * graphite-poly.h (print_pdr, debug_pdr): Declared.
2166 (PDR_BASE): Removed.
2167
2168 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2169
2170 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
2171 ltrans-{1..6,8}.c.
2172
2173 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2174
2175 * graphite-interchange.c (compute_subscript): Allow also -1 in the
2176 subscript identification column.
2177 (pbb_do_interchange): Print to dump_file that some loops "will be
2178 interchanged". Rely on that chain of characters in the testcases.
2179 * gcc.dg/graphite/interchange-0.c: New.
2180 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
2181 interchange-*.c files and compile them with -floop-interchange.
2182
2183 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
2184
2185 * graphite-interchange.c (interchange_profitable_p): Renamed
2186 pbb_interchange_profitable_p.
2187
2188 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2189 Harsha Jagasia <harsha.jagasia@amd.com>
2190 Pranav Garg <pranav.garg2107@gmail.com>
2191
2192 * graphite-interchange.c (interchange_profitable_p): Make static.
2193 (pbb_interchange_loop_depths, pbb_do_interchange,
2194 scop_do_interchange): New.
2195 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
2196 for flag_loop_interchange.
2197 * graphite-poly.h (scop_do_interchange): Declared.
2198 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
2199 flag_loop_interchange is used.
2200
2201 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
2202
2203 * graphite-dependences.c (dependence_polyhedron): Update use of
2204 pbb_nb_scattering_dims.
2205 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
2206 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
2207 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
2208 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
2209
2210 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2211
2212 * graphite.c: Cleanup foo.
2213
2214 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
2215
2216 * Merge from mainline (r143684:148293).
2217 * Disabled libpcp until it gets fixed.
2218
2219 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
2220 Harsha Jagasia <harsha.jagasia@amd.com>
2221
2222 * graphite-interchange.c: New.
2223 * Makefile.in (graphite-interchange.o): New.
2224 * graphite-poly.h (interchange_profitable_p): Declared.
2225 * graphite-ppl.h (value_max): New.
2226
2227 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2228
2229 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
2230 * graphite-poly.h: Fix some comments.
2231 (pdr_dim): New.
2232 (pdr_scop): New.
2233
2234 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
2235
2236 * graphite-poly.h
2237 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
2238 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
2239 (pdr_accessp_nb_params): Renamed pdr_nb_params.
2240 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
2241 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
2242 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
2243 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
2244 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
2245 * graphite-clast-to-gimple.c: Same.
2246 * graphite-dependences.c: Same.
2247 * graphite-poly.c: Same.
2248 * graphite-sese-to-poly.c: Same.
2249
2250 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2251
2252 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
2253 expressions for an IV rename, as returned by clast_to_gcc_expression.
2254 (copy_renames): Rename new_name to expr.
2255 * sese.c (debug_rename_elt): Same.
2256 (get_rename): Same.
2257 (set_rename): Same.
2258 (sese_adjust_liveout_phis): Call force_gimple_operand before using
2259 the information from the rename map.
2260 (rename_variables_in_stmt): Same.
2261 (add_loop_exit_phis): Rename new_name to expr.
2262 (insert_loop_close_phis): Same.
2263 (add_guard_exit_phis): Same. Call force_gimple_operand.
2264 * sese.h (struct rename_map_elt): Rename new_name to expr.
2265 (new_rename_map_elt): Same.
2266
2267 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2268
2269 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
2270 * sese.c (set_rename): Make it extern.
2271 * sese.h (set_rename): Declared.
2272
2273 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
2274
2275 * graphite-poly.c (extend_scattering): Free values.
2276 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
2277 Free iterators.
2278 (ppl_print_powerset_matrix): Same.
2279 * graphite-scop-detection.c (free_scops_1): New.
2280 (limit_scops): Call free_scops_1.
2281 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
2282 (build_poly_dr): Free PPL coefficients.
2283 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
2284
2285 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
2286
2287 * graphite-dependences.c: New.
2288 * graphite-data-ref.c: Removed.
2289 * graphite-data-ref.h: Removed.
2290 * Makefile.in (graphite-data-ref.o): Removed.
2291 (graphite-dependences.o): Added.
2292 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
2293 * graphite-poly.c: Same.
2294 Move the data dependence testing to graphite-dependences.c.
2295
2296 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
2297
2298 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
2299 from graphite_cannot_represent_loop. Code refactored.
2300 (scopdet_basic_block_info): Call graphite_can_represent_loop.
2301
2302 2009-05-17 Li Feng <nemokingdom@gmail.com>
2303
2304 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
2305 Cover all the testcases (not only the filtered ones).
2306
2307 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
2308
2309 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
2310 unnecessary check. Update comments. Move check for REAL_TYPE here.
2311 (harmful_stmt_in_bb): Remove checks for conditions. This is already
2312 done in (stmt_simple_for_scop_p).
2313
2314 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
2315
2316 * graphite.c (print_global_statistics): New.
2317 (print_graphite_scop_statistic): New.
2318 (print_graphite_statistics): New.
2319 (graphite_initialize, graphite_transform_loops): Print statistics.
2320 * graphite-scop-detection (build_scops): Print statistics.
2321 (print_graphite_scop_statistics): New.
2322 (print_graphite_statistics): New.
2323
2324 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2325
2326 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
2327 (debug_clast_name_index): Removed.
2328 (debug_clast_name_indexes_1): Removed.
2329 (debug_clast_name_indexes): Removed.
2330 (clast_name_index_elt_info): Removed.
2331 (eq_clast_name_indexes): Removed.
2332 (clast_name_to_index): Removed.
2333 (new_clast_name_index): Removed.
2334 (save_clast_name_index): Removed.
2335 (save_var_name): Moved...
2336 (init_sese_params_index): Removed.
2337 (clast_name_to_gcc): Remove use of name_tree.
2338 (initialize_cloog_names): Same.
2339 (gloog): Do not call init_sese_params_index.
2340 * graphite-sese-to-poly.c (save_var_name): ...here.
2341 (parameter_index_in_region): New.
2342 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
2343 (parameter_index_in_region): Removed.
2344 (is_parameter): Remove use of name_tree.
2345 * sese.h (struct name_tree): Removed.
2346 (struct sese): Remove use of name_tree. New field params_names.
2347 (SESE_PARAMS_NAMES): New.
2348 (SESE_PARAMS): Remove duplicate.
2349 (parameter_index_in_region): Removed.
2350 (sese_nb_params): Remove use of name_tree.
2351 (struct clast_name_index): New.
2352 (new_clast_name_index): New.
2353 (clast_name_to_index): New.
2354 (save_clast_name_index): New.
2355 (debug_clast_name_index): New.
2356 (debug_clast_name_indexes_1): New.
2357 (debug_clast_name_indexes): New.
2358 (clast_name_index_elt_info): New.
2359 (eq_clast_name_indexes): New.
2360
2361 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2362
2363 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
2364 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
2365 (graphite_loop_normal_form): Do not pass region. Do not
2366 initialize SESE_OLDIVS.
2367 (build_graphite_loop_normal_form): Update call to
2368 graphite_loop_normal_form.
2369 * sese.c (debug_oldivs): Removed.
2370 (new_sese): Do not initialize SESE_OLDIVS.
2371 (free_sese): Do not free SESE_OLDIVS.
2372 (oldiv_for_loop): Removed.
2373 * sese.h (struct sese): Remove old_ivs.
2374 (SESE_OLDIVS): Removed.
2375 (oldiv_for_loop): Removed.
2376
2377 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2378
2379 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
2380 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
2381 replaced by a call to newivs_to_depth_to_newiv.
2382 (clast_to_gcc_expression): Pass newivs, remove ivstack.
2383 (clast_to_gcc_expression_red): Same.
2384 (gcc_type_for_clast_expr): Same.
2385 (gcc_type_for_clast_eq): Same.
2386 (graphite_translate_clast_equation): Same.
2387 (graphite_create_guard_cond_expr): Same.
2388 (graphite_create_new_guard): Same.
2389 (graphite_create_new_loop): Same.
2390 (build_iv_mapping): Same.
2391 (translate_clast): Same.
2392 (gloog): Same.
2393 (loop_iv_stack_patch_for_consts): Removed. *
2394 sese.c (iv_stack_entry_is_constant): Removed.
2395 (iv_stack_entry_is_iv): Removed.
2396 (loop_iv_stack_push_iv): Removed.
2397 (loop_iv_stack_insert_constant): Removed.
2398 (loop_iv_stack_pop): Removed.
2399 (loop_iv_stack_get_iv): Removed.
2400 (loop_iv_stack_get_iv_from_name): Removed.
2401 (debug_loop_iv_stack): Removed.
2402 (free_loop_iv_stack): Removed.
2403 (loop_iv_stack_remove_constants): Removed. *
2404 sese.h (iv_stack_entry_kind): Removed.
2405 (iv_stack_entry_data_union): Removed.
2406 (iv_stack_entry_struct): Removed.
2407 (iv_stack_entry_p): Removed.
2408 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
2409 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
2410 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
2411 loop_iv_stack_pop, free_loop_iv_stack): Removed.
2412 (gbb_loop_at_index): Fix indenting.
2413 (gbb_loop_index): Removed.
2414
2415 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2416
2417 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
2418 Call clast_name_to_index.
2419
2420 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2421
2422 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
2423 do not pass params. Get params from SESE_PARAMS.
2424 (clast_to_gcc_expression): Same.
2425 (clast_to_gcc_expression_red): Same.
2426 (gcc_type_for_clast_eq): Same.
2427 (graphite_translate_clast_equation): Same.
2428 (graphite_create_new_loop): Same.
2429 * sese.c (rename_variables_in_stmt): Fix comment.
2430
2431 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2432
2433 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2434 newivs_index.
2435 Call save_clast_name_index.
2436 (translate_clast): Pass newivs_index.
2437 (gloog): Create and free newivs_index.
2438
2439 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2440
2441 * graphite-clast-to-gimple.c (clast_name_index): New structure.
2442 (clast_name_index_p): New type.
2443 (debug_clast_name_index): New.
2444 (debug_clast_name_indexes_1): New.
2445 (debug_clast_name_indexes): New.
2446 (clast_name_index_elt_info): New.
2447 (eq_clast_name_indexes): New.
2448 (clast_name_to_index): New.
2449 (new_clast_name_index): New.
2450 (save_clast_name_index): New.
2451 (init_sese_params_index): New.
2452 (gloog): Call init_sese_params_index.
2453 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2454 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2455 (free_sese): Free SESE_PARAMS_INDEX.
2456 * sese.h (struct sese): Add params_index.
2457 (SESE_PARAMS_INDEX): New.
2458
2459 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2460
2461 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2462 (graphite_create_new_loop): Pass the newivs vector. Push the
2463 newly created IV to newivs.
2464 (translate_clast): Pass the newivs vector.
2465 (gloog): Create and destroy the newivs vector.
2466
2467 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
2468
2469 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2470 (graphite_loop_normal_form): Initialize loop->aux with the unique
2471 IV that has been created.
2472
2473 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2474
2475 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2476 scev with parameters in the base part. They where forbidden
2477 exidently.
2478
2479 2009-05-11 Li Feng <nemokingdom@gmail.com>
2480
2481 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2482 compile options by file names.
2483 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2484 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2485 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2486 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2487
2488 2009-05-08 Li Feng <nemokingdom@gmail.com>
2489
2490 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2491 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2492 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2493 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2494
2495 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2496
2497 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2498 by final cleanup.
2499
2500 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2501
2502 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2503 allow integer constant strides.
2504 (graphite_can_represent_expr): Depend on outermost_loop.
2505 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2506 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2507 build_scops_1): Same.
2508 (scopdet_basic_block_info): Same and insert layered SCoP
2509 detection.
2510 (try_generate_gimple_bb): Cleanup.
2511 (build_scops): Enable data references.
2512
2513 * testsuite/gcc.dg/graphite/id-5.c: New.
2514 * testsuite/gcc.dg/graphite/id-9.c: New.
2515 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2516 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2517
2518 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2519
2520 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2521 that we have not yet built for this SCoP.
2522
2523 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2524
2525 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2526 for complex numbers.
2527
2528 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2529
2530 * graphite-ppl.c: Fix build if cloog is not available.
2531
2532 2009-05-04 Li Feng <nemokingdom@gmail.com>
2533
2534 * tree-parloops.c (loop_parallel_p): Remove construction of
2535 NITER and REDUCTION_LIST.
2536 (try_get_loop_niter): New.
2537 (try_create_reduction_list): New.
2538 (parallelize_loops): Bypass the failed checkings in autopar
2539 when can_be_parallel in loop structure is set to true.
2540
2541 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2542
2543 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2544 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2545
2546 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2547
2548 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2549 Enable EQ_EXPR and NE_EXPR again.
2550
2551 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2552
2553 * graphite-scop-detection.c (graphite_can_represent_scev):
2554 Add check if scev is affine multivariate.
2555 (harmful_stmt_in_bb): Check if we can represent the conditions.
2556 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2557 harmful_stmt_in_bb.
2558 * testsuite/gcc.dg/graphite/id-7.c: New.
2559
2560 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2561
2562 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2563 Check all bbs in region, not only the bbs that are represented in
2564 GRAPHITE.
2565 (build_poly_scop): Add newline.
2566 * testsuite/gcc.dg/graphite/id-8.c: New.
2567
2568 2009-04-30 Li Feng <nemokingdom@gmail.com>
2569
2570 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2571 when loop initialize.
2572 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2573 * common.opt: Declare flag_graphite_force_parallel.
2574 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2575 loop parallel.
2576 * graphite-poly.c (apply_poly_transforms): Introduce
2577 flag_graphite_force_parallel.
2578 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2579 * toplev.c (process_options): ditto and replace a not correctly
2580 encoded space.
2581
2582 2009-04-30 Li Feng <nemokingdom@gmail.com>
2583
2584 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2585 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2586 to the redefinition.
2587 (compute_cloog_iv_types_1): ditto.
2588 (build_iv_mapping): ditto.
2589 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2590 initialization.
2591 (free_gimple_bb): Removed GBB_LOOPS related free part.
2592 (build_bb_loops): Removed.
2593 * sese.h (struct gimple_bb): Removed loops.
2594 (GBB_LOOPS): Removed.
2595 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2596 (gbb_loop_index): ditto.
2597
2598 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2599
2600 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2601 allow non constant strides.
2602 * testsuite/gcc.dg/graphite/scop-20.c: New.
2603
2604 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2605
2606 * graphite-scop-detection.c (dot_all_scops): Fix system call
2607 return value warning.
2608 (dot_scop): Same.
2609
2610 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2611
2612 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2613 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2614
2615 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2616
2617 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2618 build_pairwise_constraint, dr_equality_constraints,
2619 build_pairwise_scheduling_equality,
2620 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2621 build_lexicographically_gt_constraint, dependence_polyhedron,
2622 graphite_legal_transform_dr, graphite_legal_transform_bb,
2623 graphite_legal_transform): New.
2624 * graphite-poly.h (graphite_legal_transform): Declared.
2625 * graphite-sese-to-poly.c (build_poly_scop): Call to
2626 graphite_legal_transform is disabled for the moment.
2627
2628 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2629
2630 * graphite-poly.h (pbb_nb_scattering_dims): New.
2631 (pbb_nb_scattering): Use it.
2632
2633 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2634
2635 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2636 Pointset_Powerset version of ppl_insert_dimensions.
2637 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2638
2639 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2640
2641 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2642
2643 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2644
2645 * graphite-poly.h: Fix comment.
2646
2647 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2648
2649 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2650
2651 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2652
2653 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2654 statements.
2655
2656 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2657
2658 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2659 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2660 conditions.
2661
2662 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2663
2664 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2665 handle EQ_EXPR and NE_EXPR.
2666
2667 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2668
2669 * graphite-poly.h (poly_dr): Fix comment.
2670
2671 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2672 Tobias Grosser <grosser@fim.uni-passau.de>
2673
2674 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2675 with a zero dimension polyhedron.
2676 (find_scop_parameters): Move the call to scop_set_nb_params here.
2677 (build_loop_iteration_domains): Store in loop->aux the iteration
2678 domain polyhedron.
2679 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2680 by any loop in scop.
2681 (build_poly_scop): Do not call scop_set_nb_params.
2682
2683 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2684 Tobias Grosser <grosser@fim.uni-passau.de>
2685
2686 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2687 add_condition_to_domain not GT_EXPR.
2688
2689 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2690
2691 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2692 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2693 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2694 upper_bound_assign to calculate unions.
2695 * testsuite/gcc.dg/graphite/id-6.c: New.
2696
2697 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2698
2699 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2700 handle abnormal edges.
2701
2702 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2703
2704 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2705 (free_poly_bb): Also free poly_drs.
2706 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2707 (poly_dr): Polyhedron to Pointset_Powerset.
2708 (pdr_accessp_nb_subscripts): Same.
2709 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2710 poly_drs.
2711
2712 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2713
2714 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2715 names into more meaningful names.
2716
2717 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2718
2719 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2720 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2721
2722 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2723
2724 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2725 the reduction_list.
2726 * tree-parloops.c (rewrite_phi_with_iv): New.
2727 (rewrite_all_phi_nodes_with_iv): New.
2728 (canonicalize_loop_ivs): Call them.
2729
2730 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2731
2732 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2733 graphite_find_data_references_in_stmt.
2734 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2735 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2736
2737 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2738
2739 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2740
2741 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2742
2743 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2744 instead of bb_in_region.
2745 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2746 (build_sese_conditions): Use flag_bb_in_sese.
2747 * sese.c (register_bb_in_sese): Removed.
2748 (new_sese): Remove initialization of SESE_REGION_BBS.
2749 (free_sese): Do not free SESE_REGION_BBS.
2750 * sese.h (struct sese): Remove field region_basic_blocks.
2751 (SESE_REGION_BBS): Removed.
2752 (bb_in_sese_p): Implement in function of bb_in_region.
2753
2754 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2755
2756 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2757 loops.
2758
2759 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2760
2761 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2762 and EQ_EXPR.
2763 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2764 (add_condition_to_domain): New.
2765 (add_condition_to_pbb): New.
2766 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2767 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2768
2769 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2770
2771 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2772 ppl_Pointset_Powerset.
2773 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2774 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2775 (pbb_nb_loops): Same.
2776 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2777 add_conditions_to_domain): Same.
2778 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2779 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2780 ppl_const_Polyhedron_t.
2781 (ppl_print_powerset_matrix): New.
2782 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2783 ppl_print_powerset_matrix): New.
2784 (ppl_print_polyhedron_matrix): Updated.
2785
2786 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2787
2788 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2789
2790 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2791
2792 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2793 (print_iteration_domains, debug_iteration_domain,
2794 debug_iteration_domains): New.
2795 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2796 debug_iteration_domains): Declared.
2797 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2798 indenting.
2799
2800 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2801 Sebastian Pop <sebastian.pop@amd.com>
2802
2803 * graphite-poly.h (print_iteration_domain): New.
2804 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2805 (build_sese_conditions_1, build_sese_conditions_after,
2806 build_sese_conditions_before): New.
2807 (build_sese_conditions): Rewritten.
2808
2809 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2810 Tobias Grosser <grosser@fim.uni-passau.de>
2811
2812 Cleanup of code generation liveouts.
2813 * graphite-clast-to-gimple.c (translate_clast): Use a single
2814 rename_map instead of one per translated statement.
2815 Do not use SESE_LIVEOUT_RENAMES.
2816 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2817 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2818 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2819 phi node of a reduction: when a loop contains a reduction used outside
2820 the loop, there should be a scalar close phi node on the exit block.
2821 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2822 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2823 (free_sese): Do not free them.
2824 (sese_build_liveouts_use): Do not use them.
2825 (sese_build_liveouts_bb): Same.
2826 (sese_build_liveouts): Same.
2827 (sese_insert_phis_for_liveouts): Same.
2828 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2829 (defined_in_loop_p): New.
2830 (alive_after_loop): New.
2831 (close_phi_not_yet_inserted_p): New.
2832 (struct alep, alep_p): New.
2833 (add_loop_exit_phis): Remove from the rename_map all the names defined
2834 in the code generated loop.
2835 (insert_loop_close_phis): Traverse the rename_map passed to it.
2836 Don't use SESE_LIVEOUT_RENAMES.
2837 (default_liveout_before_guard): Renamed default_before_guard.
2838 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2839 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2840 (register_sese_liveout_renames): Removed.
2841 (copy_bb_and_scalar_dependences): Do not call it.
2842 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2843 reduction_list.
2844 (SESE_LIVEOUT): Removed.
2845 (SESE_LIVEOUT_RENAMES): Removed.
2846 (SESE_REDUCTION_LIST): Removed.
2847 (sese_build_liveouts): Removed.
2848 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2849 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2850 (insert_guard_phis): Same.
2851 (rename_map_elt): Declare a VEC of them.
2852 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2853 trees not pointers to trees.
2854
2855 Rewrite in canonical close SSA form:
2856 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2857 (limit_scops): Close the scop after the block containing the close phi
2858 nodes.
2859 (canonicalize_loop_closed_ssa): New.
2860 (canonicalize_loop_closed_ssa_form): New.
2861 (build_scops): Call canonicalize_loop_closed_ssa_form.
2862
2863 * graphite-sese-to-poly.c: Fix typos.
2864
2865 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2866
2867 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2868 Extended.
2869 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2870 (print_pbb): Add conditions.
2871
2872 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2873 Sebastian Pop <sebastian.pop@amd.com>
2874
2875 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2876 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2877 (build_scop_bbs_1): New.
2878 (build_scop_bbs): Rewrite.
2879 * sese.h (bb_in_region): New.
2880
2881 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2882
2883 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2884 poly_drs vector.
2885 (print_scop): Style.
2886 * graphite-poly.h (poly_bb): Add drs vector.
2887 (PBB_DRS): Add accessor.
2888 * graphite-sese-to-poly.c (build_poly_dr): New.
2889 (build_pbb_drs, build_scop_drs): New.
2890 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2891
2892 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2893
2894 * tree-ssa-loop.c: Include forgotten toplev.h
2895
2896 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2897
2898 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2899 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2900 * testsuite/gcc.dg/graphite/pr37928.c: Same
2901 * testsuite/gcc.dg/graphite/pr38409.c: Same
2902 * testsuite/gcc.dg/graphite/pr38498.c: Same
2903 * testsuite/gcc.dg/graphite/pr38559.c: Same
2904 * testsuite/gcc.dg/graphite/pr39335.c: Same
2905 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2906 * testsuite/gfortran.dg/graphite/block-2.f: Same
2907 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2908 with -floop-*.
2909
2910 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2911
2912 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2913 build_access_matrix, build_scop_data_accesses): Remove access function
2914 building. (We get a new version soon).
2915 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2916 * sese.h (nb_loops_around_loop_in_sese): Remove.
2917 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2918
2919 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2920 Sebastian Pop <sebastian.pop@amd.com>
2921
2922 * graphite-scop-detection.c (struct scopdet_info): Rename last
2923 field to exit.
2924 (scopdet_basic_block_info, build_scops_1): Don't use
2925 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2926
2927 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2928 Sebastian Pop <sebastian.pop@amd.com>
2929
2930 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2931 * sese.c (sese_build_liveouts_use): Renamed from
2932 sese_build_livein_liveouts_use. Remove liveins.
2933 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2934 Call sese_build_liveouts_use.
2935 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2936 Call sese_build_liveouts_bb.
2937 (new_sese, free_sese): Remove liveins.
2938 (sese_add_exit_phis_var): Deleted.
2939 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2940 directly.
2941 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2942
2943 * sese.h (sese): Remove num_ver and livein.
2944 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2945
2946 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2947
2948 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2949
2950 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2951
2952 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2953 (build_scop_scattering): Do not use compare_prefix_loops any more.
2954 (nb_common_loops): New.
2955
2956 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2957
2958 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2959 (register_old_and_new_names): Renamed set_rename.
2960
2961 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2962
2963 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2964 of the decl from the previous commit.
2965
2966 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2967
2968 * graphite-scop-detection.c (dot_scop): New.
2969 * graphite-scop-detection.h (dot_scop): Declared.
2970
2971 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2972
2973 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2974
2975 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2976
2977 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2978 condition at the end of the loop.
2979 * graphite.c (graphite_initialize, graphite_finalize): Print to
2980 dump_file the compiled function.
2981 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2982 of create_empty_loop_on_edge.
2983 (translate_clast): Update the code generation of loops for the new
2984 shape of loops.
2985 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2986
2987 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2988
2989 Reverted the patch from 2009-03-19.
2990
2991 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2992
2993 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2994 poly_drs vector.
2995 (print_scop): Style.
2996 * graphite-poly.h (poly_bb): Add drs vector.
2997 (PBB_DRS): Add accessor.
2998 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2999 (build_access_matrix_with_af, build_access_matrix,
3000 build_scop_data_accesses): Delete.
3001 (build_poly_dr): New.
3002 (build_pbb_drs, build_scop_drs): New.
3003 (build_poly_scop): call build_scop_drs.
3004
3005 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
3006
3007 * graphite-scop-detection.c (dot_all_scops_1): Close the table
3008 once per basic block.
3009
3010 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3011
3012 * graphite-scop-detection.c (graphite_can_represent_scev): New.
3013 (graphite_can_represent_expr): Renamed from loop_affine_expr
3014 and enhanced.
3015 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
3016 (graphite_cannot_represent_loop): Add scop_entry to parameters.
3017 (scopdet_basic_block_info): Actually define entry_block.
3018 (stmt_simple_memref_p): Moved here from ...
3019
3020 * tree-data-ref.c (stmt_simple_memref_p): here.
3021 * tree-data-ref.h (stmt_simple_memref_p): Removed.
3022
3023 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
3024
3025 * testsuite/gcc.dg/graphite/id-4.c: New.
3026
3027 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3028
3029 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3030 (register_old_and_new_names): Update the content of the map.
3031 When there was already a rename_map_elt in the map at that
3032 location, free it.
3033 (copy_bb_and_scalar_dependences): Do rename_variables after
3034 expand_scalar_variables.
3035 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3036 of the map. When there was already a rename_map_elt in the
3037 map at that location, free it.
3038 (translate_clast): Pass the rename_map. Do not initialize and free
3039 a rename_map per stmt_user.
3040 (gloog): Initialize and free one rename_map and pass it to
3041 translate_clast.
3042
3043 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
3044
3045 * sese.c (expand_scalar_variables_stmt,
3046 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
3047 parameter.
3048 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
3049 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
3050 the gimple_stmt_iterator of the statement to be expanded.
3051 * graphite-scop-detection.c (is_simple_operand): Do handle
3052 REALPART_EXPR.
3053
3054 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3055
3056 * graphite-scop-detection.c (is_simple_operand): Do not handle
3057 REALPART_EXPR.
3058 * testsuite/gcc.dg/graphite/id-2.c: New.
3059
3060 * graphite-sese-to-poly.c (build_bb_loops,
3061 add_value_to_dim, scan_tree_for_params_right_scev,
3062 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
3063 find_params_in_bb, build_loop_iteration_domains,
3064 add_conditions_to_domain): Remove subtract.
3065
3066 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3067
3068 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
3069 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
3070 pbb_loop_at_index -> gbb_loop_at_index.
3071 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
3072 (debug_loop_vec): Delete.
3073 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
3074 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
3075 (PBB_LOOPS): Removed.
3076 (PBB_BLACK_BOX): Insert cast.
3077 (pbb_set_black_box): New setter.
3078 (pbb_loop_at_index, pbb_loop_index): Removed.
3079 (scop_set_region, scop_set_nb_params): New.
3080 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
3081 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
3082 (build_poly_scop): Use scop_set_nb_params.
3083 * sese.h (gimple_bb): Add LOOPS.
3084 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
3085
3086 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3087
3088 Revert previous commit.
3089
3090 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3091
3092 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
3093 (register_old_and_new_names): Update the content of the map.
3094 When there was already a rename_map_elt in the map at that
3095 location, free it.
3096 (copy_bb_and_scalar_dependences): Do rename_variables after
3097 expand_scalar_variables.
3098 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3099 of the map. When there was already a rename_map_elt in the
3100 map at that location, free it.
3101 (translate_clast): Pass the rename_map. Do not initialize and free
3102 a rename_map per stmt_user.
3103 (gloog): Initialize and free one rename_map and pass it to
3104 translate_clast.
3105
3106 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
3107
3108 Remove forgotten line in revert.
3109
3110 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
3111
3112 Revert previous commit.
3113
3114 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3115
3116 * sese.c (register_old_and_new_names): Update the content
3117 of the map. When there was already a rename_map_elt in the
3118 map at that location, free it.
3119 (copy_bb_and_scalar_dependences): Do rename_variables after
3120 expand_scalar_variables.
3121 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
3122 of the map. When there was already a rename_map_elt in the
3123 map at that location, free it.
3124 (translate_clast): Pass the rename_map. Do not initialize and free
3125 a rename_map per stmt_user.
3126 (gloog): Initialize and free one rename_map and pass it to
3127 translate_clast.
3128
3129 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
3130
3131 * graphite-clast-to-gimple.c (translate_clast): context_loop
3132 is never NULL.
3133
3134 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3135 Sebastian Pop <sebastian.pop@amd.com>
3136
3137 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
3138 of the use of ppl_Polyhedron_map_space_dimensions.
3139
3140 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
3141 Sebastian Pop <sebastian.pop@amd.com>
3142
3143 * graphite-poly.c (unify_scattering_dimensions): Fix types.
3144 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
3145 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
3146 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
3147 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
3148 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
3149 pbb_nb_params): New.
3150 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
3151 nb_loops_around_pbb): Adapt return types.
3152
3153 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
3154
3155 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3156 graphite-clast-to-gimple.o, graphite-data-ref.o,
3157 graphite-scop-detection.o, graphite-poly.o): Add
3158 more headers.
3159
3160 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
3161
3162 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
3163 graphite-clast-to-gimple.o, graphite-data-ref.o,
3164 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
3165
3166 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3167
3168 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
3169 * testsuite/gcc.dg/graphite/pr37828.c: Same.
3170 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3171 * testsuite/gcc.dg/graphite/block-0.c: Same.
3172 * testsuite/gcc.dg/graphite/block-1.c: Same.
3173 * testsuite/gcc.dg/graphite/block-2.c: Same.
3174 * testsuite/gcc.dg/graphite/block-3.c: Same.
3175 * testsuite/gcc.dg/graphite/block-4.c: Same.
3176 * testsuite/gcc.dg/graphite/block-5.c: Same.
3177 * testsuite/gcc.dg/graphite/block-6.c: Same.
3178 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
3179 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3180 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
3181 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
3182 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
3183 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
3184 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
3185 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
3186 * opts.c: Remove -floop-block from -O2.
3187 * graphite-poly.c: Fail if -floop-block -floop-interchange or
3188 -floop-strip-mine are used.
3189
3190 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
3191 Sebastian Pop <sebastian.pop@amd.com>
3192
3193 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
3194 dimensions.
3195 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
3196 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
3197 strip_mine_profitable_p, is_interchange_valid,
3198 graphite_trans_bb_block, graphite_trans_loop_block,
3199 graphite_trans_scop_block): Temporary removed.
3200 (extend_scattering, unify_scattering_dimensions): New.
3201 (print_scattering_function, graphite_read_transforms):
3202 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3203 (graphite_generate_scattering_fns): Removed.
3204 (apply_poly_transforms): Cleanup.
3205 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3206 (schedule_to_scattering): Moved.
3207 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
3208 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
3209 (pbb_nb_scattering): New.
3210 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3211 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
3212 Removed.
3213 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
3214 shift_poly.
3215 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
3216 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
3217 -> PBB_TRANSFORMED_SCATTERING.
3218 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
3219 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
3220 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
3221 (check_poly_representation): Do not return bool.
3222 (graphite_transform_loops): Reformat.
3223 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
3224
3225 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
3226
3227 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
3228 debug_pbb_domain, debug_pbb, debug_scop): New.
3229 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
3230 debug_pbb_domain, debug_pbb, debug_scop): Declared.
3231
3232 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3233
3234 PR middle-end/39335
3235 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
3236 when the type precision of the induction variable should be
3237 larger than the type precision of nit.
3238 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
3239 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
3240 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
3241
3242 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
3243 * testsuite/gcc.dg/graphite/pr39335.c: New.
3244
3245 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3246
3247 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
3248 SSA_NAMES not struct reduction_info.
3249
3250 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
3251
3252 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
3253
3254 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3255 Tobias Grosser <grosser@fim.uni-passau.de>
3256
3257 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
3258 (free_sese): Free SESE_REDUCTION_LIST.
3259 * sese.h (struct sese): Add field reduction_list.
3260 (SESE_REDUCTION_LIST): New.
3261 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
3262 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
3263
3264 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3265 Tobias Grosser <grosser@fim.uni-passau.de>
3266
3267 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
3268 of loop_p.
3269
3270 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
3271 Tobias Grosser <grosser@fim.uni-passau.de>
3272
3273 * tree-parloops.c (struct brli, build_reduction_list_info,
3274 analyze_reduction_list, gather_scalar_reductions): New.
3275 (loop_parallel_p): Build a reduction list containing only
3276 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
3277 (gen_parallel_loop): Call the analysis analyze_reduction_list.
3278 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
3279 * tree-flow.h (gather_scalar_reductions): Declared.
3280
3281 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
3282
3283 PR middle-end/39308
3284 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
3285 number_of_iterations_exit from a gcc_assert.
3286
3287 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
3288 Jan Sjodin <jan.sjodin@amd.com>
3289
3290 * output.h (graphite_out_file, graphite_in_file): Declared.
3291 * toplev.c (graphite_out_file, graphite_in_file): New.
3292 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
3293 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
3294 Don't call schedule_to_scattering.
3295 * common.opt (fgraphite-write, fgraphite-read): New.
3296 * graphite-poly.c: Include output.h.
3297 (print_scattering_function, print_scattering_functions,
3298 debug_scattering_function, debug_scattering_functions,
3299 graphite_write_transforms, graphite_read_transforms,
3300 graphite_generate_scattering_fns): New.
3301 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
3302 Call graphite_generate_scattering_fns, graphite_write_transforms,
3303 graphite_read_transforms.
3304 (new_poly_bb): Initialize PBB_SCATTERING.
3305 (free_poly_bb): Free PBB_SCATTERING.
3306 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
3307 * graphite-poly.h (struct poly_bb): Add field scattering.
3308 (PBB_SCATTERING): New.
3309 (print_scattering_function, print_scattering_functions,
3310 debug_scattering_function, debug_scattering_functions): Declared.
3311 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
3312 GMP values, not integers!
3313 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
3314 ppl_read_polyhedron_matrix): New.
3315 * graphite-ppl.h (ppl_print_polyhedron_matrix,
3316 debug_ppl_polyhedron_matrix,
3317 ppl_read_polyhedron_matrix): Declared.
3318 * Makefile.in (graphite-poly.o): Depends on output.h.
3319
3320 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3321 Tobias Grosser <grosser@fim.uni-passau.de>
3322
3323 Revert this change:
3324 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3325 scalar evolutions in the scop_entry->loop_father.
3326
3327 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3328 Tobias Grosser <grosser@fim.uni-passau.de>
3329
3330 * graphite.h (ref_nb_loops): Remove declaration.
3331 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
3332 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
3333 debug_gbb): Moved to sese.h.
3334 * sese.h: As said.
3335
3336 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3337 Tobias Grosser <grosser@fim.uni-passau.de>
3338
3339 * graphite-data-ref.[ch]: Disable.
3340
3341 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3342 Tobias Grosser <grosser@fim.uni-passau.de>
3343
3344 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
3345 scalar evolutions in the scop_entry->loop_father.
3346
3347 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3348
3349 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
3350 (graphite_cannot_represent_loop_niter): Renamed
3351 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
3352 (limit_scops): build_sese_loop_nests does not return a bool.
3353 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
3354 * sese.c (nb_reductions_in_loop): ... from here.
3355 (graphite_loop_normal_form): ... from here.
3356 (sese_record_loop): Does not fail, so does not return a bool.
3357 (build_sese_loop_nests): Same.
3358 * sese.h (build_sese_loop_nests): Update declaration.
3359 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
3360 (build_graphite_loop_normal_form): New.
3361 (gloog): Call build_graphite_loop_normal_form.
3362 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
3363 build_sese_loop_nests.
3364
3365 * testsuite/gcc.dg/graphite/id-1.c: New.
3366
3367 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
3368 Tobias Grosser <grosser@fim.uni-passau.de>
3369
3370 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
3371 The SCoP detection fix is sufficient.
3372
3373 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3374
3375 PR tree-optimization/39260
3376 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
3377 the basic block contains a condition with a real type.
3378 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
3379
3380 * gcc.dg/graphite/pr39260.c: New.
3381
3382 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
3383
3384 * graphite-poly.c: Inlcude params.h.
3385 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
3386 the size of a tile.
3387 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
3388 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
3389
3390 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3391 Tobias Grosser <grosser@fim.uni-passau.de>
3392
3393 * graphite-scop-detection.c (dot_all_scops_1,
3394 dot_all_scops): Moved here.
3395 * graphite-scop-detection.h (dot_all_scops): Declared here.
3396 * graphite.c (graphite_initialize, graphite_finalize): New.
3397 (graphite_transform_loops): Cleaned up.
3398 * sese.c (debug_oldivs): Moved here.
3399 * graphite-poly.c (graphite_apply_transformations): Renamed
3400 apply_poly_transforms.
3401 (debug_loop_vec): Moved here.
3402 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
3403 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
3404 find_scop_parameters, build_scop_iteration_domain,
3405 add_conditions_to_constraints, build_scop_canonical_schedules,
3406 build_scop_data_accesses): Now static.
3407 (build_poly_scop, check_poly_representation): New.
3408
3409 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3410
3411 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
3412 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
3413 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
3414 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
3415 scan_tree_for_params_right_scev, scan_tree_for_params_int,
3416 scan_tree_for_params, struct irp_data, dx_record_params,
3417 find_params_in_bb, find_scop_parameters, gbb_from_bb,
3418 build_loop_iteration_domains, add_conditions_to_domain,
3419 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
3420 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
3421 build_sese_conditions, add_conditions_to_constraints,
3422 build_scop_iteration_domain, build_access_matrix_with_af,
3423 build_access_matrix,
3424 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
3425
3426 * graphite-sese-to-poly.c: New.
3427 * graphite-sese-to-poly.h: New.
3428
3429 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3430
3431 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3432
3433 * graphite.c: Split graphite code generation to a new file.
3434 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3435 max_precision_type, clast_to_gcc_expression_red,
3436 clast_to_gcc_expression, gcc_type_for_clast_expr,
3437 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3438 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3439 graphite_create_new_guard, clast_get_body_of_loop,
3440 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3441 graphite_create_new_loop, build_iv_mapping, copy_renames,
3442 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3443 compute_cloog_iv_types, free_scattering, save_var_name,
3444 initialize_cloog_names, build_scop_context, build_cloog_prog,
3445 set_cloog_options, debug_clast_stmt, scop_to_clast,
3446 print_generated_program, debug_generated_program,
3447 gloog): Moved to graphite-clast-to-gimple.c.
3448
3449 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3450
3451 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3452 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3453 loop_iv_stack_pop, loop_iv_stack_get_iv,
3454 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3455 free_loop_iv_stack, loop_iv_stack_remove_constants,
3456 debug_rename_elt, debug_rename_map_1, debug_rename_map,
3457 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3458 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3459 eq_ivtype_map_elts, sese_add_exit_phis_edge,
3460 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3461 get_vdef_before_sese, sese_adjust_vphi,
3462 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3463 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3464 is_iv, expand_scalar_variables_ssa_name,
3465 expand_scalar_variables_expr, expand_scalar_variables_stmt,
3466 expand_scalar_variables, rename_variables, remove_condition,
3467 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3468 add_loop_exit_phis, insert_loop_close_phis, struct igp,
3469 default_liveout_before_guard, add_guard_exit_phis,
3470 insert_guard_phis, register_old_and_new_names,
3471 graphite_copy_stmts_from_block, register_sese_liveout_renames,
3472 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3473 if_region_set_false_region, create_if_region_on_edge,
3474 move_sese_in_condition): Moved to sese.c.
3475
3476 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3477 if_region_exit, if_region_get_condition_block,
3478 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3479 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3480 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3481 ivtype_map_elt, new_ivtype_map_elt,
3482 recompute_all_dominators): Moved to sese.h.
3483
3484 * graphite-clast-to-gimple.c: New.
3485 * graphite-clast-to-gimple.h: New.
3486 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3487 * sese.c: Modified as said above.
3488 * sese.h: Same.
3489
3490 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3491
3492 * graphite.c: Split scop detection to a new file.
3493 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3494 move_sd_regions, loop_affine_expr, exclude_component_ref,
3495 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3496 graphite_cannot_represent_loop_niter, struct scopdet_info,
3497 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3498 find_single_entry_edge, find_single_exit_edge,
3499 create_single_entry_edge, sd_region_without_exit,
3500 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3501 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3502 Moved to graphite-scop-detection.c.
3503
3504 * graphite-scop-detection.c: New.
3505 * graphite-scop-detection.h: New.
3506 * Makefile.in: Add new rule for graphite-scop-detection.o.
3507
3508 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3509 tree-scalar-evolution.h.
3510 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3511 build_sese_loop_nests): Moved here from graphite.c.
3512 (param_index): Renamed parameter_index_in_region.
3513
3514 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3515 Sebastian Pop <sebastian.pop@amd.com>
3516
3517 * gcc.dg/graphite/block-0.c: Expected to fail now.
3518 * gcc.dg/graphite/block-1.c: Same.
3519 * gcc.dg/graphite/block-5.c: Same.
3520 * gcc.dg/graphite/block-6.c: Same.
3521
3522 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3523 Sebastian Pop <sebastian.pop@amd.com>
3524
3525 * graphite.h: Separate from graphite_bb_p the polyhedral
3526 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3527 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3528 graphite-data-ref.h.
3529 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3530 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3531 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3532 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3533 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3534 scop_nb_params): Moved to graphite-poly.h.
3535 * graphite-data-ref.c: Same.
3536 * graphite-data-ref.h: New.
3537 * graphite.c: Same.
3538 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3539 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3540 is_interchange_valid, graphite_trans_bb_block,
3541 graphite_trans_loop_block, scop_max_loop_depth,
3542 graphite_trans_scop_block, graphite_apply_transformations,
3543 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3544 graphite-poly.c.
3545 * graphite-poly.h: New.
3546 * graphite-poly.c: New.
3547 * Makefile.in (OBJS-common): Add graphite-poly.o.
3548 (graphite-poly.o): New rule.
3549 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3550 (DR_SCOP): Removed.
3551
3552 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3553 Tobias Grosser <grosser@fim.uni-passau.de>
3554
3555 * graphite.c: Replace gb -> gbb.
3556 * graphite.h: Same.
3557 * graphite-data-ref.c: Same.
3558
3559 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3560 Tobias Grosser <grosser@fim.uni-passau.de>
3561
3562 * Makefile.in (OBJS-commmon): Add sese.o.
3563 (sese.o): New.
3564 (graphite.o): Add sese.h.
3565 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3566 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3567 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3568 Move to sese.
3569 (block_before_scop): Add missing return.
3570 (new_scop, free_scop): Remove SESE data structures.
3571 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3572 find_scop_parameters, build_loop_iteration_domains,
3573 add_conditions_to_domain, register_scop_liveout_renames,
3574 copy_bb_and_scalar_dependences): Scop -> SESE.
3575
3576 (add_conditions_to_domain): SCoP -> SESE and remove check
3577 (scop_contains_non_iv_scalar_phi_nodes): New.
3578 (build_scop_conditions_1, build_scop_conditions): Remove check for
3579 non iv scalar phi nodes.
3580 (print_scop_statistics): New.
3581 (graphite_transform_loops): Cleanup.
3582
3583 * graphite.h: Move to sese & cleanup.
3584 * sese.c: New.
3585 * sese.h: New.
3586
3587 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3588 Tobias Grosser <grosser@fim.uni-passau.de>
3589
3590 * graphite.c (build_scop_conditions_1): Conditions are only
3591 at the end of a basic block.
3592
3593 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3594 Tobias Grosser <grosser@fim.uni-passau>
3595
3596 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3597 field.
3598 (GBB_ALPHA): Removed.
3599
3600 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3601 Tobias Grosser <grosser@fim.uni-passau.de>
3602
3603 * graphite-data-ref.c (graphite_test_dependence): Don't use
3604 GBB_DYNAMIC_SCHEDULE.
3605 * graphite.c (new_graphite_bb): Same.
3606 (free_graphite_bb): Same.
3607 (build_scop_dynamic_schedules): Removed.
3608 (graphite_transform_loops): Don't call it.
3609 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3610 (GBB_DYNAMIC_SCHEDULE): Removed.
3611
3612 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3613 Tobias Grosser <grosser@fim.uni-passau.de>
3614
3615 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3616 (print_graphite_bb): Same.
3617 (build_cloog_prog): Same.
3618
3619 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3620 Tobias Grosser <grosser@fim.uni-passau.de>
3621
3622 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3623
3624 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3625 Tobias Grosser <grosser@fim.uni-passau.de>
3626
3627 * graphite.c (build_scop_context): Don't use CloogMatrix.
3628 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3629 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3630
3631 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3632 Tobias Grosser <grosser@fim.uni-passau.de>
3633
3634 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3635 liveout_renames, add_params fields...
3636 (struct sese): ... here.
3637 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3638 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3639
3640 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3641 Tobias Grosser <grosser@fim.uni-passau.de>
3642
3643 * graphite.c (print_scop): Do not print the CLooG program.
3644 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3645 build_cloog_prog, gloog): Don't use SCOP_PROG.
3646 (find_transform): Renamed scop_to_clast.
3647 (print_generated_program, debug_generated_program): New.
3648 (graphite_transform_loops): Adapt to new interface.
3649 * graphite.h (struct scop): Remove program field.
3650 (SCOP_PROG): Removed.
3651 (print_generated_program, debug_generated_program): Declared.
3652
3653 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3654
3655 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3656 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3657 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3658 free_graphite_bb, build_scop_canonical_schedules,
3659 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3660 schedules are now represented using a ppl_Linear_Expression_t.
3661 * graphite.h (struct graphite_bb): Same.
3662 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3663 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3664
3665 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3666
3667 * graphite.c: Free local memory.
3668 * graphite-ppl.c: Same.
3669
3670 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3671
3672 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3673 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3674 swap_constraint_variables, scale_constraint_variable): Removed.
3675 (graphite_trans_bb_strip_mine): Remove pong.
3676 * graphite-ppl.c: Include missing header files.
3677 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3678 * graphite-ppl.h (ppl_strip_loop): Declared.
3679 * Makefile.in (graphite-ppl.o): Adjust dependences.
3680
3681 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3682
3683 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3684 (build_scop_iteration_domain): Same.
3685
3686 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3687
3688 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3689 ping pong.
3690 (add_value_to_dim, scan_tree_for_params_right_scev,
3691 scan_tree_for_params_int): New.
3692 * graphite-ppl.c (oppose_constraint): New.
3693 (insert_constraint_into_matrix): Implement missing cases.
3694 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3695
3696 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3697
3698 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3699 use ppl_move_dimension.
3700
3701 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3702
3703 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3704 * graphite.c: Same.
3705 * graphite.h: Same.
3706 * graphite-ppl.c: Same.
3707 * graphite-ppl.h: Same.
3708
3709 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3710
3711 Revert last 3 commits.
3712
3713 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3714
3715 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3716 ping pong.
3717 (add_value_to_dim, scan_tree_for_params_right_scev,
3718 scan_tree_for_params_int): New.
3719 * graphite-ppl.c (oppose_constraint): New.
3720 (insert_constraint_into_matrix): Implement missing cases.
3721 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3722
3723 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3724
3725 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3726
3727 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3728 Tobias Grosser <grosser@fim.uni-passau.de>
3729
3730 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3731 use ppl_move_dimension.
3732 * graphite-ppl.c (ppl_move_dimension): New.
3733 * graphite-ppl.h (ppl_move_dimension): Declared.
3734
3735 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3736
3737 * graphite.c: Do not include cloog/cloog.h.
3738 (print_graphite_bb): Remove ping pong, call PPL print function.
3739
3740 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3741
3742 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3743 (graphite.o): Add dependence on graphite-ppl.h.
3744 (graphite-ppl.o): New.
3745 (graphite-data-ref.c): Ping pong between PPL data structures
3746 and matrices.
3747 * graphite-ppl.c: New.
3748 * graphite-ppl.h: New.
3749 * graphite.c: Include graphite-ppl.h.
3750 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3751 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3752 Ping pong between PPL data structures and matrices.
3753 (new_graphite_bb): Create a PPL constraint system.
3754 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3755 (build_loop_iteration_domains): Use PPL functions.
3756 * graphite.h: Include graphite-ppl.h. Fix comments.
3757 (graphite_bb): Use a ppl_Constraint_System_t instead of
3758 CloogMatrix for representing the domain.
3759 (scop): Remove static_schedule.
3760 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3761
3762 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3763
3764 * graphite.c: Fix some comments.
3765
3766 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3767
3768 PR middle-end/38953
3769 * graphite.c (if_region_set_false_region): After moving a region
3770 in the false branch of a condition, remove the empty dummy
3771 basic block.
3772 (gloog): Remove wrong fix for PR38953.
3773
3774 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3775
3776 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3777 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3778 register_bb_in_sese, new_sese, free_sese): Moved.
3779 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3780 outermost_loop_in_scop, build_scop_iteration_domain,
3781 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3782 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3783 Use loop_in_sese_p instead of loop_in_scop_p.
3784 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3785 (free_scop): Do not free SCOP_BBS_B.
3786 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3787 ref_nb_loops): Moved here...
3788 * graphite.h (ref_nb_loops): ... from here.
3789 (struct scop): Remove bbs_b bitmap.
3790 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3791 * testsuite/gcc.dg/graphite/scop-19.c: New
3792
3793 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3794
3795 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3796 detection.
3797
3798 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3799
3800 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3801 eq_loop_to_cloog_loop): Remove.
3802 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3803 * graphite.h (struct scop): Remove loop2cloog_loop.
3804 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3805
3806 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3807
3808 * opts.c (decode_options): Only add graphite options to O2
3809 if we compile with graphite enabled.
3810
3811 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3812
3813 * Merge from mainline (r143163:143684).
3814
3815 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3816
3817 * graphite.c (debug_value): Removed.
3818 * graphite.h (debug_value): Removed.
3819
3820 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3821
3822 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3823 after graphite: pass_copy_prop does not maintain a proper loop closed
3824 SSA form. pass_copy_prop should be fixed.
3825
3826 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3827
3828 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3829
3830 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3831
3832 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3833 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3834 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3835 changed the CFG.
3836
3837 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3838
3839 * graphite.c (gloog): Return true when code gen succeeded.
3840 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3841 the code of the function did not changed. After cleanup_tree_cfg
3842 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3843 form.
3844
3845 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3846
3847 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3848 gimple_call_lhs is NULL.
3849
3850 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3851 Tobias Grosser <tobi.grosser@amd.com>
3852
3853 * graphite.c (graphite_trans_scop_block): Do not block single
3854 nested loops.
3855
3856 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3857 Tobias Grosser <tobi.grosser@amd.com>
3858
3859 * graphite.c (build_scop_canonical_schedules): Start schedules at
3860 zero.
3861
3862 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3863 Tobias Grosser <tobi.grosser@amd.com>
3864
3865 * graphite.c (compare_prefix_loops): New.
3866 (build_scop_canonical_schedules): Rewritten.
3867 (graphite_transform_loops): Move build_scop_canonical_schedules
3868 after build_scop_iteration_domain.
3869
3870 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3871 Tobias Grosser <tobi.grosser@amd.com>
3872
3873 * graphite.c (add_conditions_to_domain): Add the loops to
3874 the dimension of the iteration domain. Do copy the domain
3875 only when it exists.
3876 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3877 (add_conditions_to_constraints): New.
3878 (can_generate_code_stmt, can_generate_code): Removed.
3879 (gloog): Do not call can_generate_code.
3880 (graphite_transform_loops): Call add_conditions_to_constraints
3881 after building the iteration domain.
3882
3883 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3884 Tobias Grosser <tobi.grosser@amd.com>
3885 Jan Sjodin <jan.sjodin@amd.com>
3886
3887 * graphite.c (scan_tree_for_params): On substractions negate
3888 all the coefficients of the term.
3889 (clast_to_gcc_expression_red): New. Handle reduction expressions
3890 of more than two operands.
3891 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3892 (get_vdef_before_scop): Handle also the case of default definitions.
3893
3894 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3895
3896 PR middle-end/38431
3897 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3898 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3899 (gloog): Do not call cleanup_tree_cfg.
3900 (graphite_transform_loops): Call cleanup_tree_cfg after all
3901 scops have been code generated.
3902
3903 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3904
3905 * passes.c (init_optimization_passes): Schedule after
3906 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3907
3908 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3909
3910 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3911 Fix comment.
3912 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3913 Set the type of an expression to the type of its assign statement.
3914 (expand_scalar_variables_expr): Do not pass loop_p.
3915 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3916 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3917 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3918
3919 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3920
3921 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3922 an expression to the gimple_expr_type of its assign statement.
3923 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3924 or tcc_declaration.
3925
3926 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3927
3928 PR tree-optimization/38786
3929 * testsuite/gcc.dg/graphite/pr38786.c: New.
3930 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3931 the SSA_NAME case of expand_scalar_variables_expr.
3932 (expand_scalar_variables_expr): Also gather the scalar computation
3933 used to index the memory access.
3934 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3935 the gimple_stmt_iterator where it inserts new code.
3936
3937 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3938
3939 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3940
3941 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3942
3943 * opts.c (decode_options): Enable flag_graphite_identity and
3944 flag_loop_block in -O2 and above.
3945
3946 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3947
3948 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3949 Fix merge problem: replace with the file from trunk.
3950
3951 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3952
3953 * Merge from mainline (r141727:143163).
3954
3955 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3956 Jan Sjodin <jan.sjodin@amd.com>
3957
3958 PR tree-optimization/38559
3959 * testsuite/gcc.dg/graphite/pr38559.c: New.
3960
3961 * graphite.c (debug_value, copy_constraint,
3962 swap_constraint_variables, scale_constraint_variable, ): New.
3963 (get_lower_bound, get_upper_bound): Removed.
3964 (graphite_trans_bb_strip_mine): Clean up this code that works
3965 only for constant number of iterations. Fully copy upper and
3966 lower bound constraints, not only the constant part of them.
3967 * graphite.h (debug_value): Declared.
3968
3969 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3970
3971 PR tree-optimization/38492
3972 PR tree-optimization/38498
3973 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3974 * tree-chrec.h (scev_is_linear_expression): Declared.
3975 * graphite.c (graphite_cannot_represent_loop_niter): New.
3976 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3977 (graphite_loop_normal_form): Use gcc_assert.
3978 (scan_tree_for_params): Use CASE_CONVERT.
3979 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3980 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3981 Use gcc_assert. Discard scops that contain unhandled cases.
3982 (build_scop_conditions): Return a boolean status for unhandled cases.
3983 (strip_mine_profitable_p): Print the loop number, not its depth.
3984 (is_interchange_valid): Pass the depth of the loop nest, don't
3985 recompute it wrongly.
3986 (graphite_trans_bb_block): Same.
3987 (graphite_trans_bb_block): Print tentative of loop blocking.
3988 (graphite_trans_scop_block): Do not print that the loop has been
3989 blocked.
3990 (graphite_transform_loops): Do not handle scops that contain condition
3991 scalar phi nodes.
3992
3993 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3994 in trunk.
3995 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3996 * testsuite/gcc.dg/graphite/block-1.c: Same.
3997 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3998 blocking.
3999 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
4000 * testsuite/gcc.dg/graphite/block-3.c: New.
4001 * testsuite/gcc.dg/graphite/pr38498.c: New.
4002
4003 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
4004
4005 PR tree-optimization/38510
4006 * gcc.dg/graphite/pr38510.c: New.
4007 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
4008 (translate_clast): Call recompute_all_dominators before
4009 graphite_verify.
4010 (gloog): Call recompute_all_dominators before graphite_verify.
4011
4012 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
4013
4014 PR tree-optimization/38492
4015 * graphite.c (rename_map_elt, debug_rename_elt,
4016 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
4017 rename_map_elt_info, eq_rename_map_elts,
4018 get_new_name_from_old_name, bb_in_sese_p): Moved around.
4019 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
4020 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
4021 (sese_build_livein_liveouts): New.
4022 (new_sese, free_sese): New.
4023 (new_scop): Call new_sese.
4024 (free_scop): Call free_sese.
4025 (rename_variables_from_edge, rename_phis_end_scop): Removed.
4026 (register_old_new_names): Renamed register_old_and_new_names.
4027 (register_scop_liveout_renames, add_loop_exit_phis,
4028 insert_loop_close_phis, struct igp,
4029 default_liveout_before_guard, add_guard_exit_phis,
4030 insert_guard_phis, copy_renames): New.
4031 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
4032 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
4033 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
4034 (scop_adjust_phis_for_liveouts): New.
4035 (gloog): Call scop_adjust_phis_for_liveouts.
4036
4037 * graphite.h (struct sese): Documented. Added fields liveout,
4038 num_ver and livein.
4039 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
4040 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
4041 (struct scop): Added field liveout_renames.
4042 (SCOP_LIVEOUT_RENAMES): New.
4043
4044 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4045
4046 PR tree-optimization/38409
4047 * gcc.dg/graphite/pr38409.c: New.
4048 * graphite.c (nb_reductions_in_loop): Use simple_iv.
4049
4050 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4051
4052 * graphite.c (gcc_type_for_cloog_iv): By default return
4053 integer_type_node.
4054 (graphite_create_new_loop): Don't fold_convert the already
4055 fold_convert-ed expression.
4056
4057 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
4058
4059 PR tree-optimization/38446
4060 * gcc.dg/graphite/pr38446.c: New.
4061 * graphite.c (register_bb_in_sese): New.
4062 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
4063 looking at the bbs in the region.
4064 * graphite.h (sese): Add region_basic_blocks pointer set to
4065 structure and initialize at the time of defining new scop.
4066
4067 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
4068
4069 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
4070 (find_params_in_bb): Do not free data refs.
4071 (free_graphite_bb): Add FIXME on disabled free_data_refs.
4072
4073 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
4074
4075 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
4076 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4077 * testsuite/gcc.dg/graphite/block-5.c: New.
4078 * testsuite/gcc.dg/graphite/block-6.c: New.
4079 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
4080 * testsuite/gcc.dg/graphite/pr37684.c: Same.
4081 * testsuite/gcc.dg/graphite/block-2.c: Same.
4082
4083 * graphite.c (struct ivtype_map_elt): New.
4084 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
4085 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
4086 gcc_type_for_cloog_iv): New.
4087 (loop_iv_stack_patch_for_consts): Use the type of the induction
4088 variable from the original loop, except for the automatically
4089 generated loops, i.e., in the case of a strip-mined loop, in
4090 which case there is no original loop: in that case just use
4091 integer_type_node.
4092 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
4093 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
4094 (clast_name_to_gcc): Accept params to be NULL.
4095 (clast_to_gcc_expression): Take an extra parameter for the type.
4096 Convert to that type all the expressions built by this function.
4097 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
4098 (graphite_translate_clast_equation): Compute the type of the
4099 clast_equation before translating its LHS and RHS.
4100 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
4101 (graphite_create_new_loop): Compute the type of the induction
4102 variable before translating the lower and upper bounds and before
4103 creating the induction variable.
4104 (rename_variables_from_edge, rename_phis_end_scop): New.
4105 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
4106 (sese_add_exit_phis_edge): Do not use integer_zero_node.
4107 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
4108 compute_cloog_iv_types): New.
4109 (gloog): Call compute_cloog_iv_types before starting the
4110 translation of the clast.
4111
4112 * graphite.h (struct graphite_bb): New field cloog_iv_types.
4113 (GBB_CLOOG_IV_TYPES): New.
4114 (debug_ivtype_map): Declared.
4115 (oldiv_for_loop): New.
4116
4117 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
4118
4119 PR middle-end/38459
4120 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
4121 (param_index): Assert if parameter is not know after parameter
4122 detection.
4123 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
4124 (find_scop_parameters): Mark, that we have finished parameter
4125 detection.
4126 (graphite_transform_loops): Move condition detection before parameter
4127 detection.
4128 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
4129 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
4130
4131 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4132
4133 * graphite.c (graphite_transform_loops): Always call find_transform ()
4134 in ENABLE_CHECKING. So we test these code paths, even if we do not
4135 generate code.
4136
4137 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
4138
4139 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
4140 (print_scop): Ditto.
4141
4142 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
4143
4144 PR middle-end/38084
4145 Fix testsuite/gfortran.dg/graphite/id-3.f90.
4146 * graphite.c (scopdet_basic_block_info): Fix bug that found some
4147 regions more than once.
4148
4149 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4150
4151 Fix testsuite/gfortran.dg/graphite/id-4.f90.
4152 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
4153 when not needed.
4154
4155 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4156
4157 Fix testsuite/gfortran.dg/graphite/id-1.f90.
4158 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
4159 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
4160 (max_precision_type): New.
4161 (value_clast): Removed.
4162 (clast_to_gcc_expression): Be more careful to types of expressions.
4163 Use max_precision_type and update use of gmp_cst_to_tree.
4164 (graphite_translate_clast_equation): Use max_precision_type.
4165 (graphite_create_guard_cond_expr): Do not use integer_type_node,
4166 use the type of the condition.
4167 (graphite_create_new_loop): Do not use integer_type_node, use the
4168 max_precision_type of lb and ub.
4169
4170 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
4171
4172 * graphite.c (build_scops_1): Initialize open_scop.exit
4173 and sinfo.last.
4174
4175 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4176
4177 * testsuite/gcc.dg/graphite/pr38084.c: New.
4178 * testsuite/gfortran.dg/graphite/id-1.f90: New.
4179 * testsuite/gfortran.dg/graphite/id-2.f90: New.
4180 * testsuite/gfortran.dg/graphite/id-3.f90: New.
4181 * testsuite/gfortran.dg/graphite/id-4.f90: New.
4182 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
4183
4184 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
4185 Jan Sjodin <jan.sjodin@amd.com>
4186 Harsha Jagasia <harsha.jagasia@amd.com>
4187
4188 PR middle-end/37852
4189 PR middle-end/37883
4190 PR middle-end/37928
4191 PR middle-end/37980
4192 PR middle-end/38038
4193 PR middle-end/38039
4194 PR middle-end/38073
4195 PR middle-end/38083
4196 PR middle-end/38125
4197
4198 * testsuite/gcc.dg/graphite/pr38073.c: New.
4199 * testsuite/gcc.dg/graphite/pr37928.c: New.
4200 * testsuite/gcc.dg/graphite/pr37883.c: New.
4201 * testsuite/gcc.dg/graphite/pr38125.c: New.
4202 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
4203 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
4204 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
4205
4206 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
4207 the number of detected scops. Copy exact same test for loop
4208 blocking...
4209 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
4210 loops to be blocked as reductions are not handled.
4211 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
4212
4213 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
4214 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
4215 ...here.
4216 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
4217 * Makefile.in (graphite.o): Depend on value-prof.h.
4218 (graphite.o-warn): Removed -Wno-error.
4219 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
4220 to be a NULL pointer. Call update_stmt. Return the newly created
4221 cannonical induction variable.
4222
4223 * graphite.h (debug_rename_map): Declared. Fix some comments.
4224
4225 * graphite.c: Reimplement the code generation from graphite to gimple.
4226 Include value-prof.h.
4227 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
4228 (get_old_iv_from_ssa_name): Removed.
4229 (graphite_stmt_p): New.
4230 (new_graphite_bb): Test for useful statements before building a
4231 graphite statement for the basic block.
4232 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
4233 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
4234 reason.
4235 (recompute_all_dominators, graphite_verify,
4236 nb_reductions_in_loop, graphite_loop_normal_form): New.
4237 (scop_record_loop): Call graphite_loop_normal_form.
4238 (build_scop_loop_nests): Iterate over all the blocks of the
4239 function instead of relying on the incomplete information from
4240 SCOP_BBS. Return the success of the operation.
4241 (find_params_in_bb): Use the data from GBB_DATA_REFS.
4242 (add_bb_domains): Removed.
4243 (build_loop_iteration_domains): Don't call add_bb_domains.
4244 Add the iteration domain only to the basic blocks that have been
4245 translated to graphite.
4246 (build_scop_conditions_1): Add constraints only if the basic
4247 block have been translated to graphite.
4248 (build_scop_data_accesses): Completely disabled until data
4249 dependence is correctly implemented.
4250 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
4251 (remove_all_edges_1, remove_all_edges): Removed.
4252 (get_new_name_from_old_name): New.
4253 (graphite_rename_variables_in_stmt): Renamed
4254 rename_variables_in_stmt. Call get_new_name_from_old_name.
4255 Use replace_exp and update_stmt.
4256 (is_old_iv): Renamed is_iv.
4257 (expand_scalar_variables_stmt): Extra parameter for renaming map.
4258 Use replace_exp and update_stmt.
4259 (expand_scalar_variables_expr): Same. Use the map to get the
4260 new names for the renaming of induction variables and for the
4261 renaming of variables after a basic block has been copied.
4262 (expand_scalar_variables): Same.
4263 (graphite_rename_variables): Renamed rename_variables.
4264 (move_phi_nodes): Removed.
4265 (get_false_edge_from_guard_bb): New.
4266 (build_iv_mapping): Do not insert the induction variable of a
4267 loop in the renaming iv map if the basic block does not belong
4268 to that loop.
4269 (register_old_new_names, graphite_copy_stmts_from_block,
4270 copy_bb_and_scalar_dependences): New.
4271 (translate_clast): Heavily reimplemented: copy basic blocks,
4272 do not move them. Finally, in call cleanup_tree_cfg in gloog.
4273 At each translation step call graphite_verify ensuring the
4274 consistency of the SSA, loops and dominators information.
4275 (collect_virtual_phis, find_vdef_for_var_in_bb,
4276 find_vdef_for_var_1, find_vdef_for_var,
4277 patch_phis_for_virtual_defs): Removed huge hack.
4278 (mark_old_loops, remove_dead_loops, skip_phi_defs,
4279 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
4280 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
4281 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
4282 if_region_get_condition_block, if_region_set_false_region,
4283 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
4284 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
4285 sese_add_exit_phis_edge, sese_add_exit_phis_var,
4286 rewrite_into_sese_closed_ssa): New.
4287 (gloog): Remove dead code. Early return if code cannot be
4288 generated. Call cleanup_tree_cfg once the scop has been code
4289 generated.
4290 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
4291 block loops with less than two loops.
4292 (graphite_apply_transformations): Remove the call to
4293 scop_remove_ignoreable_gbbs.
4294 (limit_scops): When build_scop_loop_nests fails, continue on
4295 the next scop. Fix open_scop.entry.
4296 (graphite_transform_loops): Call recompute_all_dominators: force the
4297 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
4298 Call initialize_original_copy_tables and free_original_copy_tables
4299 to be able to copy basic blocks during code generation.
4300 When build_scop_loop_nests fails, continue on next scop.
4301 (value_clast): New union.
4302 (clast_to_gcc_expression): Fix type cast warning.
4303
4304 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
4305
4306 * Merge from mainline (r140838:141727).
4307
4308 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4309
4310 PR middle-end/37833
4311
4312 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
4313
4314 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
4315
4316 PR middle-end/37943
4317
4318 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
4319 exits and conditions.
4320 * testsuite/gcc.dg/graphite/pr37943.c: New.
4321
4322 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4323
4324 PR middle-end/37886
4325 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
4326
4327 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
4328
4329 * doc/invoke.texi: Fix spaces.
4330
4331 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
4332
4333 PR tree-optimization/37891
4334 Reverted last commit.
4335 * graphite.c (create_single_entry_edge): Set
4336 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4337
4338 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
4339 Mitul Thakkar <mitul.thakkar@amd.com>
4340
4341 * graphite.c (create_single_entry_edge): Set
4342 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
4343
4344 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
4345
4346 * doc/invoke.texi: Add -fgraphite-identity.
4347 * graphite.c (graphite_apply_transformations): Check for
4348 -fgraphite-identity.
4349 * toplev.c (process_options): Add flag_graphite_identity.
4350 * tree-ssa-loop.c: Add flag_graphite_identity.
4351
4352 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4353
4354 Undo changes from 2008-10-02:
4355 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4356 operand type when copying the operand to a variable of different type.
4357 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4358 with the IV name after increment.
4359
4360 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
4361 Harsha Jagasia <harsha.jagasia@amd.com>
4362
4363 PR tree-optimization/37828
4364 * testsuite/gcc.dg/graphite/pr37828.c: New.
4365 * graphite.c (graphite_trans_loop_block): Do not loop block
4366 single nested loops.
4367
4368 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
4369 Sebastian Pop <sebastian.pop@amd.com>
4370
4371 * graphite.c (struct rename_map_elt, new_rename_map_elt,
4372 rename_map_elt_info, eq_rename_map_elts): New.
4373 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
4374 (expand_scalar_variables_expr): Change parameters.
4375 (expand_scalar_variables_stmt): Same.
4376 (expand_scalar_variables): Same.
4377 (graphite_rename_ivs): Rename graphite_rename_variables.
4378 (build_iv_mapping): New.
4379 (translate_clast): Call build_iv_mapping.
4380 * graphite.h (gbb_p): New name.
4381
4382 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
4383
4384 PR tree-optimization/37684
4385 * gcc.dg/graphite/pr37684.c: New.
4386 * graphite.c (exclude_component_ref): New.
4387 (is_simple_operand): Call exclude_component_ref.
4388
4389 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
4390 Harsha Jagasia <harsha.jagasia@amd.com>
4391
4392 PR tree-optimization/37485
4393 * gcc.dg/graphite/block-2.c: New
4394 * graphite.c (gmp_cst_to_tree): Moved.
4395 (iv_stack_entry_is_constant): New.
4396 (iv_stack_entry_is_iv): New.
4397 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
4398 (loop_iv_stack_insert_constant): New.
4399 (loop_iv_stack_pop): Use new datatpype.
4400 (loop_iv_stack_get_iv): Same.
4401 (loop_iv_stack_get_iv_from_name): Same.
4402 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
4403 (loop_iv_stack_patch_for_consts): New.
4404 (loop_iv_stack_remove_constants): New.
4405 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
4406 (translate_clast): Call loop_iv_stack_patch_for_consts and
4407 loop_iv_stack_remove_constants.
4408 (gloog): Use new datatype. Redirect construction edge to end
4409 block to avoid accidental deletion.
4410 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
4411 iv stack entry.
4412 (union iv_stack_entry_data): New. Data in iv stack entry.
4413 (struct iv_stack_entry): New. Datatype for iv stack entries.
4414
4415 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4416
4417 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
4418 operand type when copying the operand to a variable of different type.
4419
4420 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4421
4422 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
4423 with the IV name after increment.
4424
4425 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
4426
4427 * Merge from mainline (r140164:140838).
4428
4429 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4430
4431 * graphite-data-ref.c: New.
4432 * graphite.c (print_scop): Also dump the dependence graph.
4433 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
4434 (new_scop): Initialize SCOP_DEP_GRAPH.
4435 (build_scop_dynamic_schedules): New.
4436 (build_access_matrix_with_af): Fixed column numbering.
4437 (graphite_transform_loops): Call build_scop_dynamic_schedules.
4438 * graphite.h: Add ifndef/define guards against multiple inclusion.
4439 (struct scop): Add dep_graph field.
4440 (SCOP_DEP_GRAPH): Defined.
4441 (ref_nb_loops): Fixed and moved to other position.
4442 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4443 (nb_loops_around_loop_in_scop): New.
4444 (graphite_dump_dependence_graph): Declared.
4445 (graphite_build_rdg_all_levels): Declared.
4446 (graphite_test_dependence): Declared.
4447 * Makefile.in (graphite-data-ref.o): New target.
4448
4449 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
4450
4451 * Merge from mainline (139870:140164).
4452
4453 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4454
4455 * Merge from mainline (138275:139870).
4456 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4457 the commits from trunk broke the niter detection.
4458
4459 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
4460
4461 * graphite.c: Add more documentation. Fix formatting.
4462 (debug_loop_vec, debug_oldivs, loop_iv_stack,
4463 loop_iv_stack_debug): Moved...
4464 (schedule_to_scattering): Move before use.
4465 (dot_all_scops): Include in "#if 0" the code for system
4466 call dotty.
4467
4468 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4469 loop_iv_stack_debug): ...here.
4470
4471 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
4472
4473 * tree-phinodes.c (make_phi_node): Extern.
4474 (add_phi_node_to_bb): New.
4475 (create_phi_node): Call add_phi_node_to_bb.
4476 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4477 (remove_statement): Handle case where stored phi was updated
4478 and is no longer the same.
4479 * graphite.c (is_parameter): New.
4480 (is_old_iv): New.
4481 (expand_scalar_variables_expr): New.
4482 (expand_scalar_variables_stmt): New.
4483 (expand_scalar_variables): New.
4484 (move_phi_nodes): Create new phi instead of moving old one.
4485 (translate_clast): Call expand_scalar_variables.
4486 (find_vdef_for_var_in_bb): Also scan regular definitions.
4487 (skip_phi_defs): New.
4488 (collect_scop_exit_phi_args): New.
4489 (patch_scop_exit_phi_args): New.
4490 (gloog): Patch phis after scop.
4491 * tree-flow.h: (add_phi_node_to_bb): Declared.
4492 (make_phi_node): Declared.
4493
4494 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4495
4496 * graphite.c (end_scop): Split the entry of the scop when it
4497 is the header of the loop in which the scop is ending.
4498 (build_scops_1, limit_scops): Update uses of end_scop.
4499
4500 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
4501
4502 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4503 SCOP_ENTRY or SCOP_EXIT.
4504
4505 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4506
4507 * graphite.c (get_construction_edge): Removed.
4508 (gloog): Construction edge is the scop entry edge.
4509
4510 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4511
4512 * graphite.c (can_generate_for_scop): Removed.
4513 (gloog): Do not call it.
4514
4515 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4516
4517 * graphite.c (new_scop): Entry of a scop is an edge.
4518 Initialize SESE region.
4519 (free_scop): Free SESE region.
4520 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4521 (split_difficult_bb): New, split from end_scop.
4522 (end_scop): Exit of a scop is an edge.
4523 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4524 not automatically updated and thus is always wrong.
4525 * graphite.h (struct sese): New.
4526 (SESE_ENTRY): New.
4527 (SESE_EXIT): New.
4528 (struct scop): New field for a SESE region. Remove entry, exit.
4529 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4530 semantics as before. Moved comment around.
4531
4532 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4533 Sebastian Pop <sebastian.pop@amd.com>
4534
4535 * graphite.c (graphite_transform_loops): Always enable gloog
4536 and find_transform when ENABLE_CHECKING.
4537
4538 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4539
4540 * graphite.c (graphite_transform_loops): Move pretty printer
4541 of SCOPs before doing any transform. Remove call to print_scops
4542 and dot_all_scops_1.
4543
4544 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4545
4546 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4547 (print_graphite_bb): Same.
4548
4549 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4550
4551 * graphite.c (dot_all_scops_1): Cleanup.
4552 (move_scops): Fix comment.
4553
4554 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
4555
4556 * graphite.c (build_scop_bbs): Revert commit 139355:
4557
4558 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4559 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4560
4561 * graphite.c (build_scop_bbs): Factor up code.
4562
4563 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4564
4565 * graphite.c (gloog): Update dominator info.
4566
4567 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
4568
4569 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4570
4571 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4572
4573 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4574 initialization.
4575 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4576 (translate_clast): Correct formatting.
4577 * graphite.h (struct num_map): Removed.
4578 (struct graphite_bb): Remove num_map field.
4579 (GBB_INDEX_TO_NUM_MAP): Removed.
4580
4581 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4582
4583 * graphite.c (build_access_matrix_with_af): Fix comments.
4584 (build_scop_data_accesses): Same.
4585
4586 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4587
4588 * graphite.c (build_scop_data_accesses): Don't construct
4589 access matrices. Add a FIXME and an assert condition that
4590 should pass when the access matrices will be needed.
4591
4592 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4593
4594 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4595 really_constant_p.
4596 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4597 Moved close by free_graphite_bb.
4598 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4599 (new_scop): Move close by free_scop.
4600 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4601
4602 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4603
4604 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4605 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4606 instead of recursive call.
4607 (graphite_translate_clast_equation): New.
4608 (graphite_create_guard_cond_expr): New.
4609 (graphite_create_new_guard): New.
4610 (get_stack_index_from_iv): Removed.
4611 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4612 (get_true_edge_from_guard_bb): New.
4613 (translate_clast): Handle stmt_guard in clast.
4614 (get_construction_edge): Allow construction edge detection for
4615 a scope entry with multiple predecessors if one predecessor is
4616 the immediate dominator of scope entry.
4617 (can_generate_code_stmt): Enable code generation for clast_guard.
4618 (gloog): Use correct context loop. Removed check for post dominators.
4619 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4620
4621 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4622
4623 * graphite.c (remove_dead_loops): Document better which
4624 loops are removed.
4625
4626 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4627
4628 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4629 and PPLINC.
4630 (graphite.o): Also depends on pointer-set.h.
4631
4632 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4633
4634 * graphite.c (scop_record_loop): Fix compile warning.
4635
4636 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4637 Sebastian Pop <sebastian.pop@amd.com>
4638
4639 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4640
4641 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4642
4643 * graphite.c (build_graphite_bb): Initialize bb->aux to
4644 point to the graphite_bb_p.
4645 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4646 content of bb->aux.
4647 (add_bb_domains): Does not use the scop parameter.
4648 (graphite_transform_loops): Clean bb->aux at the end.
4649
4650 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4651 Sebastian Pop <sebastian.pop@amd.com>
4652
4653 * testsuite/lib/target-supports.exp
4654 (check_effective_target_fgraphite): New.
4655
4656 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4657 check_effective_target_fgraphite returns false.
4658 Set dg-do-what-default to compile.
4659 (scan-graphite-dump-times): Removed.
4660 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4661
4662 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4663 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4664 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4665 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4666 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4667 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4668 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4669 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4670 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4671 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4672 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4673 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4674 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4675 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4676 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4677 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4678 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4679 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4680 * testsuite/gcc.dg/graphite/block-0.c: Same.
4681 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4682 * testsuite/gcc.dg/graphite/block-1.c: Same.
4683 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4684 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4685 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4686 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4687 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4688
4689 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4690
4691 * graphite.c: Fix some XXX comments.
4692 (build_scop_dynamic_schedules): Removed.
4693
4694 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4695
4696 * graphite.h (scop_max_loop_depth): Moved...
4697 * graphite.c (scop_max_loop_depth): ...here.
4698 (remove_all_edges_1): New.
4699 (remove_all_edges): Factored code.
4700 (remove_cond_exprs): Check only the last statement for
4701 a GIMPLE_COND expression.
4702
4703 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4704
4705 * graphite.c (scan_tree_for_params): Early return when the
4706 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4707 (find_scop_parameters): Factor out code.
4708 (graphite_trans_bb_strip_mine): Remove dead code.
4709
4710 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4711
4712 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4713 graphite_trans_bb_move_loop): Factor asserts.
4714 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4715 Do not call calculate_dominance_info and estimate_bb_frequencies.
4716
4717 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4718
4719 * graphite.c (create_loops_mapping, free_loops_mapping,
4720 create_loops_mapping_num, debug_loop_mapping_1,
4721 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4722 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4723 graphite_loops_mapping_add_child_num,
4724 graphite_loops_mapping_insert_child,
4725 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4726 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4727 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4728 create_num_from_index, get_num_from_index,
4729 swap_loop_mapped_depth): Removed.
4730 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4731 (free_scop): Do not call free_loops_mapping.
4732 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4733 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4734 get_loop_mapped_depth.
4735 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4736 (graphite_trans_bb_strip_mine): Same.
4737 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4738 (struct scop): Remove field loops_mapping.
4739
4740 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4741 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4742
4743 * graphite.c (scop_record_loop): Factor out one level of the
4744 condition by early return.
4745 (build_scop_loop_nests): Format following FSF coding style.
4746 (build_scop_dynamic_schedules): Factor out code.
4747 (scopdet_bb_info): Reindent. Default case should not be reachable.
4748
4749 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4750 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4751
4752 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4753 assignments that are not handled as simple operands for now.
4754
4755 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4756 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4757
4758 * graphite.c (build_scop_bbs): Factor up code.
4759
4760 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4761 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4762
4763 * graphite.c (stmt_simple_for_scop_p): Factor code out
4764 of the loop.
4765 (enum gbb_type): New. Group all the GBB_* types under it.
4766 (is_loop_exit): Moved...
4767 (end_scop): Enable BB spliting.
4768 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4769 * cfgloop.h (is_loop_exit): Declared.
4770
4771 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4772
4773 * doc/invoke.texi: Remove strides from examples containing
4774 DO loops when the strides are equal to 1.
4775
4776 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4777 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4778
4779 * graphite.c (graphite_trans_scop_block): Or the result with
4780 the result from graphite_trans_loop_block.
4781 * testsuite/gcc.dg/graphite/block-1.c: New.
4782 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4783 * testsuite/gfortran.dg/graphite/block-2.f: New.
4784
4785 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4786
4787 * graphite.c (graphite_transform_loops): Call cloog_initialize
4788 and cloog_finalize.
4789
4790 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4791
4792 * tree-data-ref.c) (stmt_simple_memref_p): New.
4793 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4794 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4795 (is_simple_operand): Call stmt_simple_memref_p.
4796
4797 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4798 using pointer arithmetic, as this is optimized by PRE and
4799 makes the code too difficult to analyze.
4800
4801 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4802
4803 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4804
4805 * gdbinit.in (pgg): New.
4806
4807 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4808
4809 * graphite.c (graphite_trans_loop_block): Fix warning.
4810
4811 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4812
4813 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4814
4815 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4816
4817 * graphite.c (graphite_trans_bb_block): Remove check for
4818 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4819 Check if loop blocking is profitable for every loop, before applying
4820 the changes.
4821 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4822 if flag_loop_block is set.
4823
4824 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4825
4826 * graphite.c: Add some more documentation for the loop
4827 mapping.
4828
4829 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4830
4831 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4832 * graphite.c: Format on less than 80 columns.
4833 * graphite.h: Same.
4834
4835 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4836
4837 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4838
4839 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4840
4841 * doc/invoke.texi (floop-block, floop-strip-mine,
4842 floop-interchange): Update documentation with examples.
4843
4844 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4845
4846 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4847 add_referenced_var.
4848 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4849
4850 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4851
4852 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4853 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4854 * tree-scalar-evolution.c: Revert useless changes.
4855 * tree-phinodes.c: Same.
4856 * cfghooks.c: Same.
4857 * vec.h: Same.
4858 * tree-vectorizer.h: Same.
4859 * tree-flow.h: Same.
4860 * tree-cfg.c: Same.
4861 * common.opt (fgraphite): Update documentation.
4862
4863 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4864
4865 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4866 -floop-interchange): Add more text for explaining what each of these
4867 flags is doing.
4868 * tree-into-ssa.c (gimple_vec): Moved to...
4869 * graphite.c: Include gimple.h.
4870 (gimple_vec): Moved to...
4871 (del_loop_to_cloog_loop): Removed.
4872 (loop_affine_expr): Do not call create_data_ref when the
4873 operand is a constant.
4874 (new_scop): Use free instead of del_loop_to_cloog_loop.
4875 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4876 * gimple.h (gimple_vec): ... here.
4877
4878 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4879
4880 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4881 latch executions.
4882 (build_loop_iteration_domains): Fail, if latch executions unknown.
4883
4884 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4885
4886 * graphite.c (add_conditions_to_domain): New.
4887 (build_scop_conditions_1): Call add_conditions_to_domain.
4888 (set_cloog_options): Allow to disable optimizations.
4889
4890 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4891
4892 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4893 Do not use walk_dominator_tree.
4894 (find_scop_parameters): Do not use walk_dominator_tree.
4895
4896 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4897
4898 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4899 (idx_record_params): Adapt.
4900 * graphite.h (scop_gimple_loop_depth): New.
4901
4902 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4903
4904 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4905 (scan_tree_for_params): Remove value_init.
4906 (build_scop_context): Remove value_init.
4907 (build_loop_iteration_domains): Remove value_init.
4908 (schedule_to_scattering): Remove value_init.
4909 (graphite_trans_bb_strip_mine): Remove value_init.
4910
4911 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4912
4913 * gcc/graphite.c (limit_scops): New.
4914 (graphite_transform_loops): Add limit SCoPs.
4915 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4916 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4917 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4918 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4919 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4920 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4921 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4922 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4923 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4924 Change loop numbers.
4925 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4926 Change loop numbers.
4927 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4928 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4929 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4930 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4931 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4932 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4933 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4934 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4935 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4936 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4937
4938 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4939
4940 * graphite.c (graphite_transform_loops): Call always find_transform.
4941
4942 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4943
4944 * graphite.c (free_loops_mapping): New.
4945 (stmt_simple_for_scop_p): Fix typo.
4946 (stmt_simple_for_scop_p): Fix tuples functions, that
4947 broke polyhedron.
4948 (free_graphite_bb): Fix some memleaks.
4949 (free_scop): Fix some memleaks.
4950 (scopdet_bb_info): Do not forget some tmp SCoPs.
4951 (find_params_in_bb): Fix some memleaks.
4952 (clast_to_gcc_expression): Fix warning.
4953
4954 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4955
4956 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4957 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4958
4959 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4960
4961 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4962 Move code ifdef-ed HAVE_cloog...
4963 * graphite.c: Include toplev.h.
4964 ... here.
4965 * Makefile.in (OBJS-common): Always build graphite.o.
4966 (BACKEND): Remove @GRAPHITE@.
4967 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4968 (graphite.o): Depend on TOPLEV_H.
4969
4970 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4971
4972 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4973 Remove typo left from polylib to ppl conversion.
4974 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4975
4976 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4977
4978 * toplev.c (process_options): Move the graphite loop optimization
4979 flags...
4980 * tree-ssa-loop.c (graphite_transforms): ... here.
4981 When not configured with CLooG, print to dump_file that
4982 Graphite transforms were not performed.
4983 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4984 New.
4985 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4986 scan-graphite-dump-times.
4987
4988 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4989
4990 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4991 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4992
4993 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4994 Jan Sjodin <jan.sjodin@amd.com>
4995
4996 * configure: Regenerated.
4997 * omp-low.c (expand_omp_sections): Remove now unused code.
4998 * config.in (HAVE_polylib): Removed.
4999 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
5000 (PPLLIBS, PPLINC): Added.
5001 * graphite.c: Replace unsigned with int wherever possible.
5002 Don't access Cloog's data structures, but use accessor functions.
5003 Clast's stmt->type is now implemented as a vtable: change the
5004 switches of stmt->type into ifs.
5005 (polylib/polylibgmp.h): Don't include.
5006 (initialize_dependence_polyhedron,
5007 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5008 statement_precedes_p, test_dependence, build_rdg_all_levels,
5009 dump_dependence_graph): Removed until this code is cleaned up
5010 or ported to Cloog.
5011 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
5012 (POLYLIBINC): Renamed PPLINC.
5013
5014 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
5015 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5016 Jan Sjodin <jan.sjodin@amd.com>
5017
5018 Finish the merge and tuplification of graphite.
5019
5020 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5021 Jan Sjodin <jan.sjodin@amd.com>
5022
5023 Partial merge from mainline (138072:138275).
5024 * graphite.c still has to be tuplified.
5025
5026 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
5027
5028 * graphite.c (graphite_loops_mapping_max_loop_num): New.
5029 (create_num_from_index): New.
5030 (get_num_from_index): Also pass in the graphite BB.
5031 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
5032 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
5033 (graphite_trans_bb_strip_mine): Call create_num_from_index.
5034 (is_interchange_valid): Return false when failing.
5035 * graphite.h (struct num_map): New.
5036 (struct graphite_bb): New field num_map.
5037 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
5038
5039 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
5040
5041 * graphite.c (dump_gbb_conditions): Print also conditions like
5042 "if (a)". Remove dublicated code and use print_generic_expr ().
5043 (stmt_simple_for_scop_p): Only allow conditions we can handle
5044 {<, <=, >, >=}.
5045
5046 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5047
5048 * graphite.h (struct scop): Removed new_ivs field.
5049 (SCOP_NEWIVS): Deleted.
5050 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
5051 clast_to_gcc_expression, graphite_create_new_loop):
5052 Removed use of new_ivs.
5053
5054 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
5055
5056 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
5057 create_loops_mapping_num, debug_loop_mapping_1): New.
5058 (debug_loop_mapping): Call debug_loop_mapping_1.
5059 (get_loop_mapping_for_num,
5060 graphite_loops_mapping_add_child,
5061 graphite_loops_mapping_add_child_num,
5062 graphite_loops_mapping_insert_child,
5063 graphite_loops_mapping_parent,
5064 split_loop_mapped_depth_for_num,
5065 loop_mapped_depth_split_loop): New.
5066 (increment_loop_mapped_depths): Removed.
5067 (swap_loop_mapped_depth_for_num): Reimplemented.
5068 (new_scop): Call create_loops_mapping.
5069 (scop_record_loop): Call graphite_loops_mapping_insert_child.
5070 (translate_clast): Pass the old loop father in parameter, and pass
5071 it to get_old_iv_from_ssa_name.
5072 (remove_edges_around_useless_blocks, can_generate_code_stmt,
5073 can_generate_code, can_generate_for_scop): New.
5074 (graphite_trans_bb_block): Returns false when it fails to transform.
5075 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
5076
5077 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5078
5079 Reverted all the changes related to the streamization and
5080 loop fusion.
5081 These changes are now tracked in the streamization branch.
5082
5083 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5084 Jan Sjodin <jan.sjodin@amd.com>
5085
5086 * graphite.c (gbb_compare): Correctly constify.
5087 (gbb_can_be_ignored): Indent.
5088 (graphite_trans_scop_swap_1and2): Add legality check.
5089 Remove dead FIXMEs.
5090
5091 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
5092
5093 Remove fallouts from "Reverted the Condate changes".
5094 * tree.h: Remove unused decl.
5095 * testsuite/gcc.dg/tree-checker: Same.
5096 * timevar.def: Remove counter.
5097
5098 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
5099
5100 * Merge from mainline (135673:138072).
5101
5102 Reverted the MIRO changes (from 2008-04-05) that are now
5103 tracked in the miro branch.
5104 * tree-bounds.c: Removed.
5105 * tree-bounds.h: Removed.
5106
5107 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
5108 are now tracked in the condate branch.
5109 * tree-check.c: Removed.
5110 * tree-match.c: Removed.
5111 * condate.y: Removed.
5112
5113 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5114
5115 * common.opt: New user flag -floop-block, -floop-strip-mine
5116 and -floop-interchange.
5117 * toplev.c (process_options): Enable -fgraphite pass if any one of the
5118 graphite loop optimization flags is turned on.
5119 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
5120 flag_loop_strip_mine and flag_loop_interchange checks before
5121 optimizations.
5122 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
5123 -floop-strip-mine and -floop-interchange.
5124 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
5125 -fgraphite.
5126 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
5127 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
5128 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
5129
5130 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
5131 Sebastian Pop <sebastian.pop@amd.com>
5132
5133 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
5134 (create_empty_loop_on_edge): More fixes.
5135 * tree-phinodes.c (resize_phi_node): Extern.
5136 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
5137 * cfghooks.c (update_dominator_information): New split from
5138 split_edge.
5139 * tree-vectorizer.c (rename_variables_in_bb): Extern.
5140 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
5141 successor of the function entry block.
5142
5143 * graphite.c: Include pointer-set.h.
5144 (debug_loop_mapping, increment_loop_mapped_depths,
5145 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
5146 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
5147 swap_loop_mapped_depth_for_num, get_num_from_index,
5148 swap_loop_mapped_depth, loop_iv_stack_debug,
5149 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
5150 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
5151 get_old_iv_from_ssa_name): New.
5152 (new_scop): Initialize SCOP_LOOPS_MAPPING.
5153 (free_scop): Free SCOP_LOOPS_MAPPING.
5154 (scop_record_loop): Record old ivs.
5155 (create_var_name): Removed.
5156 (initialize_cloog_names): Allocate double space in case strip mine
5157 applies to all loops once.
5158 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
5159 (clast_to_gcc_expression): Same. Implement more clast to gimple
5160 translation.
5161 (graphite_create_new_loop): Pass in ivstack.
5162 (remove_all_edges): Pass in the construction_edge.
5163 (graphite_remove_iv): Removed.
5164 (graphite_rename_ivs, graphite_rename_ivs_stmt,
5165 remove_cond_exprs): Rewritten.
5166 (move_phi_nodes): New.
5167 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
5168 (translate_clast): Pass in ivstack. Rewrite some cases.
5169 (set_cloog_options, debug_clast_stmt): New.
5170 (find_transform): Use set_cloog_options.
5171 (outermost_loop_layer): Removed.
5172 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
5173 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
5174 mark_old_loops, remove_dead_loops): New.
5175 (gloog): Rewritten.
5176 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
5177 (const_column_index, get_first_matching_sign_row_index,
5178 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
5179 get_upper_bound): New.
5180 (graphite_trans_bb_strip_mine): Also update the iv map.
5181
5182 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
5183 (struct name_tree): Add a loop field.
5184 (struct scop): Add a graphite_loops_mapping field.
5185 (SCOP_LOOPS_MAPPING): New.
5186 (debug_clast_stmt): Declare.
5187 * lambda.h (find_induction_var_from_exit_cond): Declare.
5188 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
5189 * cfgloop.h (update_dominators_in_loop): Removed declaration.
5190 (create_empty_loop_on_edge): Updated.
5191 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
5192 rename_variables_in_bb): Declare.
5193 * tree-cfg.c (remove_bb): Extern.
5194
5195 * testsuite/gcc.dg/graphite/block-0.c: New.
5196
5197 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
5198 Sebastian Pop <sebastian.pop@amd.com>
5199
5200 * graphite.c (strip_mine_profitable_p): New.
5201 (graphite_trans_bb_block): Disable strip mining if not profitable.
5202
5203 * testsuite/gcc.dg/graphite/scop-18.c: New.
5204 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
5205 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
5206
5207 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
5208 Jan Sjodin <jan.sjodin@amd.com>
5209 Sebastian Pop <sebastian.pop@amd.com>
5210
5211 * graphite.c (is_interchange_valid): New.
5212 (graphite_trans_bb_block): Check loop nest of basic block for legality
5213 of interchange.
5214
5215 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
5216 outer_most_loop, gbb_outer_most_loop_index): New.
5217
5218 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
5219 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
5220 * testsuite/gcc.dg/graphite/scop-16.c: New.
5221 * testsuite/gcc.dg/graphite/scop-17.c: New.
5222
5223 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5224
5225 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
5226 (graphite_trans_scop_block): Ignore SCoPs without bbs.
5227
5228 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
5229
5230 * graphite.c (new_scop): Initialize SCOP_EXIT.
5231 (scopdet_info): Add.
5232 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
5233 (build_scops_1): Cleanup, bugfixes.
5234 (build_scops): Cleanup.
5235
5236 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
5237 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
5238
5239 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5240
5241 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
5242
5243 * testsuite/gfortran.dg/graphite/graphite.exp: Use
5244 DEFAULT_GRAPHITE_FLAGS.
5245
5246 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
5247
5248 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5249
5250 * graphite.c (scan_tree_for_params): Do not assert any more if
5251 MULT_EXPR parameter is negative.
5252
5253 * testsuite/gfortran.dg/graphite/scop-1.f: New.
5254
5255 * testsuite/gfortran.dg/graphite/graphite.exp: New.
5256
5257 * testsuite/gcc.dg/graphite/scop-15.c: New.
5258
5259 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
5260
5261 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
5262
5263 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5264
5265 * graphite.c (graphite_trans_bb_swap_loops): Rename from
5266 graphite_swap_loops.
5267 (graphite_trans_bb_move_loop): New.
5268 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
5269 (graphite_trans_bb_block): New.
5270 (graphite_trans_loop_block): New.
5271 (graphite_trans_scop_swap_1and2): Rename from
5272 graphite_trans_swap_1and2.
5273 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
5274 (graphite_trans_scop_block): New.
5275 (graphite_apply_transformations): Rename from
5276 graphite_transformations.
5277
5278 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
5279
5280 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
5281
5282 * graphite.c (gbb_compare): New.
5283 (graphite_sort_gbbs): New.
5284 (gbb_can_be_ignored): New.
5285 (scop_remove_ignoreable_gbbs): New.
5286 (graphite_transformations): Cleanup and add
5287 scop_remove_ignoreable_gbbs.
5288 * lambda.h (lambda_vector_compare): New.
5289
5290 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
5291
5292 * graphite.c (print_graphite_bb): Correct printing of static schedule.
5293 (graphite_swap_loops): int -> unsigned
5294 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
5295 (graphite_transformations): New.
5296 (graphite_transform_loops): Move to graphite_transformations.
5297 * graphite.h (gbb_nb_loops): Return unsigned.
5298
5299 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
5300
5301 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
5302 the domain matrix. This makes scop-0.c work again.
5303
5304 2008-06-20 Richard Guenther <rguenther@suse.de>
5305
5306 * graphite.h: Adjust copyright to GPLv3.
5307 * graphite.c: Likewise.
5308 (stmt_simple_memref_for_scop_p): Split out from ...
5309 (stmt_simple_for_scop_p): ... here. Fix handling of calls
5310 and simplify.
5311 (get_bb_type): Optimize.
5312 (is_pred): Remove.
5313 (is_bb_addable): Fix memleak, replace is_pred call with
5314 single_pred.
5315 (build_scops): Use current_loops.
5316 (param_index): Fix memleak.
5317
5318 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5319
5320 * graphite.c: Fix formatting.
5321
5322 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5323
5324 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
5325 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
5326 (create_var_name, save_var_name): Newly defined functions.
5327 (initialize_cloog_names): Part of the code factored out to
5328 save_var_name.
5329 (clast_to_gcc_expression): Now handles the case of clast_red_sum
5330 in clast_reduction statement.
5331 (graphite_create_new_loop): Now takes a new parameter
5332 for outer_loop.
5333 (translate_clast): Now also takes the context_loop and bb_exit
5334 parameters. Rewritten the code so that it creates a gimple code
5335 inside the given context.
5336 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
5337 remove_cond_expr, disconnect_cond_expr,
5338 disconnect_virtual_phi_nodes): Newly defined functions.
5339 * graphite.h (struct scop): added old_ivs vector.
5340 SCOP_OLDIVS: New macro.
5341
5342 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
5343
5344 * cfgloopmanip.c: Add missing function comments, fix formatting.
5345
5346 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5347
5348 * cfgloopmanip.c (update_dominators_in_loop): Defined.
5349 (create_empty_loop_on_edge): Defined.
5350 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
5351 instead of void.
5352 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
5353 (update_dominators_in_loop): Declared as extern
5354 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
5355
5356 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
5357
5358 * graphite.c (print_graphite_bb): Allow changing number of loops
5359 in SCoP domain.
5360 (initialize_cloog_names): Allow changing number of loops.
5361 (build_cloog_prog): Simplify.
5362 (find_transform): Enable cloog option --strides.
5363 (graphite_swap_loops): New.
5364 (graphite_strip_mine_loop): New.
5365 (graphite_trans_swap_1and2): New.
5366 (graphite_trans_strip): New.
5367 (graphite_transform_loops): Add graphite_trans_strip.
5368 * graphite.h (scop_max_loop_depth): New.
5369
5370 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5371
5372 * graphite.c (build_scop_iteration_domain): Remove forgotten
5373 line. (Fixes compile)
5374
5375 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
5376
5377 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
5378 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
5379 (build_bb_loops): New.
5380 (graphite_transform_loops): Add build_bb_loops.
5381 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
5382 numbers.
5383 * graphite.h (graphite_bb): Add loops.
5384 (gbb_nb_loops): New.
5385 (gbb_loop_at_index): New.
5386 (gbb_loop_index): New.
5387 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
5388 using nb_params_in_scop.
5389
5390 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5391
5392 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
5393 (build_scop_canonical_schedules): Build minimized schedule.
5394 (schedule_to_scattering): Adapt to minimized schedule.
5395 * graphite.h (graphite_bb): Add/Update descriptions.
5396
5397 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
5398 Tobias Grosser <grosser@fim.uni-passau.de>
5399
5400 * graphite.c (print_graphite_bb): Add condition printing.
5401 (dump_value): New.
5402 (dump_gbb_conditions): New.
5403 (build_scop_conditions_1): New.
5404 (build_scop_conditions): New.
5405 * graphite.h (graphite_bb): Add conditions.
5406
5407 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
5408
5409 * graphite.c (print_graphite_bb):
5410 (free_graphite_bb): New.
5411 (free_scop): Free bbs.
5412 (get_bb_type): Free doms.
5413 (build_scop_context): Free context matrix.
5414 (build_loop_iteration_domains): Remove unused code.
5415 (build_cloog_prog): Free scattering function and blocklist.
5416 (find_transform): Free options.
5417
5418 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
5419
5420 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
5421 Remove unnecessery cloog data structures. Make a copy of the domain
5422 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
5423 unnecessary cloog data structures. Fix memory leaks. Remove insert
5424 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
5425 used.
5426 (build_scop_iteration_domain): Remove unnecessary cloog
5427 data structures. Fix memory leaks.
5428 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
5429 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
5430
5431 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5432
5433 * graphite.c (find_scop_params): Remove initialize_cloog_names.
5434
5435 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5436
5437 * graphite.c (end_scop): Style fix.
5438 (schedule_to_scattering): Style and comment fix.
5439
5440 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5441 * graphite.c (print_graphite_bb): Fix definiton of
5442 schedule_to_scattering.
5443 (initialize_cloog_names): Change nb_scattdims to max loop
5444 depth in SCoP.
5445 (schedule_to_scattering): Take parameter for number of scattering
5446 dimensions.
5447 (build_cloog_prog): Only build as much scattering dimensions as
5448 necessary.
5449
5450 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
5451
5452 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5453 in polyhedron/aermod.f90.
5454
5455 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
5456 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5457 Harsha Jagasia <harsha.jagasia@amd.com>
5458
5459 * graphite.c (is_bb_addable): Fix segfault.
5460
5461 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
5462
5463 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5464 with multiple exits and conditional handling in edge cases.
5465 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5466
5467 * testsuite/gcc.dg/graphite/scop-14.c: New.
5468
5469 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
5470 Adrien Eliche <aeliche@isty.uvsq.fr>
5471
5472 * graphite.c (is_bb_addable): Add more comments and enhance
5473 readablity of the source code. Fix memory leak.
5474 (is_loop_exit): Fix memory leak.
5475
5476 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5477
5478 * graphite.c (first_loop_in_scop): Deleted.
5479 (setup_cloog_loop): Only walk the loop chain for inner loops.
5480 (build_scop_iteration_domain): Execute setup_cloog_loop for
5481 all loops in the first layer.
5482
5483 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
5484
5485 * graphite.c (scan_tree_for_params): Change the way params are
5486 added to be indepenent of the number of loops.
5487 (setup_cloog_loop): Revert to short matrix format. Fix parameter
5488 handling.
5489 (build_cloog_prog): Revert to short matrix format.
5490
5491 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5492 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5493
5494 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5495 warning.
5496
5497 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
5498
5499 * graphite.c (nb_data_refs_in_scop): New.
5500 (graphite_transform_loops): Print more stats: number of
5501 loops, basic blocks and data references per scop.
5502
5503 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5504 Jan Sjodin <jan.sjodin@amd.com>
5505
5506 * graphite.c (loop_affine_expr, idx_record_params,
5507 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5508 instead of instantiate_parameters.
5509
5510 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5511
5512 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5513 add support for parameters, add STATIC_SCHEDULE at the right places,
5514 cleanup.
5515
5516 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5517
5518 * graphite.c (build_scop_loop_nests): Only add the loops, that
5519 are contained completely in the SCoP.
5520 (build_cloog_prog): Disable scattering, until schedule_to_scattering
5521 and the domains are fixed.
5522 (build_scop_canonical_schedules): Add support for bbs not contained
5523 in any SCoP.
5524
5525 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
5526
5527 * graphite.h (scop_contains_loop): Update comments to match
5528 the actual behavior.
5529 (scop_contains_loop): New.
5530 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5531
5532 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5533
5534 * graphite.c (get_bb_type): On function body, i.e. loop_0,
5535 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5536 as GBB_COND_HEADER.
5537
5538 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
5539 Tobias Grosser <grosser@fim.uni-passau.de>
5540
5541 * graphite.c (graphite_transform_loops): Early return when
5542 there are no loops in the function.
5543
5544 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5545 Jan Sjodin <jan.sjodin@amd.com>
5546
5547 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5548 offset of the last loop.
5549 (setup_cloog_loop): Copy the entire outer constraint matrix.
5550
5551 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5552 Jan Sjodin <jan.sjodin@amd.com>
5553
5554 * graphite.c (stmt_in_scop_p, function_parameter_p,
5555 invariant_in_scop_p): Removed.
5556 (scan_tree_for_params): Can be used with no constraint
5557 matrix for gathering parameters.
5558 (idx_record_params): Don't use idx_record_param, instead use
5559 scan_tree_for_params.
5560 (find_scop_parameters): Same.
5561 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5562 Fix the size of loop domains.
5563 (schedule_to_scattering): Exit when the outer loop is not in scop.
5564 (find_transform): Enable build_cloog_prog.
5565
5566 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5567 Jan Sjodin <jan.sjodin@amd.com>
5568
5569 * graphite.c (schedule_to_scattering): Make scattering domains
5570 uniformly of the same size, as required by CLooG 0.14.0 and before.
5571
5572 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
5573 Jan Sjodin <jan.sjodin@amd.com>
5574
5575 * graphite.c (schedule_to_scattering): Rewrite, correct the
5576 translation of the scheduling function to scattering.
5577 (build_cloog_prog): Call schedule_to_scattering only once.
5578 * graphite.h (scop_loop_index): Do not fail for loops not
5579 in the scop: return -1.
5580
5581 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5582
5583 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5584 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5585 (setup_cloog_loop): Export GBB_DOMAIN.
5586 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5587 able to rebuild the original control flow.
5588 * graphite.h (graphite_bb): Add domain field and access macro.
5589 (GBB_DOMAIN): New.
5590
5591 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5592
5593 * graphite.c (debug_gbb): New.
5594 (print_scop, build_graphite_bb): Use SCOP_BBS.
5595 (build_scop_bbs): Reimplemented.
5596 (dfs_bb_in_scop_p): Removed.
5597 (build_scop_loop_nests): Reorder loops inserted in
5598 SCOP_LOOP_NEST: outer loops should come first.
5599 (build_scop_canonical_schedules): Reinitialize at zero
5600 the components of the SCOP_STATIC_SCHEDULE for the loops
5601 that have already been parsed.
5602
5603 * graphite.h (debug_gbb): Declared.
5604
5605 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5606 Jan Sjodin <jan.sjodin@amd.com>
5607
5608 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5609 (graphite_loop_to_gcc_loop): Removed.
5610 (remove_all_edges): New.
5611 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5612 (gloog): Remove useless code.
5613
5614 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5615
5616 * graphite.c (get_bb_type): Reworked. We distinguish between
5617 loops with one or multiple exits.
5618 (is_loop_exit): New.
5619 (is_pred): New.
5620 (is_bb_addable): Rework condition handling, now support for case
5621 case statements and loops with multiple exits.
5622
5623 * testsuite/gcc.dg/graphite/scop-11.c: New.
5624 * testsuite/gcc.dg/graphite/scop-12.c: New.
5625 * testsuite/gcc.dg/graphite/scop-13.c: New.
5626
5627 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5628
5629 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5630 we have too many colors.
5631
5632 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5633
5634 * doc/invoke.texi (-ftree-loop-fusion): Document.
5635 * tree-pass.h (pass_loop_fusion): Declared.
5636 * tree-loop-fusion.c: New.
5637 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5638 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5639 * tree-data-ref.h (find_data_references_in_loop): Declared.
5640 * common.opt (ftree-loop-fusion): Declared.
5641 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5642
5643 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5644
5645 * graphite.c (build_access_matrix): Fix typo from the merge.
5646
5647 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5648
5649 * Merge from mainline (130800:135673).
5650
5651 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5652
5653 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5654 Update dominators after splitting.
5655
5656 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5657
5658 * graphite.c (is_bb_addable): Return the harmful statement.
5659 Factor up some code.
5660 (end_scop): New. Splits end of scope bbs on a harmful statement.
5661 (build_scops_1): Call end_scop.
5662
5663 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5664
5665 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5666 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5667 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5668 build_scops_1): Removed.
5669 (build_scops_2): Renamed build_scops_1.
5670
5671 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5672
5673 * graphite.c: Fix formatting.
5674
5675 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5676
5677 * graphite.c (get_bb_type): New.
5678 (move_scops): New.
5679 (build_scops_2): New.
5680 (is_bb_addable): New.
5681 (build_scops): Switch the scop detection.
5682 (build_scop_bbs): Add entry bb to scop.
5683 * graphite.h (struct scop): Update comment.
5684
5685 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5686
5687 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5688 more colors.
5689
5690 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5691
5692 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5693 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5694 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5695 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5696 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5697
5698 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5699
5700 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5701 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5702 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5703 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5704 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5705
5706 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5707
5708 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5709 Check affine expressions depending on the outermost loop
5710 instead of a scop.
5711 (stmt_simple_for_scop_p): Same.
5712 (harmfule_stmt_in_scop): Same.
5713
5714 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5715
5716 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5717 mark entry and exit, that are not part of the SCoP and update HTML
5718 formatting.
5719
5720 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5721
5722 * graphite.c (basic_block_simple_for_scop_p): Renamed
5723 harmful_stmt_in_bb.
5724 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5725 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5726 (all_preds_visited_p, all_succs_visited_p,
5727 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5728 scop_end_loop): New.
5729 (build_scops): Do not use dfs_enumerate_from.
5730
5731 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5732
5733 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5734
5735 * graphite.c: Add comments to functions that are missing a
5736 description.
5737 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5738
5739 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5740
5741 * graphite.c (nb_params_in_scop): Moved...
5742 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5743 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5744 (clast_to_gcc_expression): Reduce column size to less than 80.
5745 (graphite_create_iv): Return the new name of the IV.
5746 (find_transform): Set options->esp and options->cpp.
5747 (gloog): Comment out the invalidation of the old loop code.
5748 (initialize_dependence_polyhedron): Replace scop_nb_params with
5749 nb_params_in_scop.
5750
5751 * graphite.h (nb_params_in_scop): ... here.
5752 (scop_nb_params): Removed.
5753 (loop_domain_dim): Return something even when the loop was not
5754 found in the hash table: avoid ICEing on all the graphite.exp
5755 testcases.
5756
5757 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5758
5759 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5760
5761 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5762 according to nesting level.
5763 (find_scop_parameters): Call instantiate_parameters.
5764 (scan_tree_for_params): Extend it to handle general affine bounds.
5765 Inner loop bound can depend on outer loop induction variable.
5766 (setup_cloog_loop): tmp variable is allocated on stack. Call
5767 instantiate_parameters with respect to outermost_loop_in_scop.
5768 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5769 graphite.h.
5770 (create_empty_loop): Function loopify should be given edge
5771 probability, instead of edge frequency. Dominance relation from
5772 switch_bb to loop_header.
5773 (clast_to_gcc_expression): Added handling of clast_reduction node.
5774 (gloog): New functionality for removing old loop.
5775 (test_dependence): Factored out from build_rdg_all_levels.
5776 (build_rdg_all_levels): Dependence testing factored out to
5777 test_dependence function.
5778
5779 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5780 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5781 from graphite.c
5782
5783 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5784
5785 * graphite.c (free_scop, param_index, initialize_cloog_names,
5786 nb_params_in_scop): Use name_tree map instead of just a tree
5787 for keeping track of the variable name associated to that tree.
5788 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5789 clast_to_gcc_expression, graphite_create_iv,
5790 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5791 graphite_stmt_to_gcc_stmt): New.
5792 (gloog): Call these.
5793 * graphite.h (struct name_tree): New.
5794 (struct scop): Use name_tree instead of tree for params.
5795 Store a vector of name_tree for new_ivs.
5796 (SCOP_NEWIVS): New.
5797 (scop_nb_params): Use name_tree instead of tree.
5798
5799 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5800 Sebastian Pop <sebastian.pop@amd.com>
5801
5802 * tree-bounds.c: New.
5803 * tree-bounds.h: New.
5804 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5805 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5806 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5807 flag_mudflap.
5808 * gcc.c: Same.
5809 * toplev.c: Same.
5810 * c-cppbuiltin.c: Same.
5811 * c-pragma.c: Same.
5812 * common.opt: Same.
5813 * varasm.c: Same.
5814 * tree-outof-ssa.c: Same.
5815 * c-common.c: Same.
5816 * Makefile.in: Same.
5817
5818 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5819 Sebastian Pop <sebastian.pop@amd.com>
5820
5821 * tree-loop-distribution.c (remaining_stmts,
5822 upstream_mem_writes): Removed static variables.
5823 (copy_loop_before, create_bb_after_loop,
5824 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5825 rdg_build_components, rdg_build_partitions,
5826 dump_rdg_partitions): Extern.
5827 (generate_loops_for_partition, generate_code_for_partition): Do not
5828 return a bool.
5829 (already_processed_vertex_p, predecessor_has_mem_write,
5830 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5831 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5832 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5833 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5834 Pass remaining_stmts and upstream_mem_writes as parameters.
5835 (rdg_component): Moved...
5836 (build_rdg_partition_for_component): Do not aggregate components when
5837 flag_streamize_loops is set.
5838 (gen_sequential_loops): New.
5839 (ldist_gen): Call gen_sequential_loops.
5840
5841 * tree-pass.h (pass_loop_streamization): Declared.
5842
5843 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5844 basic blocks when loops structures exist.
5845
5846 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5847
5848 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5849
5850 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5851 eliminate_local_variables_stmt, eliminate_local_variables,
5852 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5853 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5854 of code delimited by two edges in the CFG.
5855 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5856 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5857 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5858 the case of parallelisation of reductions.
5859 (create_loop_fn): Extern.
5860 (create_omp_parallel_region): New.
5861
5862 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5863 dump_data_reference for printing dra and drb.
5864 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5865 RDGE_RELATION.
5866 (build_rdg): Don't call free_dependence_relations for the moment, as
5867 we attach dependence relations on each edge of the RDG.
5868 To be fixed later.
5869
5870 * tree-data-ref.h (rdg_component): ...here.
5871 (struct rdg_edge): New field ddr_p relation.
5872 (RDGE_RELATION): New.
5873 (create_bb_after_loop, copy_loop_before,
5874 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5875 rdg_build_partitions, dump_rdg_partitions,
5876 free_rdg_components): Declared.
5877
5878 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5879 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5880
5881 * tree-loop-streamization.c: New.
5882
5883 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5884 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5885
5886 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5887
5888 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5889
5890 * passes.c: Schedule pass_loop_streamization.
5891
5892 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5893
5894 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5895 update comment.
5896
5897 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5898
5899 * graphite.c (dot_all_scops): Update formatting.
5900 Bbs can now be part of more than one SCoP.
5901
5902 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5903
5904 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5905 malloc problems.
5906 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5907 * graphite.h (loop_to_cloog_loop): New.
5908
5909 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5910
5911 * graphite.c (loop_domain_dim, ref_nb_loops,
5912 loop_iteration_vector_dim): New.
5913 (build_access_matrix_with_af, build_access_matrix,
5914 initialize_dependence_polyhedron): Fixed for new matrix layout.
5915 No longer assume that all iteration domains are of the same
5916 dimensionality.
5917
5918 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5919
5920 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5921 defined in a loop at depth 0 is invariant.
5922 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5923 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5924 be called at loop depth 0.
5925
5926 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5927 a parameter.
5928 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5929 (down_open_scop): Removed.
5930 (loop_in_scop_p): Redefined.
5931 (scop_affine_expr): New argument: scop.
5932 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5933 a harmful statement ending a scop.
5934 (basic_block_simple_for_scop_p): New argument: scop.
5935 (get_loop_start): Removed.
5936 (new_scop): Initialize SCOP_LOOPS.
5937 (free_scop): Free SCOP_LOOPS.
5938 (succs_at_same_depth, preds_at_same_depth): New.
5939 (end_scop): Test the validity of a scop.
5940 (add_dominators_to_open_scops): New.
5941 (test_for_scop_bound): Call add_dominators_to_open_scops.
5942 Add cases for opening and closing multiple scops.
5943 (build_scops, build_scop_bbs): Iterate over basic blocks in
5944 depth first order.
5945 (build_graphite_bb): Pass scop directly.
5946 (dfs_bb_in_scop_p): New.
5947 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5948 several times.
5949 (nb_loops_around_gb): Use loop_in_scop_p.
5950 (schedule_to_scattering): Disabled for the moment the code computing
5951 the "textual order for outer loop".
5952
5953 * graphite.h (struct scop): New field loops.
5954 (SCOP_LOOPS): New.
5955 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5956
5957 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5958
5959 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5960 Sebastian Pop <sebastian.pop@amd.com>
5961
5962 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5963 * common.opt (fstreamize-loops): New.
5964 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5965 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5966 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5967 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5968
5969 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5970
5971 * tree-data-ref.c (build_empty_rdg): New.
5972 (build_rdg): Use it.
5973 * tree-data-ref.h (build_empty_rdg): Declared.
5974 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5975 (find_vertex_for_stmt): Removed.
5976 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5977
5978 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5979
5980 * tree-loop-distribution.c (generate_builtin): After cancelling the
5981 loop tree, also delete basic blocks.
5982 (rdg_flag_uses): Stop recursion when a vertex has already been
5983 processed.
5984
5985 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5986
5987 * graphite.c (build_scop_alpha): Removed.
5988 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5989 and dump_dependence_graph to avoid compiler warnings.
5990
5991 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5992
5993 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5994 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5995 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5996 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5997 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5998 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5999 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6000 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
6001 dump_dependence_graph): New.
6002 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
6003 (GBB_ALPHA): New.
6004 (struct scop): New field loop2cloog_loop.
6005 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
6006 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
6007
6008 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6009
6010 * graphite.c (build_graphite_bb): Fix initialization
6011 of the graphite basic block.
6012
6013 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
6014
6015 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
6016 loop domain matrix. Pass in the number of loops contained in the
6017 constraint matrix.
6018 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
6019 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
6020 loops that are not surrounding the current loop are not represented
6021 in the domain constraint matrix.
6022 (build_scop_iteration_domain): Initial domain constraint matrix
6023 contains only the eq/ineq, cst, and scop parameters columns.
6024
6025 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6026
6027 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
6028 (print_graphite_bb): Print scattering.
6029
6030 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6031
6032 * graphite.c (initialize_cloog_names): Initialize names of
6033 scattering variables.
6034
6035 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6036
6037 * graphite.c (dot_all_scops_1): Disable debug output while
6038 printing graph.
6039
6040 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
6041
6042 * graphite.c (find_transform): Change cloog output language to C.
6043
6044 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
6045
6046 * tree-loop-distribution.c (generate_memset_zero,
6047 generate_builtin, generate_code_for_partition,
6048 rdg_flag_all_uses): New.
6049 (rdg_flag_uses): Gather in the same partition the statements defining
6050 the VUSES of the current statement.
6051 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
6052 Gather in the same partition not only the stores to the same memory
6053 access, but also the reads.
6054 (ldist_generate_loops): Renamed ldist_gen.
6055
6056 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
6057 Tobias Grosser <grosser@fmi.uni-passau.de>
6058
6059 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
6060 next pointer, don't use the inner pointer.
6061
6062 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
6063
6064 * graphite.c (dot_all_scops, dot_all_scops_1): New.
6065 (find_transform): Call dot_all_1.
6066 * graphite.h (dot_all_scops): Declared.
6067
6068 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
6069
6070 * tree-loop-distribution.c: Fix apsi.f ICE.
6071 (create_bb_after_loop): New.
6072 (generate_loops_for_partition): Use it.
6073 * testsuite/gfortran.dg/ldist-1.f90: New.
6074
6075 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
6076 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
6077
6078 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6079
6080 * graphite.c (find_transform): Dump cloog program sent to cloog.
6081
6082 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6083
6084 * graphite.c (initialize_cloog_names): Initialize cloog
6085 iterator names.
6086
6087 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
6088
6089 * graphite.c (build_scop_context): Fix typo, for the matrix
6090 format: insert '0 >= 0' instead of '-1 >= 0'.
6091
6092 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6093
6094 * Fix merge problems.
6095
6096 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
6097
6098 * graphite.c (setup_cloog_loop): Fix typo.
6099
6100 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6101
6102 * doc/invoke.texi (-ftree-loop-distribution): Documented.
6103 * tree-loop-distribution.c: Reimplemented.
6104 * tree-pass.h (pass_loop_distribution): New.
6105 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
6106 print_loops.
6107 * graphds.h (struct graph): New field indexes.
6108 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6109
6110 * tree-vect-analyze.c: Remove declaration of static functions when not
6111 needed.
6112 * tree-vectorizer.c: Same.
6113 (rename_variables_in_loop): Now extern.
6114 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
6115 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
6116 calling redirect_edge_and_branch_force.
6117
6118 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
6119
6120 * tree-data-ref.c: Don't include tree-chrec.h.
6121 (debug_data_dependence_relations): New.
6122 (dump_data_dependence_relation): Call dump_data_reference on data refs
6123 in the relation.
6124 (same_access_functions): Moved...
6125 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
6126 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6127 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
6128 struct rdg_vertex_info, ): New.
6129 (create_rdg_edge_for_ddr): Compute the dependence level before looking
6130 at DDR_REVERSED_P.
6131 (create_rdg_vertices): Initialize the htab of graph->indexes.
6132 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
6133 (stmts_from_loop): Don't save LABEL_EXPR.
6134 (hash_stmt_vertex_info, eq_stmt_vertex_info,
6135 hash_stmt_vertex_del): New.
6136 (build_rdg): Initialize rdg->indexes.
6137 (free_rdg, stores_from_loop, ref_base_address,
6138 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
6139 have_similar_memory_accesses_1, ref_base_address_1,
6140 remove_similar_memory_refs): New.
6141
6142 * tree-data-ref.h: Include tree-chrec.h.
6143 (debug_data_dependence_relations): Declared.
6144 (same_access_functions): ...here. Now static inline.
6145 (ddr_is_anti_dependent, ddrs_have_anti_deps,
6146 ddr_dependence_level): New.
6147 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
6148 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
6149 RDG_MEM_READS_STMT): New.
6150 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
6151 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
6152 rdg_vertex_for_stmt): Declared.
6153 (struct rdg_edge): New field level.
6154 (RDGE_LEVEL, free_rdg): New.
6155 (stores_from_loop, remove_similar_memory_refs,
6156 rdg_defs_used_in_other_loops_p,
6157 have_similar_memory_accesses): Declared.
6158 (rdg_has_similar_memory_accesses): New.
6159
6160 * lambda.h (dependence_level): New.
6161 * common.opt (ftree-loop-distribution): New.
6162 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
6163 (print_loop_ir): Renamed print_loops.
6164 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
6165 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
6166 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
6167 (tree-loop-distribution.o): Added.
6168 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
6169 (mark_virtual_ops_in_bb): New.
6170 (print_loops_bb, debug_loop_num, debug_loop): New.
6171 * passes.c: Scheduled pass_loop_distribution.
6172
6173 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6174
6175 * graphite.c (scan_tree_for_params): Correct the number of columns
6176 for polylib format.
6177 (nb_flat_iterator): New.
6178 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
6179 (build_scop_iteration_domain): Correct the number of columns for
6180 polylib format.
6181
6182 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
6183
6184 * Merge from mainline (129697:130800).
6185
6186 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
6187
6188 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
6189 dominated by SCoP's exit.
6190 (graphite_transform_loops): Compute post dominators.
6191
6192 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6193
6194 * Merge from mainline (127169:129697).
6195
6196 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
6197
6198 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
6199 parameter for the basic block that contains the expression. Use
6200 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
6201 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
6202 the expression.
6203 * graphite.h (gbb_loop): New.
6204 (GBB_LOOP): Removed.
6205
6206 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6207
6208 * Makefile.in: Fix merge problem.
6209
6210 2007-08-03 Sebastian Pop <sebpop@gmail.com>
6211
6212 * Merge from mainline (125309:127169).
6213 * tree-loop-distribution.c: Disabled.
6214
6215 2007-06-05 Sebastian Pop <sebpop@gmail.com>
6216
6217 * Merge from mainline (r123693:125309).
6218
6219 2007-05-30 Sebastian Pop <sebpop@gmail.com>
6220
6221 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
6222 correct_modify_p
6223 (correct_modify_p, check_statements, number_of_lvalue_uses,
6224 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
6225 instead of MODIFY_EXPR.
6226 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
6227 and push new edges.
6228
6229 2007-05-24 Sebastian Pop <sebpop@gmail.com>
6230
6231 * tree-loop-distribution.c (struct rdg): Replace arrays by
6232 VECs for edges and vertices.
6233 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
6234 (RDGV_NB_PARTITIONS): New.
6235 (PRDG_NBV, PRDG_NBE): Removed.
6236 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
6237 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
6238 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
6239
6240 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
6241 Sebastian Pop <sebpop@gmail.com>
6242
6243 * doc/invoke.texi (-ftree-loop-distribution): Document.
6244 * tree-loop-distribution.c: New file.
6245 * tree-pass.h (pass_loop_distribution): Declared.
6246 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
6247 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
6248 and set reversed_p.
6249 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
6250 (DDR_REVERSED_P): New.
6251 * common.opt (-ftree-loop-distribution): New.
6252 * tree-flow.h (distribute_loops): Declared.
6253 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
6254 * passes.c (init_optimization_passes): Schedule loop distribution.
6255
6256 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
6257
6258 * graphite.c (print_graphite_bb): Don't call dump_data_references.
6259 (print_scop): Don't print when scop is NULL.
6260 (build_scop_context, find_transform): Don't output to stderr.
6261
6262 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
6263
6264 * tree-data-ref.c: Don't include graphite.h.
6265 Comment out the code for printing data reference's scop.
6266 (build_access_matrix_with_af): Moved...
6267 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
6268 * graphite.c (build_access_matrix_with_af): ... here. Now static.
6269 (print_graphite_bb): Print basic block's schedule.
6270 (print_scop): Don't print the schedule, call cloog's pretty printer.
6271 (bb_in_scop_p): A basic block is in a scop only if it is both
6272 dominated and postdominated by the scop's entry and exit basic blocks.
6273 (function_parameter_p): New.
6274 (invariant_in_scop_p): Use function_parameter_p.
6275 (new_scop, save_scop): New.
6276 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
6277 save_scop.
6278 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
6279 (loop_in_scop_p): New.
6280 (scop_record_loop): Use loop_in_scop_p.
6281 (build_scop_domain): Renamed build_scop_iteration_domain.
6282 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
6283 nb_params_in_scop, build_scop_context, first_loop_in_scop,
6284 setup_cloog_loop, dot_scop_1, dot_scop): New.
6285 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
6286 (struct scop): Add a pointer to cloog's representation of a program.
6287
6288 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6289
6290 * doc/invoke.texi (-ftree-check-verbose): Renamed
6291 -ftree-checks-verbose.
6292 * common.opt (flag_tree_check_verbose): Renamed
6293 flag_tree_checks_verbose.
6294 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
6295
6296 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
6297
6298 * configure: Regenerated.
6299 * config.in: Regenerated.
6300 * tree-ssa-loop.c (graphite_transforms): Execute
6301 graphite_transform_loops only when HAVE_cloog.
6302 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
6303 * graphite.c: Include polylibgmp.h and cloog.h.
6304 (graphite_transform_loops): Removed loops parameter.
6305 * tree-flow.h (graphite_transform_loops): Update declaration.
6306 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
6307 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
6308 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
6309 (OBJS-common): Remove dependence on graphite.o.
6310 (BACKEND): Depend on @GRAPHITE@.
6311
6312 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
6313
6314 * doc/invoke.texi (-ftree-check-verbose): Documented.
6315 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
6316 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
6317 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
6318 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
6319 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
6320 * testsuite/gcc.dg/tree-checker/condates.crp: New.
6321 * common.opt (ftree-checks-verbose): New.
6322 * tree-check.c (tree_check_warning): Move extra stderr output
6323 under control of flag_tree_check_verbose.
6324
6325 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
6326
6327 * tree-match.c: Fix comments formatting.
6328 * tree-match.h: Fix comments formatting.
6329 * tree-check.c: Fix comments formatting.
6330 (tree_check_init): Restructure.
6331
6332 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
6333
6334 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
6335
6336 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
6337
6338 * Merge from mainline (r120733:123693).
6339
6340 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
6341
6342 * condate.y: New file.
6343 * tree-match.h (struct patt_info_s): New field sign.
6344 (struct condate_s): New field msg.
6345 (normalize_condate, name_condate, add_condate): New.
6346 (conds[], condate_parse): Made extern.
6347 * tree-check.c (tree_check_warning): First arg changed to cond;
6348 warning reformatted.
6349 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
6350 (tree_scan): New.
6351 (tree_check): Process trivial condates.
6352 (read_delimited_string): Removed.
6353 (print_cond): Print name and msg.
6354 (conds[]): Made extern.
6355 (parse_tree_check_file_once): Rewritten to use the parser in
6356 condate.y.
6357 Processing of option --tree_check_string moved to tree_scan().
6358 * Makefile.in: Added condate.y
6359
6360 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
6361
6362 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
6363 Use VECs instead of varrays.
6364 * diagnostic.h (lazy_dump_generic_node): Update declaration.
6365 * Makefile.in (pretty-print.o): Depend on vec.h.
6366 * pretty-print.c: Include tree.h and vec.h.
6367 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
6368 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
6369 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
6370 pp_free_list): Use VECs instead of varrays.
6371 * pretty-print.h: Do not include varray.h.
6372 (struct tree_chunk_s): Declaration moved before its use.
6373 (output_buffer): Rename varray field to chunks.
6374 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
6375 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
6376 save_global_holes): Use VECs instead of varrays.
6377 * tree-match.h: Declare VECs of cfg_node, and hole_p.
6378 * tree-check.c (scan_cfg_stmts, push_node,
6379 print_matching_stmt): Removed.
6380 (tree_check_instance, push_global_holes_if_new, tree_check,
6381 execute_tree_check): Use VECs instead of varrays.
6382 (gate_tree_check): Don't execute the CFG check when basic_block_info
6383 is not available.
6384
6385 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6386
6387 * Merge from mainline (r115016:120733).
6388
6389 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6390
6391 * Merge from mainline (r117632:117661).
6392
6393 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
6394
6395 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
6396 * tree-pass.h (TDF_DEBUG, debug_p): New.
6397 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
6398 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
6399 get_loop_exit_condition, analyze_evolution_in_loop,
6400 analyze_initial_condition, analyze_scalar_evolution,
6401 instantiate_parameters, number_of_latch_executions): Use debug_p.
6402 * tree-chrec.c (chrec_apply): Use debug_p.
6403 * tree-data-ref.c: Include graphite.h.
6404 (dump_data_reference): Print also the access matrix.
6405 (analyze_array, analyze_indirect_ref, init_data_ref,
6406 analyze_offset_expr, address_analysis, object_analysis,
6407 create_data_ref, finalize_ddr_dependent,
6408 non_affine_dependence_relation, analyze_ziv_subscript,
6409 analyze_siv_subscript_cst_affine,
6410 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
6411 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
6412 analyze_miv_subscript, analyze_overlapping_iterations,
6413 build_classic_dist_vector, subscript_dependence_tester,
6414 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
6415 (build_access_matrix_with_af): No longer static.
6416 * tree-data-ref.h (scop_p): ... declaration here.
6417 (data_reference.scop): New field.
6418 (DR_SCOP, DR_ACCESS_MATRIX): New.
6419 (build_access_matrix_with_af, dr_num_subscripts): Declared.
6420 * graphite.c (print_graphite_bb): Call dump_data_references.
6421 (print_scop): Use scop_nb_loops and scop_dim_domain.
6422 (test_for_scop_bound): Use debug_p.
6423 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
6424 scop_nb_params.
6425 (scop_loop_index): Moved...
6426 (scop_record_loop): New.
6427 (build_scop_loop_nests): Use scop_record_loop.
6428 (build_scop_domain): Use scop_dim_domain.
6429 (build_access_matrix): Implemented.
6430 (build_scop_canonical_schedules): Use scop_nb_loops.
6431 (build_graphite_bb): Initialize GBB_SCOP.
6432 * graphite.h (scop_p): Moved...
6433 (graphite_bb.scop): New field.
6434 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
6435 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6436 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6437 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6438 scop_loop_index): New.
6439 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6440
6441 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
6442
6443 * Merge from mainline (r117661:120450).
6444
6445 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
6446
6447 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6448 at the first declaration outside the varying loop, instantiate as
6449 far as possible.
6450 * tree-chrec.c (for_each_scev_op): New.
6451 * tree-chrec.h (for_each_scev_op): Declared.
6452 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6453 * tree-data-ref.c (get_references_in_stmt,
6454 find_data_references_in_stmt): New, from trunk.
6455 (find_data_references_in_loop): Use get_references_in_stmt
6456 and find_data_references_in_loop, modified as in trunk.
6457 (build_access_matrix_with_af): New.
6458 * tree-data-ref.h (data_reference): Add a field access_matrix.
6459 (data_ref_loc): New, as in trunk.
6460 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6461 invariant_in_scop_p, param_index, scan_tree_for_params,
6462 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6463 idx_record_param, idx_record_params, build_access_matrix,
6464 build_scop_data_accesses, build_scop_canonical_schedules,
6465 build_graphite_bb, build_scop_bbs, find_params_in_bb,
6466 build_scop_params): New.
6467 * graphite.h (graphite_bb): New.
6468 (scop): Add fields static_schedule, params, loop_nest,
6469 iteration_domain.
6470 * lambda.h: Declare vecs of lambda_matrix.
6471 * tree-flow.h (print_loop_ir_bb): Declared.
6472 * tree-cfg.c (print_loop_ir_bb): New.
6473 (print_loop): Use print_loop_ir_bb.
6474
6475 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
6476
6477 * Merge from mainline (r115016:117632).
6478
6479 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
6480
6481 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6482 break due to a warning.
6483
6484 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
6485
6486 * graphite.c (print_scops, debug_scops): New.
6487 (graphite_transform): Renamed graphite_find_transform.
6488 * graphite.h (debug_scops): Declared.
6489
6490 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
6491
6492 * tree-match.c: Reformat following the GNU style.
6493 * tree-match.h: Reformat following the GNU style.
6494 * tree-pattern.h: Removed empty file.
6495 * Makefile.in: Remove references to tree-pattern.h.
6496 * tree-check.c: Reformat following the GNU style.
6497 (execute_tree_check): Move gate condition code to...
6498 (gate_tree_check): ...here. New function.
6499 (pass_check): Use the gate function.
6500
6501 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
6502
6503 * tree-pattern.h: New. Tree pattern matching and checking using
6504 concrete syntax.
6505 * tree-check.c: New. Tree/CFG checking pass.
6506 * tree-match.c: New. Library for tree pattern matching.
6507 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6508 * toplev.c, flags.h: Add globals for tree-check pass.
6509 * Makefile.in: Integrate the files in tree-check pass.
6510 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6511 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6512 Introduce a "lazy" pretty-print mode.
6513 * tree.c, tree.h: Add tree_name.
6514
6515 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
6516
6517 * doc/invoke.texi (-fgraphite): Correct typo.
6518 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6519 use of print_loop_ir.
6520 * testsuite/gcc.dg/graphite/scop-1.c: New.
6521 * testsuite/gcc.dg/graphite/scop-2.c: New.
6522 * testsuite/gcc.dg/graphite/graphite.exp: New.
6523 * graphite.c: Include domwalk.h.
6524 (print_scop): Print only the entry and exit blocks.
6525 (debug_scop): No longer static.
6526 (affine_expr): Fix formating. Return also true when the expression is
6527 constant.
6528 (stmt_simple_for_scop_p): Fix formating.
6529 (build_scops): Use domwalk.
6530 (get_loop_start, end_scop, test_for_scop_bound): New.
6531 (graphite_transform_loops): Avoid printing on stderr.
6532 * graphite.h (debug_scop): Declared.
6533 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6534 * Makefile.in (graphite.o): Depend on domwalk.h.
6535 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6536 declarations for static functions.
6537 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6538 controlling output verbosity.
6539
6540 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
6541 Plesco Alexandru <shurikx@gmail.com>
6542
6543 * doc/invoke.texi (-fgraphite): Document.
6544 * tree-pass.h (pass_graphite_transforms): Declared.
6545 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6546 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6547 (pass_graphite_transforms): Defined.
6548 * tree-data-ref.c (free_data_ref, data_reference): Extern.
6549 * tree-data-ref.h (free_data_ref, data_reference): Declared.
6550 * graphite.c, graphite.h: New.
6551 * common.opt (fgraphite): Declared.
6552 * tree-flow.h (graphite_transform_loops): Declared.
6553 * Makefile.in (OBJS-common): Add graphite.o.
6554 (graphite.o): New rule.
6555 * passes.c (pass_graphite_transforms): Scheduled.
6556