]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
Remove outermost loop parameter.
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
e3135850 12010-08-18 Vladimir Kargov <kargov@gmail.com>
2
3 * graphite-scop-detection.c (graphite_can_represent_scev,
4 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
5 graphite_can_represent_loop): Remove outermost_loop.
6
a4a4b66a 72010-08-17 Sebastian Pop <sebastian.pop@amd.com>
8
9 PR middle-end/45229
10 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
11 handle GIMPLE_CALLs with no LHS.
12
0d5d0b4d 132010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
14 Sebastian Pop <sebastian.pop@amd.com>
15
16 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
17 Call remove-build-file to clean up the generated *.graphite files.
18
192010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
1aefcf09 20
21 * doc/invoke.texi (debugging options): Update documentation.
22 (-floop-interchange): Same.
23 (-flopp-strip-mine): Same.
24 (-floop-block): Same.
25 (-fgraphite-read): Add documentation.
26 (-fgraphite-write): Same.
27
0d5d0b4d 282010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
91a594b4 29
30 * toplev.c (process_options): Disable graphite loop optimization
31 options when -fgraphite-read flag is used.
32
c64f5631 332010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
34
35 * graphite-poly.c (init_graphite_out_file): New.
36 (init_graphite_in_file): New.
37 (apply_poly_transforms): Updated to enable reading and writing of
38 multiple scop files.
39 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
40
629787af 412010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
42
43 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
44 redundant checks.
45
3648398c 462010-08-12 Sebastian Pop <sebastian.pop@amd.com>
47
48 * graphite-clast-to-gimple.c (precision_for_value): Adjust
49 computation of precision by 1.
50
63b03ccf 512010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
52
53 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
54 (openscop_read_polyhedron_matrix): New.
55 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
56 (openscop_read_N_int): Same.
57 * graphite-poly.c (openscop_read_N_int): New.
58 (openscop_read_one_int): New.
59 (openscop_read_N_string): New.
60 (openscop_read_one_string): New.
61 (openscop_read_powerset_matrix): New.
62 (graphite_read_transforms): Remove.
63 (graphite_read_scatt): New.
64 (graphite_read_scop_file): New.
65 (apply_poly_transforms): Updated to call graphite_read_scop_file.
66
f2459691 672010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
68
69 * graphite-poly.c: Change include order.
70
f366948c 712010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
72
73 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
74 (cloog_matrix_nrows): New.
75
086610eb 762010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
77
78 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
79 from matrix lines.
80 * graphite-poly.c (openscop_print_scattering_function_1): Same.
81 (print_scattering_function_1): Same.
82 (openscop_print_pbb_domain): Same.
83 (openscop_print_scop_context): Same.
84 (print_scop_context): Same.
85
c8f5df71 862010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
87
88 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
89 (openscop_print_pdr_polyhedron): Print pph.
90
650f2420 912010-07-29 Sebastian Pop <sebastian.pop@amd.com>
92
93 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
94 * gfortran.dg/graphite/graphite.exp: Same.
95 * gcc.dg/graphite/vect-pr43423.c: New.
96
be90fd3f 972010-07-29 Sebastian Pop <sebastian.pop@amd.com>
98
99 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
100 priority signed types.
101
e84af3c1 1022010-07-29 Sebastian Pop <sebastian.pop@amd.com>
103
104 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
105 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
106
8c4b14b0 1072010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
108
109 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
110 (openscop_print_polyhedron_matrix): New.
111 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
112 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
113 (openscop_print_pdr_powerset): New.
114 (openscop_print_powerset_matrix): New.
115 (openscop_print_scattering_function_1): New.
116 (print_scattering_function): Add support for scattering names and
117 OpenScop format.
118 (graphite_write_transforms): Remove.
119 (apply_poly_transforms): Updated to call print_scop.
120 (print_pdr_access_layout): Updated to support OpenScop format.
121 (print_pdr): Same.
122 (openscop_print_pbb_domain): New.
123 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
124 not provided.
125 (print_pbb): Updated to call the new print_pbb_body.
126 (openscop_print_scop_context): New.
127 (print_scop_header): New.
128 (print_scop): Updated to call print_scop_header.
129 * graphite-poly.h: Document OpenScop format.
130
68a6a8ba 1312010-07-29 Sebastian Pop <sebastian.pop@amd.com>
132
133 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
134 the case removed in the previous patch, when the only phi argument
135 is defined in the same loop as the phi node itself. Handle it
136 separately from the invariant case by both propagating it outside
137 the region and replacing the phi node with an assign.
138
51ec8951 1392010-07-28 Sebastian Pop <sebastian.pop@amd.com>
140
141 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
142 constant phi nodes with one argument are is_gimple_min_invariant
143 and SSA_NAME_IS_DEFAULT_DEF.
144
145 * gfortran.dg/graphite/id-22.f: New.
146
04b8cadb 1472010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
148
f0fc00f2 149 * graphite.c (graphite_initialize): Do not initialize
150 CLooG and initialize the Parma Polyhedra Library
151 manually when using CLOOG_ORG.
152 (graphite_finalize): Do not finalize CLooG and finalize
153 the Parma Polyhedra Library manually when using CLOOG_ORG.
154 * graphite-cloog-compat.h (cloog_initialize): Hide function
155 when using CLOOG_ORG.
156 (cloog_finalize): Same.
157
a2c572ef 1582010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
f0fc00f2 159
04b8cadb 160 * graphite-clast-to-gimple.c (free_scattering): Change
161 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
162 (CLOOG_ORG).
163 (build_cloog_prog): Same.
164 * graphite-cloog-compat.h (cloog_domain): Removed.
165 (cloog_scattering): New.
166 (cloog_set_domain): Removed.
167 (cloog_set_scattering): New.
168 (cloog_next_domain): Removed.
169 (cloog_next_scattering): New.
170 (cloog_set_next_domain): Removed.
171 (cloog_set_next_scattering): New.
172 (CloogScatteringList): New.
173 (CloogScattering): New.
174 (cloog_scattering_free): New.
175 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
176 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
177 New.
178
08a88144 1792010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
180
181 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
182 CloogState.
183 (set_cloog_options): Same.
184 (print_clast_stmt): Same.
185 (scop_to_clast): Same.
186 (print_generated_program): Same.
187 (gloog): Same.
188 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
189 (scop_to_clast): Extend with CloogState.
190 * graphite-cloog-util.c: Include graphite-cloog-compat.h
191 (new_Cloog_Domain_from_ppl_Polyhedron):
192 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
193 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
194 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
195 * graphite-cloog-util.h (build_cloog_prog): Same.
196 * graphite-cloog-copat.h (build_cloog_prog): New.
197 (CloogState): New.
198 (cloog_state_malloc): New.
199 (cloog_state_free): New.
200 (cloog_loop_malloc): New.
201 (cloog_options_malloc): New.
202 (cloog_statement_alloc): New.
203 (cloog_domain_from_cloog_matrix): New.
204 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
205 (new_Cloog_Domain_from_ppl_Polyhedron): New.
206
2e6bc1c7 2072010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
208
209 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
210 type of NAME now depends on used CLooG version.
211 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
212 (gcc_type_for_clast_expr): Same.
213 (print_clast_stmt): Replace pprint with clast_pprint.
214 * graphite-cloog-compat.h: Provide compatibility macros for
215 CLooG Legacy.
216 (clast_name_p): New.
217 (clast_expr_term): New.
218 (clast_expr_red): New.
219 (clast_expr_bin): New.
220 (clast_pprint): New.
221
ebd32a89 2222010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
223
224 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
225 compatible to newer CLooG releases (CLOOG_ORG).
226 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
227 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
228 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
229 (build_cloog_prog) : New.
230 (cloog_program_extract_scalars): New.
231 (cloog_program_scatter): New.
232
1b2c23d4 2332010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
234
235 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
236 conditionally (CLOOG_ORG).
237 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
238 (cloog_statement_usr): New.
239 (cloog_domain): Same.
240 (cloog_set_domain): Same.
241 (cloog_next_domain): Same.
242 (cloog_set_next_domain): Same.
243 (cloog_program_nb_scattdims): Same.
244 (cloog_program_set_nb_scattdims): Same.
245 (cloog_program_names): Same.
246 (cloog_program_set_names): Same.
247 (cloog_program_set_context): Same.
248 (cloog_program_set_loop): Same.
249 (cloog_program_blocklist): Same.
250 (cloog_program_set_blocklist): Same.
251 (cloog_program_scaldims): Same.
252 (cloog_program_set_scaldims): Same.
253 (cloog_names_nb_parameters): Same.
254 (cloog_names_set_nb_parameters): Same.
255 (cloog_names_parameters): Same.
256 (cloog_names_set_parameters): Same.
257 (cloog_names_set_nb_iterators): Same.
258 (cloog_names_set_iterators): Same.
259 (cloog_names_set_nb_scattering): Same.
260 (cloog_names_set_scattering): Same.
261 (cloog_statement_set_usr): Same.
262 (cloog_loop_set_next): Same.
263 (cloog_loop_set_domain): Same.
264 (cloog_loop_set_block): Same.
265 (cloog_block_list_next): Same.
266 (cloog_block_list_set_next):
267 (cloog_block_list_set_block): Same.
268
c9a67530 2692010-07-27 Sebastian Pop <sebastian.pop@amd.com>
270
271 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
272 a bool.
273 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
274 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
275 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
276 when something has been changed.
277 (rewrite_commutative_reductions_out_of_ssa): Same.
278
279 * gcc.dg/graphite/id-26.c: New.
280
ed455480 2812010-07-26 Sebastian Pop <sebastian.pop@amd.com>
282
283 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
284 handle the case when def is in the sese region.
285 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
286 for invariant expressions.
287 (rewrite_cross_bb_phi_deps): Removed.
288 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
289 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
290 rewrite_cross_bb_phi_deps.
291
72085fb7 2922010-07-26 Sebastian Pop <sebastian.pop@amd.com>
293
294 * graphite-sese-to-poly.c
295 (rewrite_commutative_reductions_out_of_ssa_loop): Call
296 scev_analyzable_p only on is_gimple_reg
297
298 * gcc.dg/graphite/id-25.c: New.
299
5d21c24a 3002010-07-22 Sebastian Pop <sebastian.pop@amd.com>
301
302 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
303 (rewrite_close_phi_out_of_ssa): Propagate constant values or
304 parametric expressions outside the scop region.
305 (rewrite_cross_bb_scalar_deps): Same.
306 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
307
308 * gcc.dg/graphite/run-id-5.c: New.
309 * gcc.dg/graphite/run-id-6.c: New.
310 * gfortran.dg/graphite/id-21.f: New.
311
a865acd7 3122010-07-22 Sebastian Pop <sebastian.pop@amd.com>
313
314 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
315 SSA_NAME_DEF_STMT only on SSA_NAMEs.
316
317 * gcc.dg/graphite/id-24.c: New.
318
52f57b4e 3192010-07-22 Sebastian Pop <sebastian.pop@amd.com>
320
321 * tree-scalar-evolution.c (instantiate_scev_name): Do not
322 instantiate default definitions.
323
c07c57fb 3242010-07-20 Vladimir Kargov <kargov@gmail.com>
325
326 * graphite-scop-detection.c (is_valid_stmt_p): New.
327 (is_valid_bb_p): New.
328
259c0e44 3292010-07-20 Vladimir Kargov <kargov@gmail.com>
330 Sebastian Pop <sebastian.pop@amd.com>
331
332 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
333 (loop_exits_from_bb_p): New.
334 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
335 (loop_exits_from_bb_p): Declared.
336 * graphite-scop-detection.c (scopdet_basic_block_info): Call
337 loop_exits_to_bb_p.
338
000edd14 3392010-07-20 Vladimir Kargov <kargov@gmail.com>
340
341 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
342 tree-data-ref.h.
343 (dot_regions_1): New.
344 (dot_regions): New.
345 * refined-regions.h (dot_regions): Declared.
346 * Makefile.in (refined-regions.o): Update dependences.
347
38f26d41 3482010-07-20 Sebastian Pop <sebastian.pop@amd.com>
349
350 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
351 extra parameter for the region. Call scev_analyzable_p.
352 (rewrite_reductions_out_of_ssa): Update call to
353 rewrite_close_phi_out_of_ssa.
354 (rewrite_cross_bb_phi_deps): Same.
355 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
356 parameter for the region. Call scev_analyzable_p.
357 (rewrite_commutative_reductions_out_of_ssa): Update call to
358 rewrite_commutative_reductions_out_of_ssa_loop.
359
e075a7a2 3602010-07-20 Sebastian Pop <sebastian.pop@amd.com>
361
362 * gcc.dg/tree-ssa/pr20742.c: New.
363
39888e8f 3642010-07-15 Sebastian Pop <sebastian.pop@amd.com>
365
366 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
367
368 * gcc.dg/graphite/id-23.c: New.
369
15822b8e 3702010-07-15 Sebastian Pop <sebastian.pop@amd.com>
371
372 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
373 SSA scalar phi nodes that can be scev_analyzable_p.
374
375 * gfortran.dg/graphite/id-20.f: Adjust testcase.
376
49253930 3772010-07-15 Sebastian Pop <sebastian.pop@amd.com>
378
379 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
380 handle SSA_NAME_IS_DEFAULT_DEF.
381
bac2de0b 3822010-07-15 Sebastian Pop <sebastian.pop@amd.com>
383
384 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
385
386 * gcc.dg/graphite/pr42729.c: New.
387
55c89f69 3882010-07-15 Sebastian Pop <sebastian.pop@amd.com>
389
390 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
391 case non close-phi nodes with one argument.
392
32a6e336 3932010-07-15 Sebastian Pop <sebastian.pop@amd.com>
394
395 * sese.h (scev_analyzable_p): Scevs could be expressions without
396 chrecs and still be scev_analyzable_p.
397
a73166c0 3982010-07-15 Sebastian Pop <sebastian.pop@amd.com>
399
400 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
401
18046220 4022010-07-15 Sebastian Pop <sebastian.pop@amd.com>
403
404 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
405 * cfgloop.h (struct loop): Remove single_iv field.
406 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
407 (scop_canonicalize_loops): Removed.
408 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
409 over all the loop phi nodes in loop->header.
410 (build_poly_scop): Remove use of scop_canonicalize_loops.
411
b19b9f62 4122010-07-15 Sebastian Pop <sebastian.pop@amd.com>
413
414 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
415 handle GIMPLE_CALL.
416
9e4cd968 4172010-07-15 Sebastian Pop <sebastian.pop@amd.com>
418
419 * tree-chrec.c (chrec_apply): Should only apply to the specified
420 variable. Also handle multivariate chains of recurrences that
421 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
422
4ed27c8e 4232010-07-15 Sebastian Pop <sebastian.pop@amd.com>
424
425 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
426 (debug_clast_name_indexes_1): Removed.
427 (debug_clast_name_indexes): Removed.
428 (pbb_to_depth_to_oldiv): Removed.
429 (build_iv_mapping): Replace the use of rename_map with iv_map.
430 (translate_clast_user): Remove uses of rename_map. Allocate and
431 free iv_map.
432 (translate_clast_for_loop): Remove uses of rename_map.
433 (translate_clast_for): Same.
434 (translate_clast_guard): Same.
435 (translate_clast): Same.
436 (gloog): Same.
437 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
438 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
439 * sese.c (set_rename): Now static.
440 (rename_variables_in_stmt): Removed.
441 (rename_uses): New.
442 (is_parameter): Removed.
443 (is_iv): Removed.
444 (expand_scalar_variables_call): Removed.
445 (expand_scalar_variables_ssa_name): Removed.
446 (expand_scalar_variables_expr): Removed.
447 (expand_scalar_variables_stmt): Removed.
448 (expand_scalar_variables): Removed.
449 (rename_variables): Removed.
450 (remove_condition): Removed.
451 (get_true_edge_from_guard_bb): Removed.
452 (get_false_edge_from_guard_bb): Removed.
453 (struct igp): Removed.
454 (default_before_guard): Removed.
455 (convert_for_phi_arg): Removed.
456 (add_guard_exit_phis): Removed.
457 (insert_guard_phis): Removed.
458 (graphite_copy_stmts_from_block): Now also uses iv_map and a
459 region. Do not copy conditions. Do not copy induction variables.
460 Call rename_uses.
461 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
462 the translated statement. Use the iv_map for the induction
463 variable renaming.
464 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
465 (set_rename): Removed declaration.
466 (scev_analyzable_p): ...here.
467 * tree-chrec.c (chrec_apply_map): New.
468 * tree-chrec.h (chrec_apply_map): Declared.
469
5b87c555 4702010-07-15 Sebastian Pop <sebastian.pop@amd.com>
471
472 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
473 insert_loop_close_phis.
474 * sese.c (name_defined_in_loop_p): Removed.
475 (expr_defined_in_loop_p): Removed.
476 (alive_after_loop): Removed.
477 (close_phi_not_yet_inserted_p): Removed.
478 (struct alep): Removed.
479 (add_loop_exit_phis): Removed.
480 (insert_loop_close_phis): Removed.
481
2c4340a8 4822010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
483
5b87c555 484 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
485 condition.
486 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
2c4340a8 487
38df5b0a 4882010-07-07 Sebastian Pop <sebastian.pop@amd.com>
489
490 * gfortran.dg/graphite/id-20.f: New.
491
e0e27d35 4922010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
493
494 * graphite-cloog-util.h: Added cloog.h.
495 * graphite-blocking.c: Removed cloog.h.
496 * graphite-dependences.c: Same.
497 * graphite-interchange.c: Same.
498 * graphite-poly.c: Same.
499 * graphite-ppl.c: Same.
500 * graphite-scop-detection.c: Same.
501 * graphite-sese-to-poly.c:
502 Removed cloog.h.
503 Removed graphite-clast-to-gimple.h.
504 (check_poly_representation): Removed (unused).
505 * graphite-sese-to-poly.h
506 (check_poly_representation): Removed (unused).
507
30185452 5082010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
509
510 * Makefile.in
511 (OBJS-common): Added graphite-cloog-util.o.
512 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
513 (graphite-cloog-util.o): New.
514 (graphite-ppl.o): Added graphite-cloog-util.h.
515 * graphite-clast-to-gimple.c:
516 Added graphite-cloog-util.h to include statements.
517 * graphite-cloog-util.c: New.
518 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
519 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
520 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
521 (new_C_Polyhedron_from_Cloog_Matrix): Same.
522 (ppl_Constrain_System_number_of_constraints): Same.
523 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
524 (oppose_constraint): Same.
525 (cloog_matrix_to_ppl_constraint): Same.
526 (new_Constraint_System_from_Cloog_Matrix): Same.
527 (insert_constraint_into_matrix): Same. Declared static.
528 * graphite-cloog-util.h: New.
529 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
530 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
531 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
532 (new_C_Polyhedron_from_Cloog_Matrix): Same.
533 (insert_constraint_into_matrix): Same.
534 * graphite-ppl.c:
535 Added graphite-cloog-util.h to include statements.
536 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
537 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
538 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
539 (new_C_Polyhedron_from_Cloog_Matrix): Same.
540 (insert_constraint_into_matrix): Same.
541 (ppl_Constrain_System_number_of_constraints): Same.
542 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
543 (oppose_constraint): Same.
544 (cloog_matrix_to_ppl_constraint): Same.
545 (new_Constraint_System_from_Cloog_Matrix): Same.
546 * graphite-ppl.h:
547 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
548 graphite-cloog-util.h.
549 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
550 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
551 (new_C_Polyhedron_from_Cloog_Matrix): Same.
552 (insert_constraint_into_matrix): Removed.
553
6955599b 5542010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
555
556 * graphite-clast-to-gimple.c
557 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
558 (precision_for_interval): Same.
559 (gcc_type_for_interval): Same.
560 (compute_type_for_level): Same.
561 * graphite-interchange.c
562 (lst_interchange_profitable_p): Same.
563 * graphite-poly.c
564 (psct_scattering_dim_for_loop_depth): Same.
565 * graphite-ppl.c
566 (ppl_max_for_le_pointset): Same.
567 (ppl_min_for_le_pointset): Same.
568
6fba926c 5692010-06-25 Vladimir Kargov <kargov@gmail.com>
570
571 * refined-regions.c (bb_index_compare): New.
572 (get_bbs_in_region): New.
573 (print_bbs_in_region): New.
574 (print_refined_region): Add an argument that allows to print
575 all basic blocks contained in regions.
576 (debug_refined_region): Update call to print_refined_region.
577 * refined-regions.h (print_refined_region): Update declaration.
578 (get_bbs_in_region): Declared.
579 * graphite-scop-detection.c (build_scops_new): Print the refined
580 region tree into the Grahite dump file.
581
b8046a12 5822010-06-24 Sebastian Pop <sebastian.pop@amd.com>
583
584 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
585 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
586
dd966e1f 5872010-06-24 Sebastian Pop <sebastian.pop@amd.com>
588
589 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
590 rewrite_close_phi_out_of_ssa.
591
592 * gcc.dg/graphite/id-22.c: New.
593
0569d480 5942010-06-24 Sebastian Pop <sebastian.pop@amd.com>
595
596 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
597
97142493 5982010-06-24 Sebastian Pop <sebastian.pop@amd.com>
599
600 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
601 rename_map.
602 * sese.c (debug_rename_map): Same.
603 (get_rename): Same.
604 (set_rename): Same.
605 (rename_variables_in_stmt): Same.
606 (expand_scalar_variables_call): Same.
607 (expand_scalar_variables_ssa_name): Same.
608 (expand_scalar_variables_expr): Same.
609 (expand_scalar_variables_stmt): Same.
610 (expand_scalar_variables): Same.
611 (rename_variables): Same.
612 (graphite_copy_stmts_from_block): Same.
613 (copy_bb_and_scalar_dependences): Same.
614
0c663bd0 6152010-06-24 Sebastian Pop <sebastian.pop@amd.com>
616
617 * graphite-clast-to-gimple.c (copy_renames): Removed.
618 (translate_clast_for): Do not call copy_renames.
619 (translate_clast_guard): Same.
620
42ad5d61 6212010-06-23 Sebastian Pop <sebastian.pop@amd.com>
622
623 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
624 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
625 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
626 before rewrite_cross_bb_scalar_deps.
627
8643dd0a 6282010-06-23 Sebastian Pop <sebastian.pop@amd.com>
629
630 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
631 Early return in when flag_associative_math is not set.
632
9a34ebd6 6332010-06-23 Sebastian Pop <sebastian.pop@amd.com>
634
635 * gcc.dg/graphite/run-id-2.c: Call abort.
636
097e870c 6372010-06-23 Sebastian Pop <sebastian.pop@amd.com>
638
639 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
640 of SSA copies on edges except for loop->latch.
641
bf8b5699 6422010-06-23 Sebastian Pop <sebastian.pop@amd.com>
643
644 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
645 Split out of rewrite_reductions_out_of_ssa.
646 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
647 Declared.
648 * graphite.c (graphite_transform_loops): Call it.
649
e819c864 6502010-06-23 Sebastian Pop <sebastian.pop@amd.com>
651
652 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
653
b90bb125 6542010-06-15 Sebastian Pop <sebastian.pop@amd.com>
655
656 * passes.c (init_optimization_passes): Add pass_graphite.
657 Schedule a pass_copy_prop before pass_graphite_transforms.
658 * timevar.def (TV_GRAPHITE): Declared.
659 * tree-pass.h (pass_graphite): Declared.
660 * tree-ssa-loop.c (pass_graphite): New.
661
662 * gcc.dg/graphite/id-20.c: New.
663
93206bb0 6642010-06-12 Sebastian Pop <sebastian.pop@amd.com>
665
666 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
667 Remove calls to rename_nb_iterations and rename_sese_parameters.
668 * graphite-clast-to-gimple.h (gloog): Update declaration.
669 * graphite.c (graphite_transform_loops): Update call to gloog.
670 * sese.c (rename_variables_in_expr): Removed.
671 (rename_nb_iterations): Removed.
672 (rename_sese_parameters): Removed.
673 * sese.h (rename_nb_iterations): Removed.
674 (rename_sese_parameters): Removed.
675
88a551f1 6762010-06-12 Sebastian Pop <sebastian.pop@amd.com>
677
678 * graphite-clast-to-gimple.c (gloog): Remove call to
679 sese_adjust_liveout_phis.
680 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
681 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
682 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
683 rewrite_phi_out_of_ssa.
684 * sese.c (get_vdef_before_sese): Removed.
685 (sese_adjust_vphi): Removed.
686 (sese_adjust_liveout_phis): Removed.
687 * sese.h (sese_adjust_liveout_phis): Removed.
688
39a34dd8 6892010-06-12 Sebastian Pop <sebastian.pop@amd.com>
690
691 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
692 argument for the place after which to insert the out of SSA copy.
693 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
694 (rewrite_phi_out_of_ssa): Same.
695 (rewrite_cross_bb_scalar_deps): Same.
696 (insert_copyout): Removed.
697 (insert_copyin): Removed.
698 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
699 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
700 insert_copyin.
701
5d2603f9 7022010-06-12 Sebastian Pop <sebastian.pop@amd.com>
703
704 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
705 (rewrite_reductions_out_of_ssa): Same.
706 (rewrite_commutative_reductions_out_of_ssa): Same.
707 (build_poly_scop): Do not call these functions.
708 * graphite-sese-to-poly.h (build_poly_scop): Declared.
709 (rewrite_reductions_out_of_ssa): Declared.
710 (rewrite_commutative_reductions_out_of_ssa): Declared.
711 * graphite.c (graphite_transform_loops): Call on every scop
712 rewrite_commutative_reductions_out_of_ssa before calling
713 rewrite_reductions_out_of_ssa and build_scop_bbs.
714
189cea68 7152010-06-12 Sebastian Pop <sebastian.pop@amd.com>
716
717 * graphite-dependences.c (dot_deps): Make system call to dotty run
718 in background.
719 (dot_deps_stmt): Same.
720 * graphite-poly.c (dot_lst): Same.
721
1861e127 7222010-06-11 Sebastian Pop <sebastian.pop@amd.com>
723
724 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
725 old_type in parameter.
726 (gcc_type_for_value): Update call to gcc_type_for_interval.
727 (compute_type_for_level_1): Renamed compute_type_for_level.
728 Update call to gcc_type_for_interval.
729
f6a2a688 7302010-06-09 Sebastian Pop <sebastian.pop@amd.com>
731
732 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
733 the scev analysis when the variable is not used outside the loop
734 in a close phi node: call compute_overall_effect_of_inner_loop.
735
3662a419 7362010-06-09 Sebastian Pop <sebastian.pop@amd.com>
737
738 * graphite-sese-to-poly.c (single_pred_cond): Renamed
739 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
740 (build_sese_conditions_before): Renamed call to single_pred_cond.
741 (build_sese_conditions_after): Same.
742
a344bb22 7432010-06-09 Sebastian Pop <sebastian.pop@amd.com>
744
745 * graphite-poly.h: Fix comments and indentation.
746 * graphite-sese-to-poly.c: Same.
747 (build_sese_conditions_before): Compute stmt and gbb only when needed.
748 * tree-chrec.c: Fix comments and indentation.
749 (tree-ssa-loop-niter.c): Same.
750
9ac63ea9 7512010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
752
753 * refined-regions.c (create_region): Only initialize the region.
754 (find_regions_with_entry): Initialize parent relation and bbmap
755 correctly.
756 (build_regions_tree): Set outermost_region to region instead of
757 topmost_region.
758 (calculate_region_tree): Remove unneeded parameters.
759
441c9c1d 7602010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
761
762 * graphite-scop-detection.c (is_scop_p): New.
763 (build_scops_new): New. A skeleton for the new scop detection.
764 (build_scops_old): Renamed from build_scops.
765 (build_scops): New version. Call the new and the old scop
766 detection.
767
93bdb320 7682010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
769 Antoniu Pop <antoniu.pop@gmail.com>
770
771 * Makefile.in (OBJS-common): Add refined-regions.o.
772 (refined-regions.o): New.
773 (graphite-scop-detection.o): Use refined-regions.h.
774 * graphite-scop-detection.c: Include refined-regions.h
775 (build_scops): Also build the refined region tree.
776 * refined-regions.c: New. Adds an algorithm to detect refined
777 regions.
778 (print_refined_region): New.
779 (debug_refined_region): New.
780 (refined_region_contains_bb_p): New.
781 (refined_region_contains_region_p): New.
782 (is_common_df): New.
783 (struct find_regions_global_data): New.
784 (is_region): New.
785 (typedef struct bb_bb_def): New.
786 (new_bb_bb_def): New.
787 (bb_bb_map_hash): New.
788 (eq_bb_bb_map): New.
789 (find_new_bb): New.
790 (bb_reg_def): New.
791 (new_bb_reg_def): New.
792 (bb_reg_map_hash): New.
793 (eq_bb_reg_map): New.
794 (find_new_region): New.
795 (insert_new_reg): New.
796 (insert_new_bb): New.
797 (insert_shortcut): New.
798 (get_next_postdom): New.
799 (create_region): New.
800 (find_regions_with_entry): New.
801 (find_regions_adc): New.
802 (find_regions): New.
803 (get_topmost_parent): New.
804 (build_regions_tree): New.
805 (calculate_region_tree): New.
806 (free_region_tree): New.
807 * refined-regions.h: New.
808 (struct refined_region): New.
809 (calculate_region_tree): New.
810 (free_region_tree): New.
811 (refined_region_contains_bb_p): New.
812 (refined_region_contains_region_p): New.
813 (print_refined_region): New.
814 (debug_refined_region): New.
815
78b58940 8162010-05-26 Sebastian Pop <sebastian.pop@amd.com>
817
818 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
819 size_one_node.
820
9acb79e3 8212010-05-07 Sebastian Pop <sebastian.pop@amd.com>
822
823 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
824 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
825
9d828157 8262010-05-07 Sebastian Pop <sebastian.pop@amd.com>
827
828 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
829 phi_arg_in_outermost_loop.
830 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
831 (remove_invariant_phi): Same.
832
0ef84e3b 8332010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
834
835 * graphite-blocking.c
836 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
837 * graphite-clast-to-gimple.c
838 (clast_to_gcc_expression): Same.
839 (precision_for_value): Same.
840 (precision_for_interval): Same.
841 (gcc_type_for_interval): Same.
842 (graphite_create_new_guard): Same.
843 (compute_bounds_for_level): Same.
844 (graphite_create_new_loop_guard): Same.
845 * graphite-interchange.c
846 (build_linearized_memory_access): Same.
847 (pdr_stride_in_loop): Same.
848 (memory_strides_in_loop_1): Same.
849 (memory_strides_in_loop): Same.
850 (extend_scattering): Same.
851 (psct_scattering_dim_for_loop_depth): Same.
852 (pbb_number_of_iterations): Same.
853 * graphite-poly.h
854 (debug_iteration_domains): Same.
855 * graphite-ppl.c
856 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
857 (ppl_set_inhomogeneous_gmp): Same.
858 (ppl_strip_loop): Same.
859 (ppl_lexico_compare_linear_expressions): Same.
860 (ppl_read_polyhedron_matrix): Same.
861 (ppl_max_for_le_pointset): Same.
862 * graphite-ppl.h
863 (ppl_read_polyhedron_matrix): Same.
864 (tree_int_to_gmp): Same.
865 (gmp_cst_to_tree): Same.
866 (ppl_set_inhomogeneous): Same.
867 (ppl_set_inhomogeneous_tree): Same.
868 (ppl_set_coef): Same.
869 (ppl_set_coef_tree): Same.
870 * graphite-sese-to-poly.c
871 (build_pbb_scattering_polyhedrons): Same.
872 (build_scop_scattering): Same.
873 (scan_tree_for_params_right_scev): Same.
874 (scan_tree_for_params): Same.
875 (find_params_in_bb): Same.
876 (find_scop_parameters): Same.
877 (add_upper_bounds_from_estimated_nit): Same.
878 (build_loop_iteration_domains): Same.
879 (add_condition_to_domain): Same.
880 (pdr_add_memory_accesses): Same.
881
2d6fe479 8822010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
883
a2c572ef 884 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
2d6fe479 885 CLooG's value_* macros to their respective mpz_* counterparts.
886 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
887 (graphite_create_new_loop_guard): Same.
888 * graphite-interchange.c (build_linearized_memory_access): Same.
889 (pdr_stride_in_loop): Same.
890 (memory_strides_in_loop_1): Same.
891 (1st_interchange_profitable_p): Same.
892 * graphite-poly.c (extend_scattering): Same.
893 (psct_scattering_dim_for_loop_depth): Same.
894 (pbb_number_of_iterations): Same.
895 (pbb_number_of_iterations_at_time): Same.
896 * graphite-poly.h (new_1st_loop): Same.
897 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
898 (oppose_constraint): Same.
899 (insert_constraint_into_matrix): Same.
900 (ppl_set_inhomogeneous_gmp): Same.
901 (ppl_set_coef_gmp): Same.
902 (ppl_strip_loop): Same.
903 (ppl_lexico_compare_linear_expressions): Same.
904 (ppl_max_for_le_pointset): Same.
905 (ppl_min_for_le_pointset): Same.
906 (ppl_build_realtion): Same.
907 * graphite-ppl.h (gmp_cst_to_tree): Same.
908 (ppl_set_inhomogeneous): Same.
909 (ppl_set_inhomogeneous_tree): Same.
910 (ppl_set_coef): Same.
911 (ppl_set_coef_tree): Same.
912 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
913 (build_scop_scattering): Same.
914 (add_value_to_dim): Same.
915 (scan_tree_for_params_right_scev): Same.
916 (scan_tree_for_params_int): Same.
917 (scan_tree_for_params): Same.
918 (find_params_in_bb): Same.
919 (find_scop_parameters): Same.
920 (add_upper_bounds_from_estimated_nit): Same.
921 (build_loop_iteration_domains): Same.
922 (create_linear_expr_from_tree): Same.
923 (add_condition_to_domain): Same.
924 (pdr_add_memory_accesses): Same.
925
7c0d15dc 9262010-04-05 Sebastian Pop <sebastian.pop@amd.com>
927
928 PR middle-end/43519
929 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
930 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
931 When converting an unsigned type to signed, double its precision.
932 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
933 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
934 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
935
9362010-04-05 Sebastian Pop <sebastian.pop@amd.com>
937
938 PR middle-end/43519
939 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
940 build_nonstandard_integer_type.
941 (gcc_type_for_interval): Same.
942
9432010-04-05 Sebastian Pop <sebastian.pop@amd.com>
7778680e 944
945 PR middle-end/43519
946 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
947 POINTER_PLUS_EXPR for pointer types.
948
949 * gcc.dg/graphite/id-19.c: New.
950
f20b6ea9 9512010-04-04 Sebastian Pop <sebastian.pop@amd.com>
952
953 PR middle-end/43519
954 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
955 * graphite-clast-to-gimple.c: Include langhooks.h.
956 (max_signed_precision_type): New.
957 (max_precision_type): Takes two types as arguments.
958 (precision_for_value): New.
959 (precision_for_interval): New.
960 (gcc_type_for_interval): New.
961 (gcc_type_for_value): New.
962 (gcc_type_for_clast_term): New.
963 (gcc_type_for_clast_red): New.
964 (gcc_type_for_clast_bin): New.
965 (gcc_type_for_clast_expr): Split up into several functions.
966 (gcc_type_for_clast_eq): Rewritten.
967 (compute_bounds_for_level): New.
968 (compute_type_for_level_1): New.
969 (compute_type_for_level): New.
970 (gcc_type_for_cloog_iv): Removed.
971 (gcc_type_for_iv_of_clast_loop): Rewritten.
972 (graphite_create_new_loop): Compute the lower and upper bound types
973 with gcc_type_for_clast_expr.
974 (graphite_create_new_loop_guard): Same.
975 (find_cloog_iv_in_expr): Removed.
976 (compute_cloog_iv_types_1): Removed.
977 (compute_cloog_iv_types): Removed.
978 (gloog): Do not call compute_cloog_iv_types.
979 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
980 GBB_CLOOG_IV_TYPES.
981 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
982 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
983 (GBB_CLOOG_IV_TYPES): Removed.
984
985 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
986
03ce78db 9872010-04-02 Sebastian Pop <sebastian.pop@amd.com>
988
989 Reverted this commit: as at this point the loop closed SSA form
990 is under a canonical form respecting the single argument condition.
991 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
992 close phi nodes may have more than one argument.
993
9942010-04-01 Sebastian Pop <sebastian.pop@amd.com>
995
996 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
997 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
998 (detect_commutative_reduction): Same.
999
10002010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1001
1002 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1003 close phi nodes may have more than one argument.
1004
67e28d17 10052010-03-30 Richard Guenther <rguenther@suse.de>
1006 Zdenek Dvorak <ook@ucw.cz>
1007 Sebastian Pop <sebastian.pop@amd.com>
1008
1009 PR middle-end/43464
1010 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1011 with multiple arguments.
1012 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1013
ff4c7a5a 10142010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1015
1016 * graphite-dependences.c (print_pddr): Call print_pdr with an
1017 extra argument.
1018 * graphite-poly.c (debug_pdr): Add an extra argument for the
1019 verbosity level.
1020 (print_pdr): Same.
1021 (print_pbb_domain): Same.
1022 (print_pbb): Same.
1023 (print_scop_context): Same.
1024 (print_scop): Same.
1025 (print_cloog): Same.
1026 (debug_pbb_domain): Same.
1027 (debug_pbb): Same.
1028 (print_pdrs): Same.
1029 (debug_pdrs): Same.
1030 (debug_scop_context): Same.
1031 (debug_scop): Same.
1032 (debug_cloog): Same.
1033 (print_scop_params): Same.
1034 (debug_scop_params): Same.
1035 (print_iteration_domain): Same.
1036 (print_iteration_domains): Same.
1037 (debug_iteration_domain): Same.
1038 (debug_iteration_domains): Same.
1039 (print_scattering_function): Same.
1040 (print_scattering_functions): Same.
1041 (debug_scattering_function): Same.
1042 (debug_scattering_functions): Same.
1043 * graphite-poly.h (debug_pdr): Update declaration.
1044 (print_pdr): Same.
1045 (print_pbb_domain): Same.
1046 (print_pbb): Same.
1047 (print_scop_context): Same.
1048 (print_scop): Same.
1049 (print_cloog): Same.
1050 (debug_pbb_domain): Same.
1051 (debug_pbb): Same.
1052 (print_pdrs): Same.
1053 (debug_pdrs): Same.
1054 (debug_scop_context): Same.
1055 (debug_scop): Same.
1056 (debug_cloog): Same.
1057 (print_scop_params): Same.
1058 (debug_scop_params): Same.
1059 (print_iteration_domain): Same.
1060 (print_iteration_domains): Same.
1061 (debug_iteration_domain): Same.
1062 (debug_iteration_domains): Same.
1063 (print_scattering_function): Same.
1064 (print_scattering_functions): Same.
1065 (debug_scattering_function): Same.
1066 (debug_scattering_functions): Same.
1067
1f8d6d4d 10682010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1069
1070 * graphite-poly.c (print_scattering_function_1): New.
1071 (print_scattering_function): Call it.
1072 (print_scop_params): Remove spaces at the end of lines.
1073 (print_cloog): New.
1074 (debug_cloog): New.
1075 * graphite-poly.h (print_cloog): Declared.
1076 (debug_cloog): Declared.
1077
4de8824d 10782010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1079
1080 * tree-ssa-copy.c: Revert this previous change:
1081 (init_copy_prop): Loop closed phi nodes cancontain more than one
1082 argument.
1083 (execute_copy_prop): Revert the previous change: do not call
1084 rewrite_into_loop_closed_ssa.
1085
10862010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1087 Richard Guenther <rguenther@suse.de>
1088
1089 PR middle-end/43464
1090 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1091 contain more than one argument.
1092 (execute_copy_prop): Revert the previous change: do not call
1093 rewrite_into_loop_closed_ssa.
1094
1095 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1096 * gcc.dg/graphite/id-pr43464-1.c: New.
1097
10982010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1099
1100 PR middle-end/43464
1101 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1102 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1103
1104 * gcc.dg/graphite/id-pr43464.c: New.
1105
0207206d 11062010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1107
1108 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1109 in loop->header.
1110 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1111 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1112 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1113 to switch between adding the IV bump in loop->latch or in loop->header.
1114
a751953f 11152010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1116
1117 * passes.c (init_optimization_passes): Add pass_copy_prop
1118 after Graphite.
1119
5dc5fe13 11202010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1121
1122 * graphite-poly.c (print_scattering_function): Pretty print following
1123 the scoplib format.
1124 (print_pdr): Same.
1125 (print_pbb_domain): Same.
1126 (dump_gbb_cases): Same.
1127 (dump_gbb_conditions): Same.
1128 (print_pdrs): Same.
1129 (print_pbb): Same.
1130 (print_scop_params): Same.
1131 (print_scop_context): Same.
1132 (print_scop): Same.
1133 (print_pbb_body): New.
1134 (lst_indent_to): New.
1135 (print_lst): Start new lines with a #.
1136 * graphite-poly.h (pbb_bb): New.
1137 (pbb_index): Use pbb_bb.
1138 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1139 disjuncts.
1140 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1141
9251755b 11422010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1143
1144 PR middle-end/43351
1145 * gcc.dg/graphite/id-pr43351.c
1146
5a644317 11472010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1148
1149 PR middle-end/43354
1150 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1151 call insert_out_of_ssa_copy for default definitions.
1152 * gfortran.dg/graphite/id-pr43354.f: New.
1153
11542010-03-13 Sebastian Pop <sebastian.pop@amd.com>
197de505 1155
1156 PR middle-end/43349
1157 * gfortran.dg/graphite/pr43349.f: New.
1158
119adb56 11592010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1160
1161 * graphite-clast-to-gimple.c (my_long_long): Defined.
1162 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1163 * graphite-sese-to-poly.c (my_long_long): Defined.
1164 (scop_ivs_can_be_represented): Use it.
1165
578e3456 11662010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1167
1168 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1169 graphite-max-bbs-per-function, and loop-block-tile-size.
1170 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1171 with "maximum".
1172 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1173
5d92ac74 11742010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1175
1176 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1177 forward declaration.
1178 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1179 (add_upper_bounds_from_estimated_nit): New.
1180 (build_loop_iteration_domains): Use it.
1181
89466e43 11822010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1183
1184 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1185
c4ccbe87 11862010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1187
1188 PR middle-end/43306
1189 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1190 should be an INTEGER_CST. Also handle CASE_CONVERT.
1191 * gcc.dg/graphite/pr43306.c: New.
1192
94ba21de 11932010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1194
1195 * graphite.c (graphite_initialize): To bound the number of bbs per
1196 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1197 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1198 * doc/invoke.texi: Document it.
1199
f49215ce 12002010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1201
1202 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1203 * graphite-sese-to-poly.h (build_poly_scop): Same.
1204
c2e502a5 12052010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1206
1207 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1208 the number of parameters in the scop. Use as an upper bound
1209 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1210 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1211 * doc/invoke.texi: Document it.
1212
8424df5f 12132010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1214
1215 * graphite-sese-to-poly.c (add_param_constraints): Use
1216 lower_bound_in_type and upper_bound_in_type.
1217
d6ad5c2f 12182010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1219
1220 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1221 instead of unsigned_type_node.
1222
88a62e9b 12232010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1224 Reza Yazdani <reza.yazdani@amd.com>
1225
1226 PR middle-end/43065
1227 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1228 on pointer type parameters.
1229
1230 * gcc.dg/graphite/run-id-4.c: New.
1231
12322010-03-05 Sebastian Pop <sebastian.pop@amd.com>
bc1b5a1d 1233
1234 PR middle-end/43065
1235 * gcc.dg/graphite/run-id-3.c: New.
1236
f6fb4255 12372010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1238 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1239
1240 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1241 handle conversions from pointer to integers.
1242 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1243 induction variable, to be able to work with code generated by CLooG.
1244 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1245 (build_poly_scop): Bail out if we cannot codegen a loop.
1246
2d0a2aaa 12472010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1248
1249 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1250 code generation with gloog_error.
1251
2996b712 12522010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1253
1254 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1255 Call fold_convert on all the returned values.
1256 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1257 the type of the resulting expression.
1258
c817e987 12592010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1260
1261 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1262 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1263 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1264
5f2e51eb 12652010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1266
1267 * graphite-dependences.c (map_into_dep_poly): Removed.
1268 (dependence_polyhedron_1): Use combine_context_id_scat.
1269
7453bc3b 12702010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1271
1272 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1273 (struct poly_bb): Same.
1274 (combine_context_id_scat): New.
1275
13dca219 12762010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1277
1278 PR middle-end/42326
1279 * sese.c (name_defined_in_loop_p): Return false for default
1280 definitions.
1281
1282 * gcc.dg/graphite/pr42326.c: New.
1283
fc830e2d 12842010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1285
1286 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1287 and clean up the logic.
1288
bde82a01 12892010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1290
1291 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1292 early return.
1293
bbf92068 12942010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1295
1296 PR middle-end/43083
1297 * graphite-scop-detection.c (create_single_exit_edge): Move
1298 the call to find_single_exit_edge to....
1299 (create_sese_edges): ...here. Don't handle multiple edges
1300 exiting the function.
1301 (build_graphite_scops): Don't handle multiple edges
1302 exiting the function.
1303
1304 * gcc.dg/graphite/pr43083.c: New.
1305
27f9c4ff 13062010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1307
66bb96d4 1308 PR middle-end/43097
27f9c4ff 1309 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1310 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1311
1312 * gfortran.dg/graphite/pr43097.f: New.
1313
c3eecfcf 13142010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1315 Manuel López-Ibáñez <manu@gcc.gnu.org>
1316
1317 PR middle-end/43140
1318 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1319
13202010-02-22 Sebastian Pop <sebastian.pop@amd.com>
550c39c3 1321
1322 PR middle-end/43026
1323 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1324
1325 * g++.dg/graphite/pr43026.C: New.
1326
3dc0020f 13272010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1328
1329 * Merge from mainline (154736:156693).
1330
5b3c8b56 13312010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1332
1333 PR middle-end/43012
1334 * gcc.dg/graphite/pr43012.c: New.
65084500 1335
5b3c8b56 13362010-02-10 Sebastian Pop <sebastian.pop@amd.com>
65084500 1337
5b3c8b56 1338 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
65084500 13392010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1340
1341 * g++.dg/graphite/pr42930.C: New.
1342
5dcbb45f 13432010-02-10 Sebastian Pop <sebastian.pop@amd.com>
ce0ae3b6 1344
1345 PR middle-end/42930
1346 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1347 graphite_can_represent_init for MULT_EXPR.
1348
5dcbb45f 13492010-02-10 Sebastian Pop <sebastian.pop@amd.com>
eae8f2a1 1350
1351 PR middle-end/42914
1352 PR middle-end/42530
1353 * graphite-sese-to-poly.c (remove_phi): New.
1354 (translate_scalar_reduction_to_array): Call remove_phi.
1355
1356 * gcc.dg/graphite/pr42530.c: New.
1357 * gcc.dg/graphite/pr42914.c: New.
1358
5dcbb45f 13592010-02-10 Sebastian Pop <sebastian.pop@amd.com>
94bdcd77 1360
1361 PR middle-end/42771
1362 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1363 * graphite-clast-to-gimple.h (gloog): Update declaration.
1364 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1365 * graphite-poly.h (struct poly_bb): Add missing comments.
1366 (struct scop): Add poly_scop_p field.
1367 (POLY_SCOP_P): New.
1368 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1369 * graphite.c (graphite_transform_loops): Build the polyhedral
1370 representation for each scop before code generation.
1371 * sese.c (rename_variables_in_operand): Removed.
1372 (rename_variables_in_expr): Return the renamed expression.
1373 (rename_sese_parameters): New.
1374 * sese.h (rename_sese_parameters): Declared.
1375
1376 * gcc.dg/graphite/pr42771.c: New.
1377
9fe3fe75 13782010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1379
1380 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1381 return 0 from main.
1382 * gcc.dg/graphite/block-1.c: Same.
1383 * gcc.dg/graphite/block-3.c: Same.
1384 * gcc.dg/graphite/block-4.c: Same.
1385 * gcc.dg/graphite/block-5.c: Same.
1386 * gcc.dg/graphite/block-6.c: Same.
1387 * gcc.dg/graphite/block-7.c: Same.
1388 * gcc.dg/graphite/interchange-0.c: Same.
1389 * gcc.dg/graphite/interchange-1.c: Same.
1390 * gcc.dg/graphite/interchange-10.c: Same.
1391 * gcc.dg/graphite/interchange-11.c: Same.
1392 * gcc.dg/graphite/interchange-12.c: Same.
1393 * gcc.dg/graphite/interchange-2.c: Same.
1394 * gcc.dg/graphite/interchange-3.c: Same.
1395 * gcc.dg/graphite/interchange-4.c: Same.
1396 * gcc.dg/graphite/interchange-5.c: Same.
1397 * gcc.dg/graphite/interchange-6.c: Same.
1398 * gcc.dg/graphite/interchange-7.c: Same.
1399 * gcc.dg/graphite/interchange-8.c: Same.
1400 * gcc.dg/graphite/interchange-9.c: Same.
1401 * gcc.dg/graphite/interchange-mvt.c: Same.
1402
422538b1 14032010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1404
1405 * gfortran.dg/graphite/id-19.f: New.
1406 * gfortran.dg/graphite/pr14741.f90: New.
1407 * gfortran.dg/graphite/pr41924.f90: New.
1408 * gfortran.dg/graphite/run-id-2.f90: New.
1409
8fe76250 14102010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1411
1412 PR middle-end/42988
1413 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1414 to unknown_dependence.
1415 (graphite_legal_transform_dr): Handle the unknown_dependence.
1416 (graphite_carried_dependence_level_k): Same.
1417
6c9df8cb 14182010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1419
1420 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1421
b7ac929d 14222010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1423 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1424
1425 PR middle-end/42637
1426 * graphite-dependences.c (build_lexicographical_constraint): Return
1427 a union of dependence polyhedra.
1428 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1429
6c9df8cb 1430 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1431 * gcc.dg/graphite/block-4.c: Same.
1432 * gcc.dg/graphite/block-7.c: Same.
1433 * gcc.dg/graphite/interchange-12.c: Same.
1434 * gcc.dg/graphite/interchange-mvt.c: Same.
1435 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1436 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1437 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
b7ac929d 1438
015d0b5c 14392010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1440
6c9df8cb 1441 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
015d0b5c 1442 the execution check to FAIL. This testcase is miscompiled by Graphite
1443 and the check should be re-enabled.
6c9df8cb 1444 * gcc.dg/graphite/interchange-mvt.c: Same.
1445 * gcc.dg/graphite/block-0.c: Same.
1446 * gcc.dg/graphite/block-4.c: Same.
1447 * gcc.dg/graphite/block-7.c: Same.
015d0b5c 1448
a5414f1f 14492010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1450
6c9df8cb 1451 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1452 * gcc.dg/graphite/scop-0.c: Fix spaces.
1453 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1454 * gfortran.dg/graphite/block-2.f: Same.
1455 * gfortran.dg/graphite/block-3.f90: Same.
1456 * gfortran.dg/graphite/block-4.f90: Same.
1457 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1458 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
a5414f1f 1459
a071b80b 14602010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1461
1462 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1463 PDDR_ORIGINAL_SCATTERING_P.
1464 (pddr_is_empty): Rewritten.
1465 (print_dependence_polyhedron_layout): New.
1466 (print_pddr): New.
1467 (debug_pddr): New.
1468 (build_alias_set_powerset): Moved up.
1469 (poly_drs_may_alias_p): Moved up.
1470 (lexicographically_gt_p): Removed.
1471 (build_lexicographically_gt_constraint): Renamed
1472 build_lexicographical_constraint, reimplemented.
1473 (dependence_polyhedron_1): Simplified parameters.
1474 (dependence_polyhedron): Same. Keep along empty PDDRs
1475 to make efficient use of the cache.
1476 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1477 (graphite_legal_transform_dr): Rewritten.
1478 (graphite_legal_transform_bb): Pass fewer arguments to
1479 graphite_legal_transform_dr.
1480 (graphite_carried_dependence_level_k): Simplified implementation.
1481 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1482 (dot_transformed_deps_stmt_1): Same.
1483 (dot_original_deps): Same.
1484 (dot_transformed_deps): Same.
1485 * graphite-dependences.h (struct poly_ddr): Added a new field
1486 original_scattering_p.
1487 (PDDR_ORIGINAL_SCATTERING_P): New.
1488 (print_pddr): Declared.
1489 (debug_pddr): Declared.
1490 * graphite-ppl.c: Clarify comment.
1491 * sese.h (print_gimple_bb): Removed unused declaration.
1492 (debug_gbb): Same.
1493
d0546b2e 14942010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1495
6c9df8cb 1496 * g++.dg/graphite/graphite.exp: Rewritten.
1497 * gcc.dg/graphite/graphite.exp: Rewritten.
1498 * gfortran.dg/graphite/graphite.exp: Rewritten.
1499 * gcc.dg/graphite/block-0.c: Added runtime test.
1500 * gcc.dg/graphite/block-1.c: Same.
1501 * gcc.dg/graphite/block-3.c: Same.
1502 * gcc.dg/graphite/block-4.c: Same.
1503 * gcc.dg/graphite/block-5.c: Same.
1504 * gcc.dg/graphite/block-6.c: Same.
1505 * gcc.dg/graphite/block-7.c: Same.
1506 * gcc.dg/graphite/interchange-0.c: Same.
1507 * gcc.dg/graphite/interchange-1.c: Same.
1508 * gcc.dg/graphite/interchange-10.c: Same.
1509 * gcc.dg/graphite/interchange-11.c: Same.
1510 * gcc.dg/graphite/interchange-12.c: Same.
1511 * gcc.dg/graphite/interchange-2.c: Same.
1512 * gcc.dg/graphite/interchange-3.c: Same.
1513 * gcc.dg/graphite/interchange-4.c: Same.
1514 * gcc.dg/graphite/interchange-5.c: Same.
1515 * gcc.dg/graphite/interchange-6.c: Same.
1516 * gcc.dg/graphite/interchange-7.c: Same.
1517 * gcc.dg/graphite/interchange-8.c: Same.
1518 * gcc.dg/graphite/interchange-9.c: Same.
1519 * gcc.dg/graphite/interchange-mvt.c: Same.
1520 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
d0546b2e 1521
ce363cd5 15222010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1523
1524 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1525 background.
1526
15272010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1528
1529 * common.opt: Add -fgraphite-cloog-opts.
1530 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1531 * opts.c (decode_options): Same.
1532
7bcf2a47 15332010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1534
6c9df8cb 1535 * gcc.dg/graphite/id-17.c: New.
1536 * gcc.dg/graphite/pr41888.c: New.
1537 * gcc.dg/graphite/scop-22.c: New.
1538 * gfortran.dg/graphite/pr40982.f90: New.
7bcf2a47 1539
f21ef1e7 15402010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1541
1542 * graphite-dependences.c: Clarify comments.
1543 (build_pddr): Add an extra parameter direction.
1544 (graphite_legal_transform_dr): Use build_pddr.
1545 (dot_original_deps_stmt_1): Update use of build_pddr.
1546 (dot_transformed_deps_stmt_1): Same.
1547 (dot_original_deps): Same.
1548 (dot_transformed_deps): Same.
1549
6c9df8cb 1550 * gcc.dg/graphite/interchange-12.c: New.
1551 * gcc.dg/graphite/block-7.c: New.
f21ef1e7 1552
4f19d858 15532010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1554
1555 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1556 (pddr_transformed_scattering): Removed.
1557 (graphite_legal_transform_dr): Use build_pddr.
1558 (dot_original_deps_stmt_1): Same.
1559 (dot_transformed_deps_stmt_1): Same.
1560 (dot_original_deps): Same.
1561 (dot_transformed_deps): Same.
1562
4fe30658 15632010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1564
1565 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1566 (build_lexicographically_gt_constraint): Same.
1567 (dependence_polyhedron_1): Same.
1568 (dependence_polyhedron): Same.
1569
abc97125 15702010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1571
1572 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1573 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1574 (lexicographically_gt_p): Change type of direction to int.
1575 (build_lexicographically_gt_constraint): Same.
1576 (dependence_polyhedron_1): Same.
1577 (dependence_polyhedron): Same.
1578 (pddr_original_scattering): Use integers for direction.
1579 (pddr_transformed_scattering): Same.
1580 (graphite_legal_transform_dr): Same.
1581 (graphite_carried_dependence_level_k): Same.
1582
b57cb73e 15832010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1584
1585 * graphite-dependences.c (build_pairwise_constraint): Renamed
1586 ppl_build_relation. Moved...
1587 (dr_equality_constraints): Use ppl_build_relation.
1588 (build_pairwise_scheduling_equality): Same.
1589 (build_pairwise_scheduling_inequality): Same.
1590 * graphite-ppl.c (ppl_build_relation): ...here.
1591 * graphite-ppl.h (ppl_build_relation): Declared.
1592
2487de19 15932010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1594
1595 PR middle-end/42681
1596 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1597 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1598 Set gloog_error when such an expression failed to be built.
1599 (translate_clast): Early return when gloog_error is set.
1600 (gloog): Clear gloog_error. When gloog_error is set, call
1601 set_ifsese_condition to enable the original code. Return the status
1602 of the code generation based on gloog_error.
1603 * sese.c (set_ifsese_condition): New.
1604 * sese.h (set_ifsese_condition): Declared.
1605
6c9df8cb 1606 * g++.dg/graphite/pr42681.C: New.
2487de19 1607
efe339e3 16082010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1609
1610 PR middle-end/42732
1611 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1612 rename_nb_iterations.
1613 * sese.c (rename_variables_in_operand): New.
1614 (rename_variables_in_expr): New.
1615 (rename_nb_iterations): New.
1616 (sese_adjust_liveout_phis): Update the rename_map.
1617 * sese.h (rename_nb_iterations): Declared.
1618 * tree-scalar-evolution.c (scev_reset_htab): New.
1619 (scev_reset): Call scev_reset_htab.
1620 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1621
6c9df8cb 1622 * gfortran.dg/graphite/pr42732.f: New.
efe339e3 1623
a77f6f84 16242010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1625
1626 PR middle-end/42393
1627 * graphite-clast-to-gimple.c: Fix formatting.
1628 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1629 (expr_defined_in_loop_p): New.
1630 (add_loop_exit_phis): Also handle full expressions: remove from
1631 the rename_map the expressions defined in the loop that we're closing.
1632
6c9df8cb 1633 * gfortran.dg/graphite/pr42393-1.f90: New.
1634 * gfortran.dg/graphite/pr42393.f90: Add new flags
a77f6f84 1635 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1636 make this testcase useful in the Graphite branch.
1637
01e31b4b 16382010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1639
1640 * graphite-scop-detection.c (exclude_component_ref): Removed.
1641 (is_simple_operand): Removed.
1642 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1643
2379556f 16442010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1645
1646 PR middle-end/42221
1647 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1648 the array indexing of ADDR_EXPRs.
1649
6c9df8cb 1650 * gcc.dg/graphite/pr42221.c: New.
2379556f 1651
d9458edc 16522010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1653
1654 PR middle-end/42521
1655 * graphite.c (graphite_finalize): Call scev_reset.
1656 (graphite_transform_loops): Do not call scev_reset between the code
1657 generation of scops.
1658
6c9df8cb 1659 * gcc.dg/graphite/pr42521.c: New.
d9458edc 1660
b33d4eb4 16612010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1662
1663 * graphite-interchange.c (memory_stride_in_loop): Renamed
1664 pdr_stride_in_loop.
1665 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1666 (memory_strides_in_loop): Memoize the memory strides per loop.
1667 (lst_interchange_profitable_p): Do not initialize to zero the memory
1668 strides.
1669 * graphite-poly.h (struct lst): Add a field memory_strides.
1670 (LST_LOOP_MEMORY_STRIDES): New.
1671 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1672 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1673
a16e8346 16742010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1675
1676 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1677 memory_strides_in_loop. Gather memory strides on a whole loop.
1678 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1679 (lst_interchange_profitable_p): Removed.
1680 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1681
2edfa860 16822010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1683
1684 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1685 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1686 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1687 Remove context_loop and level.
1688
3f12432d 16892010-01-07 Richard Guenther <rguenther@suse.de>
1690
1691 PR tree-optimization/42641
1692 * sese.c (rename_map_elt_info): Use the SSA name version, do
1693 not hash pointers.
1694
16952010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1696
1697 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1698 blocked" only when both the strip mine and the interchange have
1699 been applied.
1700
6c9df8cb 1701 * gcc.dg/graphite/block-2.c: Removed.
1702 * gcc.dg/graphite/block-3.c: Add scan pattern.
1703 * gcc.dg/graphite/block-4.c: Same.
1704 * gcc.dg/graphite/block-5.c: Same.
1705 * gcc.dg/graphite/block-6.c: Same.
3f12432d 1706
cfd3faac 17072010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1708
1709 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1710 before allocating a new one.
1711 (copy_renames): Check that slot is not NULL.
1712 (mark_bb_with_pbb): Same.
1713 (compute_cloog_iv_types_1): Same.
1714 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1715 nest, and after LSTs.
1716 (lst_try_interchange_loops): Same.
1717
a1a6700b 17182010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1719
1720 PR middle-end/42178
1721 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1722 the before, nest, and after LSTs.
1723 (lst_try_interchange): Removed.
1724 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1725 were modified.
1726 (lst_interchange_select_outer): Apply interchange on the outer loop
1727 until there are no more changes in the inner loops.
1728
7f60ea7e 17292009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1730
1731 Revert patch fixing PR middle-end/42221.
1732
17332009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1734
1735 PR middle-end/42180
1736 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1737 GIMPLE_CALL.
1738
6c9df8cb 1739 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
7f60ea7e 1740
c668dee5 17412009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1742
1743 PR middle-end/42180
1744 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1745 that contain only one statement.
1746
6c9df8cb 1747 * gfortran.dg/graphite/pr42180.f90: New.
7f60ea7e 1748
a190b734 17492009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1750
1751 PR middle-end/42393
6c9df8cb 1752 * gfortran.dg/graphite/pr42393.f90: New.
a190b734 1753
1747b6ef 17542009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1755
1756 PR middle-end/42186
6c9df8cb 1757 * gfortran.dg/graphite/pr42186.f90: New.
1747b6ef 1758
36f22aa0 17592009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1760
1761 PR middle-end/42205
1762 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1763 Insert the reduction copy in the same block as the phi node.
1764 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1765
6c9df8cb 1766 * gcc.dg/graphite/pr42205-1.c: New.
1767 * gcc.dg/graphite/pr42205-2.c: New.
36f22aa0 1768
17692009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1770
1771 PR middle-end/42221
1772 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1773 the array indexing of ADDR_EXPRs.
1774
6c9df8cb 1775 * gcc.dg/graphite/pr42221.c: New.
36f22aa0 1776
673c512e 17772009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1778
1779 PR middle-end/42178
1780 PR middle-end/42334
1781 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1782 index. Call lst_interchange_select_inner only once.
1783 (lst_interchange_select_inner): Update use of lst_try_interchange.
1784 (lst_interchange_select_outer): Update.
1785
17862009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1787
1788 PR middle-end/42178
1789 PR middle-end/42334
1790 * graphite-interchange.c (lst_try_interchange): Do not increment the
1791 the OUTER index when there is no AFTER kernel. Do not increment the
1792 OUTER index for after processing the AFTER kernel.
1793 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1794 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1795 index. Do not pass to lst_interchange_select_inner the OUTER index.
1796 (scop_do_interchange): Update use of lst_interchange_select_outer.
1797
6c9df8cb 1798 * gfortran.dg/graphite/graphite.exp
673c512e 1799 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
6c9df8cb 1800 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
673c512e 1801 the graphite dump file.
6c9df8cb 1802 * gfortran.dg/graphite/interchange-2.f: Same.
1803 * gfortran.dg/graphite/pr42334-1.f: New.
673c512e 1804
18052009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1806
1807 PR middle-end/42178
1808 PR middle-end/42334
1809 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1810 that are empty.
1811 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1812 (lst_try_interchange): Reimplemented.
1813 (lst_interchange_select_inner): Same.
1814 (lst_do_interchange): Renamed lst_interchange_select_outer.
1815 Reimplemented.
1816 (scop_do_interchange): Update use of lst_interchange_select_outer.
1817
6c9df8cb 1818 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1819 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1820 * gcc.dg/graphite/pr42211.c: New.
1821 * gfortran.dg/graphite/pr42334.f90: New.
673c512e 1822
99c136a5 18232009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1824
1825 PR middle-end/42181
1826 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1827 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1828
6c9df8cb 1829 * gfortran.dg/graphite/pr42181.f90: New.
99c136a5 1830
5184a05f 18312009-12-12 Sebastian Pop <sebpop@gmail.com>
1832
1833 PR middle-end/42284
1834 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1835 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1836 (detect_commutative_reduction_arg): Simplified.
1837 (detect_commutative_reduction): Early return when the argument of
1838 the close phi is not of an SSA_NAME.
1839
6c9df8cb 1840 * gcc.dg/graphite/pr42284.c: New.
5184a05f 1841
18422009-12-11 Alexander Monakov <amonakov@ispras.ru>
1843
1844 * dbgcnt.def (graphite_scop): New counter.
1845 * graphite.c: Include dbgcnt.h
1846 (graphite_transform_loops): Use new counter to limit transformations.
1847
7464e753 18482009-12-08 Sebastian Pop <sebpop@gmail.com>
1849
1850 PR middle-end/42285
1851 * graphite-scop-detection.c (graphite_can_represent_init): Also
1852 handle more complex MULT_EXPRs containing parameters by recursion
1853 on the structure.
1854
6c9df8cb 1855 * gfortran.dg/graphite/pr42285.f90: New.
7464e753 1856
18572009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1858
6c9df8cb 1859 * g++.dg/graphite/pr42130.C: Fix type.
7464e753 1860
f96db528 18612009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1862
6c9df8cb 1863 * g++.dg/graphite/pr42130.C: Correct testcase.
1864
18652009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1866
1867 * Merge from mainline (154493:154734).
1868
18692009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1870
1871 * Merge from mainline (151362:154491).
f96db528 1872
b7bde372 18732009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1874
1875 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1876 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1877
32e78944 18782009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1879
1880 PR middle-end/42130
1881 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1882 translate_clast_for_loop): New.
1883 (translate_clast_for): Add a condition around the loop, to do not
1884 execute loops with zero iterations.
6c9df8cb 1885 * g++.dg/graphite/pr42130.C: New.
1886 * gcc.dg/graphite/pr35356-2.c: Adapt.
32e78944 1887
bafaa7f6 18882009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1889
1890 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1891 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1892 Remove context_loop and level.
1893
0f5b569a 18942009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1895
1896 * graphite-clast-to-gimple.c (translate_clast_user,
1897 translate_clast_for, translate_clast_guard): Simplify and move common
1898 elements to translate_clast().
1899 (translate_clast): Simplify and get common elements.
1900
9a75e57c 19012009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1902
1903 * graphite-clast-to-gimple.c (translate_clast_user,
1904 translate_clast_for, translate_clast_guard): Split out of
1905 translate_clast.
1906
c9ef6b0e 19072009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1908
1909 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1910 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1911 debug_clast_name_indexes_1, debug_clast_name_indexes,
1912 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1913 (clast_name_to_gcc, clast_to_gcc_expression,
1914 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1915 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1916 graphite_create_guard_cond_expr, graphite_create_new_loop,
1917 translate_clast): Add params_index.
1918 (initialize_cloog_names): Create parameter strings from scratch, do
1919 not reference other strings.
1920 (create_params_index): New.
1921 (gloog): Initialize params_index.
1922 * graphite-scop-detection (free_scops_1): Removed.
1923 (limit_scops): Use normal free_scops.
1924 * graphite-sese-to-poly.c (save_var_names): Removed.
1925 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1926 and SESE_PARAMS_INDEX.
1927 * sese.c (new_sese, free_sese): Dito.
1928 * sese.h (struct sese): Remove params_index, params_names.
1929 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1930
a2a00920 19312009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1932
1933 Revert the following patch from 2009-09-14:
1934 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
1935 tree-scalar-evolution.h, and then tree-data-ref.h.
1936 * graphite-clast-to-gimple.c: Same.
1937 * graphite-dependences.c: Same.
1938 * graphite-interchange.c: Same.
1939 * graphite-poly.c: Same.
1940 * graphite-scop-detection.c: Same.
1941 * graphite-sese-to-poly.c: Same.
1942 * graphite.c: Same.
1943 * lambda-code.c: Same.
1944 * matrix-reorg.c: Same.
1945 * tree-data-ref.c: Same.
1946 * tree-if-conv.c: Same.
1947 * tree-loop-distribu: Same.: Same.
1948 * tree-loop-linear.c: Same.
1949 * tree-parloops.c: Same.
1950 * tree-predcom.c: Same.
1951 * tree-vect-patterns.c: Same.
1952
2bc59caa 19532009-11-20 Sebastian Pop <sebastian.pop@amd.com>
1954
1955 Revert patch from 2009-09-14.
1956 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
1957 passes at -O1 and below.
1958
1d4dd1ed 19592009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1960
1961 PR middle-end/40281
6c9df8cb 1962 * gcc.dg/graphite/pr40281.c: New.
1d4dd1ed 1963
1964 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
1965 evolutions should not variate in inner loops.
1966
efe7b64c 19672009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1968
1969 PR middle-end/42050
6c9df8cb 1970 * gfortran.dg/graphite/pr42050.f90: New.
efe7b64c 1971
acba5819 19722009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1973
1974 * graphite-interchange.c (memory_strides_in_loop_depth): New.
1975 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
1976
64d8f27a 19772009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1978
1979 * graphite-blocking.c (scop_do_block): New.
1980 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
1981 * graphite-poly.h (scop_do_block): Declared.
1982
9a0158f5 19832009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1984
1985 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
1986 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
1987 to transform depth into the time_depth before calling
1988 pbb_number_of_iterations_at_time.
1989 (lst_do_strip_mine): Use a scalar variable instead of recomputing
1990 lst_depth.
1991
9d274e75 19922009-11-18 Sebastian Pop <sebastian.pop@amd.com>
1993
1994 Reverted the patch for "scattering permutations" from 2009-10-28.
1995
1996 * graphite-poly.c (print_permutation): New.
1997 (debug_permutation): New.
1998 (new_poly_bb): Initialize PBB_PERMUTATION.
1999 (free_poly_bb): Free PBB_PERMUTATION.
2000 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2001 (struct pbb_permutation_elt): New.
2002 (PBB_PERMUTATION_ELT_STRIDE): New.
2003 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2004 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2005 (new_pbb_permutation_elt): New.
2006 (pbb_permutation_elt_free): New.
2007 (struct poly_bb): Add field permutation.
2008 (PBB_PERMUTATION): New.
2009 (print_permutation): Declared.
2010 (debug_permutation): Declared.
2011
3bcc3204 20122009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2013
2014 * graphite-interchange.c (build_partial_difference): New.
2015 (memory_stride_in_loop): Refactored the computation of
2016 equality constraints into build_partial_difference function.
2017 Added support for debugging stride computations.
2018
d996851c 20192009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2020
2021 * graphite-clast-to-gimple.c (gloog): Free if_region,
2022 if_region->true_region, and if_region->region.
2023 * sese.c (if_region_set_false_region): Free if_region->false_region.
2024 (create_if_region_on_edge): Do not use GGC_NEW.
2025 (move_sese_in_condition): Remove useless initialization.
2026
87d25ca7 20272009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2028
2029 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2030 for the loops created by the loop distribution. Do not modify the
2031 input LSTs.
2032 (lst_try_interchange_loops): Same. Use a temporary LST for the
2033 transformed schedule. Call lst_update_scattering before data
2034 dependence analysis.
2035 (lst_try_interchange): Pass an extra parameter INDEX.
2036 (lst_do_interchange_1): New.
2037 (lst_do_interchange): Call lst_do_interchange_1.
2038 (scop_do_interchange): Call lst_update_scattering.
2039 * graphite-poly.c (apply_poly_transforms): Do not call
2040 lst_update_scattering.
2041 * graphite-poly.h (lst_pred): New.
2042 (lst_succ): New.
2043 (lst_find_first_pbb): Return NULL when not found.
2044 (lst_empty_p): New.
2045 (lst_insert_in_sequence): Allow LST1 to be NULL.
2046 (lst_replace): New.
2047 (lst_substitute_3): New.
2048 * gcc.dg/graphite/interchange-1.c: XFail.
2049 * gcc.dg/graphite/interchange-8.c: XFail.
2050 * gcc.dg/graphite/interchange-11.c: XFail.
2051
06ced013 20522009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2053
2054 * graphite-interchange.c (lst_perfectly_nested_p): New.
2055 (lst_perfect_nestify): New.
2056 (lst_try_interchange_loops): Call store_lst_schedule,
2057 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2058 (scop_do_interchange): Avoid redundant legality test.
2059 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2060 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2061 * graphite-poly.h (psct_static_dim): New.
2062 (lst_dewey_number_at_depth): New.
2063 (lst_find_pbb): Restructured.
2064 (lst_find_first_pbb): Restructured.
2065 (lst_find_last_pbb): New.
2066 (lst_contains_p): New.
2067 (lst_contains_pbb): New.
2068 (lst_create_nest): New.
2069 (lst_remove_from_sequence): New.
2070 (pbb_update_scattering): New.
2071 (lst_update_scattering_under): New.
2072 (lst_update_scattering_seq): New.
2073 (lst_update_scattering): New.
2074 (lst_insert_in_sequence): New.
2075 (lst_distribute_lst): New.
2076 (lst_remove_all_before_including_pbb): New.
2077 (lst_remove_all_before_excluding_pbb): New.
2078
bf3aab8f 20792009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2080
2081 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2082 get_loop_exit_edges.
2083
06b1d38c 20842009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2085
2086 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2087
22467ffb 20882009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2089
2090 * graphite-poly.c (print_permutation): New.
2091 (debug_permutation): New.
2092 (new_poly_bb): Initialize PBB_PERMUTATION.
2093 (free_poly_bb): Free PBB_PERMUTATION.
2094 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2095 (struct pbb_permutation_elt): New.
2096 (PBB_PERMUTATION_ELT_STRIDE): New.
2097 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2098 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2099 (new_pbb_permutation_elt): New.
2100 (pbb_permutation_elt_free): New.
2101 (struct poly_bb): Add field permutation.
2102 (PBB_PERMUTATION): New.
2103 (print_permutation): Declared.
2104 (debug_permutation): Declared.
2105
628eaf60 21062009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2107
2108 * graphite-clast-to-gimple.c (gloog): Do not call
2109 sese_reset_aux_in_loops.
2110 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2111 extra argument for domains. Do not use loop->aux.
2112 (build_scop_iteration_domain): Initialize and free domains, pass it
2113 to build_loop_iteration_domains and extract the information from
2114 domains. Do not use loop->aux.
2115 * sese.c (sese_reset_aux_in_loops): Removed.
2116 * sese.h (sese_reset_aux_in_loops): Removed.
2117
2eb8c11d 21182009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2119
2120 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2121 (dependency_in_loop_p): Same.
2122 (translate_clast): Do not use loop->aux. Initialize
2123 loop->can_be_parallel.
2124 (mark_loops_parallel): Removed.
2125 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2126 * graphite.c (free_aux_in_new_loops): Removed.
2127 (graphite_finalize): Do not call free_aux_in_new_loops.
2128 (graphite_transform_loops): Do not call mark_loops_parallel.
2129
21302009-10-26 Li Feng <nemokingdom@gmail.com>
86cbf617 2131
2132 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2133 (translate_clast): Pass an extra parameter LEVEL.
2134 Call get_scattering_level.
2135 * graphite-clast-to-gimple.h (get_scattering_level): New.
2136
314c9614 21372009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2138
2139 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2140 * cfgloop.h (struct loop): New field single_iv.
2141
2142 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2143 loop->aux anymore: use loop->single_iv.
2144 (graphite_loop_normal_form): Moved...
2145 (build_graphite_loop_normal_form): Removed.
2146 (gloog): Do not call build_graphite_loop_normal_form.
2147 (free_aux_in_new_loops): Moved...
2148 (mark_loops_parallel): Restructure.
2149 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2150 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2151 (scop_canonicalize_loops): New.
2152 (build_poly_scop): Call scop_canonicalize_loops.
2153 * graphite.c (free_aux_in_new_loops): ...here.
2154
71bc7526 21552009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2156
2157 * g++.dg/graphite/graphite.exp: Add the same rules as in
2158 gcc.dg/graphite/graphite.exp.
2159
24af1ef8 21602009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2161
2162 * g++.dg/graphite/id-1.C: New.
2163
03c1327b 21642009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2165
2166 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2167 argument base_name.
2168 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2169 (rewrite_phi_out_of_ssa): Same.
2170 (rewrite_cross_bb_scalar_deps): Same.
2171 (translate_scalar_reduction_to_array): Same.
2172
8f9b64ca 21732009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2174
2175 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2176 dump_alias_graphs.
2177
aa16918e 21782009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2179
2180 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2181 (build_scop_drs): Call dump_alias_graphs.
2182
7e7ffe19 21832009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2184
2185 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2186 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2187 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2188 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2189 * graphite-poly.h (free_lst): New.
2190 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2191 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2192
e2622b4f 21932009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2194
2195 * graphite-poly.h (struct scop): Add a field saved_schedule.
2196 (SCOP_SAVED_SCHEDULE): New.
2197 (store_lst_schedule): New.
2198 (restore_lst_schedule): New.
2199 (store_scattering): Call store_lst_schedule.
2200 (restore_scattering): Call restore_lst_schedule.
2201
1a95516e 22022009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2203
2204 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2205 (pdr_add_alias_set): Same.
2206 (build_poly_dr): Same.
2207 (build_alias_set_optimal_p): Same.
2208 (build_base_obj_set_for_drs): Same. Do not store the result of
2209 graphds_dfs.
2210
f289f81b 22112009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2212
2213 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2214 all_components_are_cliques to 1.
2215
e9a3f95f 22162009-10-20 Li Feng <nemokingdom@gmail.com>
2217
2218 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2219 the new structure.
2220 (pdr_add_alias_set): Update retrieving alias_set_num.
2221 (build_poly_dr): Update retrieving dr_base_object_set.
2222 (partition_drs_to_sets): Remove.
2223 (build_alias_set_optimal_p): New.
2224 (build_alias_set_for_drs): Rename.
2225 (build_scop_drs): Update.
2226 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2227 (ALIAS_SET_INDEX): Remove.
2228 (BASE_OBJECT_SET_INDEX): Remove.
2229
a6457fb8 22302009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2231
2232 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2233
3354e72e 22342009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2235
2236 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2237 loop upper bounds for 1-element arrays at end of structures.
2238 * tree-flow.h (array_at_struct_end_p): Declared.
2239 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2240
917c8e43 22412009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2242
2243 * g++.dg/graphite/pr41305.C: New.
2244
b6410506 22452009-10-20 Alexander Monakov <amonakov@ispras.ru>
2246
2247 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2248 construction of parameter constraints from loop iteration analysis.
2249 * gcc.dg/graphite/run-id-2.c: New test.
2250
a66257d5 22512009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2252
2253 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2254 and new_cstr.
2255
38e3217b 22562009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2257
2258 * graphite-dependences.c (dependence_polyhedron_1): Remove
2259 unused gdim dimensions from the DDR polyhedron.
2260
de38f9c0 22612009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2262
2263 * graphite-dependences.c (pddr_transformed_scattering): New.
2264 (dot_original_deps_stmt_1): New.
2265 (dot_transformed_deps_stmt_1): New.
2266 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2267 dot_transformed_deps_stmt_1.
2268 (dot_original_deps): New.
2269 (dot_transformed_deps): New.
2270 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2271
ba01d66f 22722009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2273
2274 * graphite-dependences.c (reduction_dr_1): Remove wrong
2275 assert: reduction BBs can have multiple reduction writes
de38f9c0 2276 to memory. interchange-3.f90 is an example.
ba01d66f 2277
9050e62f 22782009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2279
2280 * gfortran.dg/graphite/interchange-3.f90: New.
2281
d26b2d30 22822009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2283
2284 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2285
bff9278d 22862009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2287
2288 * graphite-dependences.c (dependence_polyhedron_1): Add the
2289 context to the dependence polyhedron.
2290
13d0cae2 22912009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2292
2293 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2294 PBB_PDR_DUPLICATES_REMOVED.
2295 (new_poly_bb): Same.
2296
acb3969f 22972009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2298
2299 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2300 SCOP_CONTEXT.
2301 (build_loop_iteration_domains): Extract bounds on parameters
2302 based on the data size.
2303 (build_scop_context): Do not initialize SCOP_CONTEXT;
2304 add new constraints.
2305
e6d78739 23062009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2307
2308 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2309 * graphite-ppl.h (graphite-ppl.h): Declared.
2310
409f96c1 23112009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2312
2313 * graphite-ppl.c (ppl_print_linear_expr): New.
2314 (debug_ppl_linear_expr): New.
2315 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2316 (debug_ppl_linear_expr): Declared.
2317
3d695986 23182009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2319
2320 * graphite-interchange.c: Fix comments.
2321 * gcc.dg/graphite/block-1.c: Fix comments.
2322
ecab863e 23232009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2324
2325 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2326 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2327
3dfb9fc0 23282009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2329
2330 Reapply the patch from Alexander Monakov that disappeared during
2331 the last merges from trunk.
2332
2333 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2334
2335 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2336 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2337
a1190c1b 23382009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2339
2340 * graphite-interchange.c (memory_stride_in_loop): The depth
2341 argument corresponds to a dynamic time dimension, so use
2342 psct_dynamic_dim to refer to the transformed scattering dimension.
2343
dd3d3fae 23442009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2345
2346 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2347
43217ce9 23482009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2349
2350 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2351 root of the LST.
2352 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2353 the root of the LST.
2354 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2355 fake loop.
2356 (print_lst): Print the root of LST in a different format.
2357 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2358
9b6c835c 23592009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2360
2361 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2362
1e2a9aa7 23632009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2364
2365 * doc/passes.texi: Document the Graphite infrastructure.
2366
ff010926 23672009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2368
2369 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2370 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2371 and check the SSA representation.
2372
2373 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2374
fa846ea9 23752009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2376
2377 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2378
fe45c436 23792009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2380
2381 * gcc.dg/graphite/interchange-11.c: New.
2382
2e3e5ac8 23832009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2384
2385 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2386
93a95718 23872009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2388
2389 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2390 Add -fno-loop-strip-mine and -fno-loop-interchange.
2391 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2392 -fno-loop-strip-mine.
2393 * gfortran.dg/graphite/graphite.exp: Same.
2394
196689e3 23952009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2396
2397 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2398 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2399 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2400 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2401 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2402 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2403 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2404 DEFAULT_FLAGS_GRAPHITE_SCOP.
2405 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2406 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2407
d9e94834 24082009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2409
2410 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2411
5e18ab2b 24122009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2413 Sebastian Pop <sebastian.pop@amd.com>
2414
2415 * graphite-interchange.c (build_linearized_memory_access): Pass an
2416 offset as parameter.
2417 (memory_stride_in_loop): Include transform scattering in the
2418 access functions to be able to querry the strides in the
2419 transformed loops.
2420 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2421 not the psct_iterator_dim.
2422
0befefcc 24232009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2424
2425 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2426 (lst_do_strip_mine_loop): New.
2427 (lst_do_strip_mine): New.
2428 (scop_do_strip_mine): Call lst_do_strip_mine.
2429 * graphite-poly.h (lst_add_loop_under_loop): New.
2430 (lst_find_first_pbb): New.
2431
71b90bc3 24322009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2433
2434 * graphite-poly.c (loop_to_lst): Fix LST creation.
2435
4d6599d0 24362009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2437
6c9df8cb 2438 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
4d6599d0 2439 sizeof(unsigned long) to make it run on 32bit systems.
2440
24412009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2442
6c9df8cb 2443 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
4d6599d0 2444 SEGFAULT on 32bit.
2445
96233858 24462009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2447
4d6599d0 2448 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2449 Comment.
96233858 2450 (write_alias_graph_to_ascii_dot): New.
2451 (write_alias_graph_to_ascii_ecc): Ditto.
4d6599d0 2452 (partition_drs_to_sets): Add testing of optimality of current method
2453 which assigns alias numbers according to DFS Comopnent number. used
2454 as heuristic for the upcoming ECC algorithm.
96233858 2455 (build_scop_drs): Write to file also with the ecc and dot format.
2456
8eedbd74 24572009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2458
2459 * gfortran.dg/graphite/interchange-1.f: XFail.
2460
ef98ee10 24612009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2462
2463 * graphite.c (graphite_initialize): Do not handle functions with
2464 more than 100 basic blocks.
2465
b8ad26cc 24662009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2467
2468 * graphite-blocking.c (pbb_do_strip_mine): Use
2469 PARAM_LOOP_BLOCK_TILE_SIZE.
2470
4938b827 24712009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2472
2473 * graphite-poly.c (dot_lst_1): New.
2474 (dot_lst): New.
2475 * graphite-poly.h (dot_lst): Declared.
2476
a7d089ac 24772009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2478
2479 * graphite-dependences.c (dot_deps_stmt_1): New.
2480 (dot_deps_stmt): New.
2481 * graphite-dependences.h (dot_deps_stmt): Declared.
2482
dd27e8aa 24832009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2484
2485 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2486 not replace cross BB scalar dependences ending on PHI nodes.
2487 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2488
dbe2e816 24892009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2490
2491 * graphite-poly.c (apply_poly_transforms): Implement the high
2492 level driver for flag_loop_block.
6c9df8cb 2493 * opts.c (decode_options): Enable flag_loop_block at -O2.
dbe2e816 2494 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2495 flag_loop_block.
2496
2497 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2498 -floop-block.
2499 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2500 Add -floop-block.
2501
89d077e8 25022009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2503
2504 * graphite-poly.h (lst_find_pbb): New.
2505 (find_lst_loop): New.
2506
220b380e 25072009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2508
2509 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2510 * graphite-poly.h (struct scop): Remove dep_graph field.
2511 (SCOP_DEP_GRAPH): Removed.
2512
554eeadb 25132009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2514
2515 * graphite-poly.h (copy_lst): Do full copy of LST.
2516
30105622 25172009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2518
2519 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2520 when the loop stride is zero.
2521
2522 * gcc.dg/graphite/id-16.c: New.
2523
f007fe97 25242009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2525
2526 * graphite-dependences.c (reduction_dr_1): New.
2527 (reduction_dr_p): New.
2528 (graphite_legal_transform_dr): Call reduction_dr_p.
2529 (reduction_ddr): Renamed reduction_ddr_p.
2530 * graphite-poly.h (same_pdr_p): New.
2531 (number_of_write_pdrs): New.
2532 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2533 (split_reduction_stmt): Do not split reduction statements
2534 when there are no writes to memory.
2535 (translate_scalar_reduction_to_array_for_stmt): Insert the
2536 memory reduction statement just after the scalar reduction statement.
2537
2538 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2539 Un-XFAIL-ed.
2540 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2541 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2542
4d0382bc 25432009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2544
2545 * graphite-interchange.c (lst_apply_interchange): New.
2546 (lst_interchange_profitable_p): New.
2547 (lst_try_interchange_loops): New.
2548 (lst_try_interchange): New.
2549 (lst_do_interchange): New.
2550 (pbb_do_interchange): Removed.
2551 (scop_do_interchange): Call lst_do_interchange.
2552
f77385d3 25532009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2554
2555 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2556 SCOP_TRANSFORMED_SCHEDULE.
2557 (loop_to_lst): New.
2558 (scop_to_lst): New.
2559 (print_lst): New.
2560 (debug_lst): New.
2561 * graphite-poly.h (lst_p): New.
2562 (struct lst): New.
2563 (LST_LOOP_P): New.
2564 (LST_LOOP_FATHER): New.
2565 (LST_PBB): New.
2566 (LST_SEQ): New.
2567 (scop_to_lst): Declared.
2568 (print_lst): Declared.
2569 (debug_lst): Declared.
2570 (new_lst_loop): New.
2571 (new_lst_stmt): New.
2572 (copy_lst): New.
2573 (lst_depth): New.
2574 (lst_dewey_number): New.
2575 (struct scop): Add original_schedule and transformed_schedule fields.
2576 (SCOP_ORIGINAL_SCHEDULE): New.
2577 (SCOP_TRANSFORMED_SCHEDULE): New.
2578 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2579
30f4f4a6 25802009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2581
2582 * graphite-dependences.c (reduction_ddr): New.
2583 (graphite_legal_transform_bb): Call reduction_ddr.
2584 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2585 Initialize PBB_IS_REDUCTION.
2586 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2587 (PBB_IS_REDUCTION): New.
2588 (new_poly_bb): Update declaration.
2589 * graphite-scop-detection.h (build_scop_bbs): Removed.
2590 (nb_reductions_in_loop): Removed.
2591 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2592 parameter for reductions.
2593 (try_generate_gimple_bb): Update call to new_poly_bb.
2594 (build_scop_bbs_1): Same.
2595 (build_scop_bbs): Same.
2596 (gsi_for_phi_node): New.
2597 (scalar_close_phi_node_p): Remove gcc_assert.
2598 (split_reduction_stmt): New.
2599 (is_reduction_operation_p): New.
2600 (phi_contains_arg): New.
2601 (follow_ssa_with_commutative_ops): New.
2602 (detect_commutative_reduction_arg): New.
2603 (detect_commutative_reduction_assign): New.
2604 (follow_inital_value_to_phi): New.
2605 (edge_initial_value_for_loop_phi): New.
2606 (initial_value_for_loop_phi): New.
2607 (detect_commutative_reduction): New.
2608 (translate_scalar_reduction_to_array_for_stmt): New.
2609 (insert_copyout): New.
2610 (insert_copyin): New.
2611 (translate_scalar_reduction_to_array): New.
2612 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2613 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2614 (rewrite_commutative_reductions_out_of_ssa): New.
2615 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2616 * sese.h (split_region_for_bb): New.
2617
2618 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2619 * gcc.dg/graphite/interchange-1.c: Fix format.
2620 * gcc.dg/graphite/interchange-10.c: New.
2621
dcdff5dc 26222009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2623
2624 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2625 buggy assert.
2626
5061777c 26272009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2628
2629 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2630 (rewrite_cross_bb_scalar_dependence): New.
2631 (rewrite_cross_bb_scalar_deps): New.
2632 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2633 Call rewrite_cross_bb_scalar_deps.
2634
52123e43 26352009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2636
2637 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2638 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2639 gsi_for_stmt.
2640
ef43e998 26412009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2642
2643 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2644 * graphite-interchange.c (pbb_do_interchange): Same.
2645 * graphite-poly.c (print_scattering_function): Same.
2646 (debug_pdrs): Same.
2647 * graphite-poly.h (pbb_loop): New.
2648 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2649
7bf7d520 26502009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2651
2652 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2653
9c48819a 26542009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2655
2656 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2657 so don't pass a pointer to it.
2658 (build_alias_set_for_drs): Same.
2659 (build_base_obj_set_for_drs): Same.
2660 (build_scop_drs): Same.
2661
af3b89d1 26622009-09-26 Li Feng <nemokingdom@gmail.com>
2663
2664 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2665 the alias graph of data references.
2666
8dee37ec 26672009-09-25 Li Feng <nemokingdom@gmail.com>
2668
2669 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2670 (build_scop_drs): When debugging, write the alias graph to file,
2671 otherwise, should be disabled.
2672
6c9df8cb 26732009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2674
2675 * Merge from mainline (151310:151361).
2676
26772009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2678
2679 * Merge from mainline (151171:151310).
2680
26812009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2682
2683 * Merge from mainline (151171:151806).
2684
26852009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2686
2687 * Revert the last commit.
2688
26892009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2690
2691 * Merge from mainline (151171:151819).
2692
3cc56eaf 26932009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2694
2695 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2696 (is_simple_operand): Remove call to stmt_simple_memref_p.
2697 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2698
4d62cf0c 26992009-09-17 David Edelsohn <edelsohn@gnu.org>
2700
6c9df8cb 2701 * gcc.dg/graphite/interchange-mvt.c: New File.
2702 * gcc.dg/graphite/scop-dsyrk.c: New File.
2703 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2704 * gcc.dg/graphite/scop-mvt.c: New File.
2705 * gcc.dg/graphite/scop-sor.c: New File.
4d62cf0c 2706
ae11f03b 27072009-09-17 Li Feng <nemokingdom@gmail.com>
2708
ae11f03b 2709 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2710 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2711 (graphite_carried_dependence_level_k): Ditto.
2712 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2713 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2714 (new_poly_dr): Adjust declaration.
2715 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2716 (free_gimple_bb): Added free_data_refs_aux.
2717 (build_poly_dr): Add dr_base_object_set.
2718 (partition_drs_to_sets): New.
2719 (dr_same_base_object_p): New.
2720 (build_alias_set_for_drs): New.
2721 (build_base_object_set_for_drs): New.
2722 (build_scop_drs): Add build_base_obj_set_for_drs.
2723 * graphite-sese-to-poly.h: Added #define for alias set number index and
2724 base object set index.
2725 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2726 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2727
e5d72697 27282009-09-16 Alexander Monakov <amonakov@ispras.ru>
2729
2730 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2731 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2732
db899978 27332009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2734
2735 * graphite-sese-to-poly.c (struct irp_data): Removed.
2736 (idx_record_params): Removed.
2737 (find_params_in_bb): Scan for parameters the access functions; don't
2738 parse the tree representation.
2739
e5b6be5e 27402009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2741
2742 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2743 passes at -O1 and below.
2744
f631009f 27452009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2746
2747 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2748 tree-scalar-evolution.h, and then tree-data-ref.h.
2749 * graphite-clast-to-gimple.c: Same.
2750 * graphite-dependences.c: Same.
2751 * graphite-interchange.c: Same.
2752 * graphite-poly.c: Same.
2753 * graphite-scop-detection.c: Same.
2754 * graphite-sese-to-poly.c: Same.
2755 * graphite.c: Same.
2756 * lambda-code.c: Same.
2757 * matrix-reorg.c: Same.
2758 * tree-data-ref.c: Same.
2759 * tree-if-conv.c: Same.
2760 * tree-loop-distribu: Same.: Same.
2761 * tree-loop-linear.c: Same.
2762 * tree-parloops.c: Same.
2763 * tree-predcom.c: Same.
2764 * tree-vect-patterns.c: Same.
2765
5e803fbe 27662009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2767
2768 Partially revert the previous patch, except the following.
2769 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2770 as parameters the operands of the not expression.
2771
c43f1e90 27722009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2773
2774 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2775 Do not call analyze_scalar_evolution on assignments.
2776 (instantiate_scev_phi): Call analyze_scalar_evolution.
2777 (instantiate_scev_name): Call instantiate_scev_assign and
2778 instantiate_scev_phi.
2779 (instantiate_scev_not): Adapted to pass as parameters the operands
2780 of the not expression.
2781
9e9aa0c6 27822009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2783
2784 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2785 to pass as parameters the operands of the binary expression.
2786
9d206f16 27872009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2788
2789 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2790 instantiate_scev_not. Handle NEGATE_EXPR.
2791 (instantiate_scev_r): Handle NEGATE_EXPR.
2792
d91a99f1 27932009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2794
2795 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2796 instantiate_scev_r.
2797 (instantiate_scev_r): Move code in instantiate_scev_2
2798 and instantiate_scev_1.
2799
378a6626 28002009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2801
2802 * tree-scalar-evolution.c (instantiate_scev_3): New.
2803 (instantiate_scev_1): Move code in instantiate_scev_3.
2804
a819f845 28052009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2806
2807 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2808 (instantiate_scev_1): Move code in instantiate_scev_poly.
2809
39251a91 28102009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2811
2812 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2813 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2814
7723692a 28152009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2816
2817 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2818 (instantiate_scev_1): Move code in instantiate_scev_convert.
2819
5a10dfba 28202009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2821
2822 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2823 (instantiate_scev_1): Move code in instantiate_scev_binary.
2824
0731d869 28252009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2826
2827 * tree-scalar-evolution.c (instantiate_scev_name): New.
2828 (instantiate_scev_1): Move code in instantiate_scev_name.
2829
28302009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2831
2832 * Merge from mainline (150992:151171).
2833
6c9df8cb 28342009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2835
2836 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2837
9e3531b5 28382009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2839
2840 * graphite-dependences.c (graphite_legal_transform_bb): Call
2841 pbb_remove_duplicate_pdrs.
2842 * graphite-poly.c (can_collapse_pdr): Removed.
2843 (pdr_find_duplicate): Removed.
2844 (can_collapse_pdrs): New.
2845 (pbb_remove_duplicate_pdrs): New.
2846 (new_poly_dr): Do not look for duplicates.
2847 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2848 (PBB_PDR_DUPLICATES_REMOVED): New.
2849 (pbb_remove_duplicate_pdrs): Declared.
2850
11b2102e 28512009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2852
2853 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2854 the strides by multiplying by PDR_NB_REFS.
2855 * graphite-poly.c (can_collapse_pdr): New.
2856 (pdr_find_duplicate): New.
2857 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2858 Initialize PDR_NB_REFS.
2859 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2860 (PDR_NB_REFS): New.
2861 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2862
28632009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2864
2865 Revert one of the previous commits:
2866 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2867 the computation of symmetric data dependence relations.
2868 (dependency_between_pbbs_p): Same.
2869
d0aaf399 28702009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2871
2872 PR middle-end/40965
2873 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2874 any transform.
2875
79698ff3 28762009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2877
2878 * graphite-dependences.c (pddr_original_scattering): Return NULL
2879 for read-read dependence relations.
2880 * graphite-poly.h (enum poly_dr_type): Fix comment.
2881 (pdr_read_p): New.
2882 (pdr_write_p): New.
2883 (pdr_may_write_p): New.
2884
c04f2da7 28852009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2886
2887 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2888 (struct poly_dr): Same.
2889 (new_poly_dr): Same.
2890 * graphite-poly.c (new_poly_dr): Same.
2891
ee0d08ad 28922009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2893 Sebastian Pop <sebastian.pop@amd.com>
2894
2895 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2896 pbb_strip_mine_time_depth. Changed the implementation so that
2897 transformation is expressed as a transformation on
2898 time (scatttering) dimensions. Also, ensures that the 2d+1
2899 scheduling format is preserved.
2900 (pbb_strip_mine_profitable_p): Profitability is based on the
2901 iteration number of a given time (scattering) dimension,
2902 and not on a original loop depth dimension.
2903 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2904 (pbb_do_strip_mine): Call psct_dynamic_dim.
2905 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2906 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2907 (pbb_nb_dynamic_scattering_transform): New.
2908 (psct_dynamic_dim): New.
2909
55c54afb 29102009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2911
2912 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2913 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2914 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2915 * graphite-interchange.c (build_linearized_memory_access): Same.
2916 (memory_stride_in_loop): Same.
2917
96b6d5d7 29182009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2919
2920 * graphite-dependences.c (pddr_original_scattering): New.
2921 (graphite_legal_transform_dr): Call pddr_original_scattering.
2922 (dot_deps_1): New.
2923 (dot_deps): New.
2924 * graphite-dependences.h (dot_deps): Declared.
2925 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2926 (print_pdr): Print PDR_ID.
2927 * graphite-poly.h (struct poly_dr): Add field id.
2928 (PDR_ID): New.
2929 (pbb_index): New.
2930 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
2931
2b3a572c 29322009-08-22 Sebastian Pop <sebastian.pop@amd.com>
2933
2934 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
2935 not delete the original dependence relation.
2936
29372009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2938
2939 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2940 the computation of symmetric data dependence relations.
2941 (dependency_between_pbbs_p): Same.
2942
0d6b5db2 29432009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2944
2945 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
2946 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
2947 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
2948 (free_poly_ddr): New.
2949 (pddr_is_empty): New.
2950 (dependence_polyhedron_1): Now returns a poly_ddr_p.
2951 (dependence_polyhedron): Same. Remove useless gcc_assert.
2952 Remove fprintfs.
2953 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
2954 (graphite_carried_dependence_level_k): Call pddr_is_empty.
2955 * graphite-dependences.h (enum poly_dependence_kind): New.
2956 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
2957 (PDRP_SOURCE): Renamed PDDR_SOURCE.
2958 (PDRP_SINK): Renamed PDDR_SINK.
2959 (PDRP_DDP): Renamed PDDR_DDP.
2960 (PDDR_KIND): New.
2961 (free_poly_ddr): Declared.
2962 * graphite-poly.c (new_scop): Use the new hash function names.
2963 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
2964 into original_pddrs.
2965 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
2966
29672009-08-21 Sebastian Pop <sebastian.pop@amd.com>
2968
2969 * Merge from mainline (150764:150992).
2970
02df46c6 29712009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2972
2973 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
2974 bounds with LT_EXPR to make niter analysis more precise on code
2975 generated by Graphite.
2976
70a1a7a2 29772009-08-18 Sebastian Pop <sebastian.pop@amd.com>
2978
2979 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
2980 (graphite_legal_transform_bb): Same.
2981 (poly_drs_may_alias_p): Same.
2982
19eec579 29832009-08-15 Sebastian Pop <sebastian.pop@amd.com>
2984
2985 PR middle-end/40981
2986 * graphite-ppl.c (ppl_max_for_le): Correct the use of
2987 ppl_Pointset_Powerset_C_Polyhedron_maximize.
2988
29892009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2990
2991 * graphite-poly.c (print_pbb): Print PBB index.
2992
29932009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2994
2995 * Merge from mainline (r150672:150764).
2996
29972009-08-13 Sebastian Pop <sebastian.pop@amd.com>
2998
2999 * graphite-interchange.c (ppl_max_for_le): Moved...
3000 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3001 * graphite-ppl.c (ppl_max_for_le): ... here.
3002 * graphite-ppl.h (ppl_max_for_le): Declared.
3003
30042009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3005
3006 * Merge from mainline (r150372:150672).
3007
43f8b6ab 30082009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3009
3010 PR middle-end/40980
3011 * sese.c (convert_for_phi_arg): New.
3012 (add_guard_exit_phis): Use convert_for_phi_arg.
3013
6c9df8cb 3014 * gfortran.dg/graphite/id-17.f: New.
43f8b6ab 3015
96da1999 30162009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3017
3018 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3019 unknown subscript upper bounds.
3020
6c9df8cb 3021 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
96da1999 3022
80020e9d 30232009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3024 Pranav Garg <pranav.garg2107@gmail.com>
3025
3026 * graphite-interchange.c (gather_access_strides): Removed.
3027 (ppl_max_for_le): New.
3028 (build_linearized_memory_access): New.
3029 (memory_stride_in_loop): New.
3030 (pbb_interchange_profitable_p): Reimplemented.
3031 * graphite-ppl.h (ppl_new_id_map): New.
3032 (ppl_interchange): New.
3033
6c9df8cb 3034 * gcc.dg/graphite/interchange-6.c: XFAILed.
80020e9d 3035
c9fce634 30362009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3037
3038 * graphite-interchange.c (compute_subscript): Removed.
3039 (compute_array_size_cstr): Removed.
3040 (compute_array_size_poly): Removed.
3041 (compute_array_size): Removed.
3042 (gather_access_strides_poly): Removed.
3043 (gather_access_strides): Empty.
3044
85f74b79 30452009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3046
3047 * graphite-dependences.c (dependence_polyhedron_1): Replace
3048 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3049 (graphite_legal_transform_dr): Same.
3050 (graphite_carried_dependence_level_k): Same.
3051 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3052 Initialize PDR_NB_SUBSCRIPTS.
3053 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3054 PDR_NB_SUBSCRIPTS.
3055 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3056 (PDR_NB_SUBSCRIPTS): New.
3057 (pdr_nb_subscripts): Removed.
3058 (pdr_dim): Simplified.
3059 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3060 with PDR_NB_SUBSCRIPTS.
3061
19b42529 30622009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3063
3064 * graphite-interchange.c (compute_array_size): Remove use of
3065 PDR_DATA_CONTAINER.
3066 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3067 Do not initialize PDR_DATA_CONTAINER.
3068 (print_pdr): Do not print PDR_DATA_CONTAINER.
3069 * graphite-poly.h (struct poly_dr): Remove data_container field.
3070 (PDR_DATA_CONTAINER): Removed.
3071 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3072 PDR_DATA_CONTAINER.
3073 (build_poly_dr): Same.
3074
9daa8810 30752009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3076
6c9df8cb 3077 * gcc.dg/graphite/interchange-9.c: New.
9daa8810 3078
0835eab6 30792009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3080 Sebastian Pop <sebastian.pop@amd.com>
3081
3082 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3083 copy of the dependence polyhedron. Free the temporary objects.
3084 (graphite_carried_dependence_level_k): Free unused objects before
3085 returning.
3086
6c9df8cb 3087 * gcc.dg/graphite/interchange-1.c: XFAILed.
3088 * gcc.dg/graphite/interchange-2.c: XFAILed.
3089 * gcc.dg/graphite/interchange-3.c: XFAILed.
3090 * gcc.dg/graphite/interchange-4.c: XFAILed.
3091 * gcc.dg/graphite/interchange-7.c: XFAILed.
0835eab6 3092
a741358d 30932009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3094
3095 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3096 Early return without analyzing the data dependences if no
3097 transform has been done. Call restore_scattering if the transform
3098 is not legal.
3099 (graphite-interchange.c): Same.
3100 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3101 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3102 (apply_poly_transforms): Do not gcc_assert that
3103 the transform is legal.
3104 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3105 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3106 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3107 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3108 * graphite-poly.h (struct poly_scattering): New.
3109 (struct poly_bb): Add original, transformed, and saved fields.
3110 Remove transformed_scattering, original_scattering, nb_local_variables,
3111 and nb_scattering_transform fields.
3112 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3113 (poly_scattering_new): New.
3114 (poly_scattering_free): New.
3115 (poly_scattering_copy): New.
3116 (store_scattering_pbb): New.
3117 (store_scattering): New.
3118 (restore_scattering_pbb): New.
3119 (restore_scattering): New.
3120 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3121 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
9daa8810 3122
95b2e0d3 31232009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3124
3125 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3126 (print_scop): Same.
3127
675d86b2 31282009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3129
3130 * Makefile.in (graphite.o): Depends on PREDICT_H.
3131 * graphite.c: Include predict.h.
3132 (graphite_finalize): Call tree_estimate_probability.
3133 * predict.c (predict_loops): Do not call scev_initialize and
3134 scev_finalize.
3135 (tree_estimate_probability_bb): New.
3136 (tree_estimate_probability): Do not initialize loops: move that
3137 code to the driver. Call tree_estimate_probability_bb.
3138 (tree_estimate_probability_driver): New.
3139 (pass_profile): Use tree_estimate_probability_driver.
3140 * predict.h (tree_estimate_probability): Declared.
3141
525c22c4 31422009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3143
3144 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3145 * graphite-dependences.c (graphite_legal_transform): Add time to
3146 TV_GRAPHITE_DATA_DEPS.
3147 (dependency_between_pbbs_p): Same.
3148 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3149
31502009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3151
3152 * Merge from mainline (r149952:150372).
3153
c6bb733d 31542009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3155
3156 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3157 * graphite-blocking.c: Same.
3158 * graphite-clast-to-gimple.c: Same.
3159 * graphite-dependences.c: Same.
3160 * graphite-poly.c: Same.
3161 * graphite-poly.h: Same.
3162 * graphite-ppl.c: Same.
3163 * graphite-scop-detection.c: Same.
3164 * graphite-sese-to-poly.c: Same.
3165 * graphite.c: Same.
3166
31672009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3168
3169 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3170 (remove_simple_copy_phi): New.
3171 (remove_invariant_phi): New.
3172 (simple_copy_phi_p): New.
3173 (reduction_phi_p): New.
3174 (gsi_for_ssa_name_def): New.
3175 (insert_out_of_ssa_copy): New.
3176 (insert_out_of_ssa_copy_on_edge): New.
3177 (create_zero_dim_array): New.
3178 (scalar_close_phi_node_p): New.
3179 (rewrite_close_phi_out_of_ssa): New.
3180 (rewrite_phi_out_of_ssa): New.
3181 (rewrite_reductions_out_of_ssa): New.
3182 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3183
6c9df8cb 3184 * gcc.dg/graphite/id-11.c: New.
3185 * gcc.dg/graphite/id-15.c: New.
3186 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3187 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3188 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3189 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3190 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3191 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3192 * gfortran.dg/graphite/id-13.f: New.
3193 * gfortran.dg/graphite/id-5.f: New.
c6bb733d 3194
31952009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3196
3197 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3198 check that nb_reductions_in_loop is zero.
3199 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3200 reduction phi nodes.
3201 (nb_reductions_in_loop): Removed.
3202 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3203 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3204 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3205 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3206 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3207
32082009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3209
3210 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3211 statements that have an empty iteration domain.
6c9df8cb 3212 * gfortran.dg/graphite/id-16.f: New.
c6bb733d 3213
32142009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3215
3216 * tree-scalar-evolution.c (instantiate_scev_1): Return
3217 chrec_dont_know when the result is not above instantiate_below.
3218 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3219 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3220 the tree has a known scalar evolution.
6c9df8cb 3221 * gfortran.dg/graphite/id-14.f: New.
3222 * gfortran.dg/graphite/id-15.f: New.
c6bb733d 3223
32242009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3225
3226 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3227 insert_gsi.
3228 (rename_variables): Keep inserting renames after the ones already
3229 inserted.
3230
32312009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3232
3233 * graphite-sese-to-poly.c (compare_bb_depths): New.
3234 (graphite_sort_dominated_info): New.
3235 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3236 (build_scop_scattering): Fix comment.
3237
32382009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3239
3240 * graphite.c (graphite_finalize): Call print_loops instead of
3241 dump_function_to_file.
6c9df8cb 3242 * gcc.dg/graphite/graphite.exp: Fix formatting.
3243 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
c6bb733d 3244 loops generated in the graphite output file.
6c9df8cb 3245 * gcc.dg/graphite/pr35356-2.c: New.
3246 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3247 * gfortran.dg/graphite/id-12.f: New.
c6bb733d 3248
32492009-07-24 Li Feng <nemokingdom@gmail.com>
3250
6c9df8cb 3251 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
c6bb733d 3252 Remove 2 XFAIL.
3253
32542009-07-24 Li Feng <nemokingdom@gmail.com>
3255 Tobias Grosser <grosser@fim.uni-passau.de>
3256
3257 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3258 alias set number build alias in ACCESSES polyhedron.
3259 (build_alias_set_for_drs): New.
3260 (build_pbb_drs): Added build_alias_set_for_drs.
3261 * graphite-dependences.c (poly_drs_may_alias_p): New.
3262 (graphite_carried_dependence_level_k): Check alias information
3263 before building polyhedron.
3264
32652009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3266
3267 * Makefile.in (lambda-code.o): Fix formatting.
3268
32692009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3270
3271 * Merge from mainline (r149350-149952)
3272
32732009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3274
3275 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3276 before interchange to prepare for loop blocking.
3277
32782009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3279
3280 * graphite-poly.c (apply_poly_transforms): Add checks after every
3281 transformation.
3282 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3283 done in apply_poly_transforms.
3284
32852009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3286
3287 * graphite-dependences.c (build_lexicographically_gt_constraint):
3288 Replace RES parameter with *RES.
3289 (dependence_polyhedron_1): Pass an address of the parameter RES
3290 instead of value of RES.
3291
32922009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3293
3294 * graphite.c (graphite_finalize): Fix comment.
3295 (graphite_transform_loops): Reset scev info after code generation
3296 of each scop.
3297
32982009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3299
3300 * graphite.c (graphite_finalize): Call scev_reset.
3301
33022009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3303
3304 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3305 GBB_CLOOG_IV_TYPES hash table twice.
3306 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3307 (add_condition_to_domain): Clear GMP values.
3308
33092009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3310
3311 * graphite-dependences.c: Fix formatting.
3312 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3313 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3314 * graphite-sese-to-poly.c: Fix formatting.
3315 * graphite.c (graphite_transform_loops): Create the hash table
3316 after the early return.
3317
33182009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3319
6c9df8cb 3320 * gcc.dg/graphite/id-14.c: New.
3321 * gcc.dg/graphite/pr40157.c: New.
3322 * gfortran.dg/graphite/id-11.f: New.
c6bb733d 3323
33242009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3325
3326 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3327 (build_poly_scop): Return false when there are no pbbs within
3328 loops to avoid to pass to cloog scops with no loops.
3329
33302009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3331
3332 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3333 useless test "i % 2".
3334 (build_pbb_scattering_polyhedrons): Fix formatting.
3335 (build_poly_dr): Same.
3336 * graphite.c (graphite_transform_loops): Restructure.
3337
33382009-07-14 Razya Ladelsky <razya@il.ibm.com>
3339
3340 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3341 reduction_list parameter.
3342 (rewrite_all_phi_nodes_with_iv): Same.
3343 (canonicalize_loop_ivs): Same.
3344 * tree-parloops.c (struct brli): Removed.
3345 (build_reduction_list_info): Removed.
3346 (build_new_reduction): New.
3347 (analyze_reduction_list): Removed.
3348 (gather_scalar_reductions): Find reductions instead of phi
3349 nodes that can't be canonicalized.
3350 (try_create_reduction_list): Remove reduction_list parameter.
3351 (gen_parallel_loop): Same.
3352 (parallelize_loops): Remove analyze_reductions variable,
3353 initialization and free.
3354 Change reduction_list htab initialization to reduction_info
3355 elements instead of ssa names.
3356 Call try_create_reduction_list and gen_parallel_loop without
3357 analyzed_reduction argument.
3358 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3359 canonicalize_loop_ivs with one less argument.
3360 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3361
33622009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3363
3364 * graphite-dependences.c (new_poly_dr_pair): New.
3365 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3366 (new_poly_dr_pair): New.
3367 (eq_poly_dr_pair_p): New.
3368 (hash_poly_dr_pair_p): New.
3369 * graphite-dependences.h (struct poly_dr_pair): New.
3370 (eq_poly_dr_pair_p): Declared.
3371 (hash_poly_dr_pair_p): Declared.
3372 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3373 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3374 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3375 * Makefile.in (graphite-poly.o): Add dependence on
3376 graphite-dependences.h.
3377
33782009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3379
3380 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3381 polynomials of degree > 1 pass to Graphite.
3382 * tree-chrec.c (scev_is_linear_expression): Call
3383 evolution_function_is_affine_multivariate_p.
6c9df8cb 3384 * gfortran.dg/graphite/id-10.f90: New.
c6bb733d 3385
33862009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3387
3388 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3389 Instantiate scevs varying in outer loops.
6c9df8cb 3390 * gfortran.dg/graphite/id-9.f: Correct testcase.
c6bb733d 3391
33922009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3393
3394 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3395 redundant constraint.
3396
33972009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3398
6c9df8cb 3399 * gcc.dg/graphite/graphite.exp: Fix comments.
3400 * gfortran.dg/graphite/graphite.exp: Trigger actions
c6bb733d 3401 based on the file names as in the C testsuite.
6c9df8cb 3402 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3403 * gfortran.dg/graphite/block-2.f: Same.
3404 * gfortran.dg/graphite/block-3.f90: Same.
3405 * gfortran.dg/graphite/block-4.f90: Same.
3406 * gfortran.dg/graphite/id-1.f90: Same.
3407 * gfortran.dg/graphite/id-2.f90: Same.
3408 * gfortran.dg/graphite/id-3.f90: Same.
3409 * gfortran.dg/graphite/id-4.f90: Same.
3410 * gfortran.dg/graphite/id-6.f: Same.
3411 * gfortran.dg/graphite/id-9.f: Same.
3412 * gfortran.dg/graphite/interchange-1.f: Same.
3413 * gfortran.dg/graphite/interchange-2.f: Same.
3414 * gfortran.dg/graphite/scop-1.f: Same.
c6bb733d 3415
34162009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3417
3418 * sese.c (expand_scalar_variables_call): New.
3419 (expand_scalar_variables_ssa_name): Handle calls in expander.
3420
34212009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3422
6c9df8cb 3423 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
c6bb733d 3424 Expect to see the pattern twice.
6c9df8cb 3425 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3426 * gcc.dg/graphite/interchange-5.c: Same.
3427 * gcc.dg/graphite/interchange-6.c: Same.
c6bb733d 3428
34292009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3430
6c9df8cb 3431 * gcc.dg/graphite/id-10.c: New.
3432 * gcc.dg/graphite/id-12.c: New.
3433 * gfortran.dg/graphite/id-7.f: New.
3434 * gfortran.dg/graphite/id-8.f: New.
c6bb733d 3435
34362009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3437
3438 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3439 zero.
3440
34412009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3442
3443 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3444
34452009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3446
3447 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3448
34492009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3450
3451 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3452 building PDR subscripts.
3453
34542009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3455
3456 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3457 computation of array sizes.
3458
34592009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3460
3461 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3462
34632009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3464
3465 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3466 build_pairwise_constraint, dr_equality_constraints,
3467 build_pairwise_scheduling_equality,
3468 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3469 build_lexicographically_gt_constraint, dependence_polyhedron,
3470 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3471 Move from NNC_Polyhedron to C_Polyhedron.
3472 * graphite-interchange.c (compute_array_size_poly,
3473 gather_access_strides): Dito.
3474 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3475 free_scop, pbb_number_of_iterations): Dito.
3476 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3477 pbb_dim_iter_domain, struct scop): Dito.
3478 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3479 new_Cloog_Domain_from_ppl_Polyhedron,
3480 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3481 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3482 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3483 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3484 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3485 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3486 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3487 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3488 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3489 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3490 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3491 build_scop_iteration_domain, build_poly_dr): Dito
3492
34932009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3494
6c9df8cb 3495 * gcc.dg/graphite/graphite.exp: Added a rule to execute
c6bb733d 3496 run-id-*.c files.
6c9df8cb 3497 * gcc.dg/graphite/run-id-1.c: New.
c6bb733d 3498
34992009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3500
3501 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3502 positivity constraint on the symbolic number of iterations.
3503
35042009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3505
3506 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3507
35082009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3509 Tobias Grosser <grosser@fim.uni-passau.de>
3510
3511 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3512 (build_cloog_prog): Directly use SCOP_CONTEXT.
3513 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3514 (free_scop): Free SCOP_CONTEXT.
3515 (print_scop_context): New.
3516 (print_scop): Call print_scop_context.
3517 (debug_scop_context): New.
3518 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3519 (struct scop): Added field context.
3520 (SCOP_CONTEXT): New.
3521 * graphite-sese-to-poly.c (add_param_constraints): New.
3522 (build_scop_context): New.
3523 (build_poly_scop): Call build_scop_context.
3524
35252009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3526
3527 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3528 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3529 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3530 * graphite-ppl.h: Include double-int.h and tree.h.
3531 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3532 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3533 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3534 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3535
35362009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3537
3538 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3539 POINTER_PLUS_EXPR for pointer types.
3540 (clast_to_gcc_expression): Same.
3541
35422009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3543
3544 * graphite-poly.c (print_scattering_function): Early return when
3545 PBB_TRANSFORMED_SCATTERING is not initialized.
3546 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3547
35482009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3549
3550 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3551 to fix bootstrap.
3552
35532009-07-08 Razya Ladelsky <razya@il.ibm.com>
3554
3555 * tree-parloops.c (analyze_reduction_list): Change return
3556 value to void.
3557 (try_create_reduction_list): Move the call to
3558 analyze_reduction_list to the beginining.
3559 Call reduction_phi with analyzed_reductions as argument
3560 instead of reduction_list.
3561
35622009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3563
3564 * Merge from mainline (r148296:149346)
3565
35662009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3567
3568 * graphite-scop-detection.c (graphite_can_represent_init): New.
3569 (graphite_can_represent_scev): Call graphite_can_represent_init:
3570 check that the initial value does not contain multiplications of
3571 parameters.
3572 (stmt_has_simple_data_refs_p): New.
3573 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3574 (is_simple_operand): Fix formatting.
3575 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3576
35772009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3578
6c9df8cb 3579 * gcc.dg/graphite/id-13.c: New.
c6bb733d 3580 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3581 analyze_scalar_evolution, use scalar_evolution_in_region.
3582 (scan_tree_for_params_right_scev): Add extra assert.
3583 (parameter_index_in_region_1): Split from parameter_index_in_region.
3584 (idx_record_params): Use scalar_evolution_in_region.
3585 (find_params_in_bb): Same.
3586 (find_scop_parameters): Same.
3587 (build_loop_iteration_domains): Same.
3588 (create_linear_expr_from_tree): Same.
3589 * sese.c (scalar_evolution_in_region): New.
3590 * sese.h (scalar_evolution_in_region): Declared.
3591 (defined_in_sese_p): New.
3592 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3593 static anymore.
3594 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3595 Declared.
3596
35972009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3598
3599 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3600 TREE_DATA_REF_H also implies SCEV_H.
3601
36022009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3603
3604 * graphite-poly.c (print_scop_params): New.
3605 (print_scop): Call print_scop_params.
3606 (debug_scop_params): New.
3607 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3608
36092009-07-07 Li Feng <nemokingdom@gmail.com>
3610
6c9df8cb 3611 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3612 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3613 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3614 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3615 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3616 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
c6bb733d 3617
36182009-07-07 Li Feng <nemokingdom@gmail.com>
3619
3620 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3621 for dependency checking part.
6c9df8cb 3622 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
c6bb733d 3623 tests for dependency checking.
6c9df8cb 3624 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3625 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3626 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
c6bb733d 3627 flag -fdump-tree-graphite-all for autopar testsuites.
3628
36292009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3630
3631 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3632 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3633 canonicalize_loop_ivs): Moved...
3634 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3635
36362009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3637
3638 * tree-parloops.c (try_create_reduction_list): Pass an extra
3639 argument analyzed_reductions. Call analyze_reduction_list.
3640 (gen_parallel_loop): Do not call analyze_reduction_list.
3641 (parallelize_loops): Init and finalize analyzed_reductions.
3642
36432009-07-06 Li Feng <nemokingdom@gmail.com>
3644
6c9df8cb 3645 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 3646 Added flag -fno-loop-strip-mine for autopar testcase.
3647
36482009-07-04 Li Feng <nemokingdom@gmail.com>
3649
3650 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3651 transformed scattering dimension instead of unmatch orignal when
3652 calling dependence_polyhedron.
3653
36542009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3655
3656 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3657
36582009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3659
3660 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3661 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3662
36632009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3664
3665 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3666 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3667 * graphite-poly.c (pbb_number_of_iterations): New.
3668 * graphite-poly.h (pbb_number_of_iterations): Declared.
3669 (pbb_iterator_dim, pbb_parameter_dim): New.
3670
36712009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3672
3673 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3674 last commit on type of lower and upper bound of loops.
3675
36762009-06-29 Li Feng <nemokingdom@gmail.com>
3677
3678 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3679 graphite-dependences.h.
3680 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3681 (mark_bb_with_pbb): New.
3682 (get_stmtfor_depth): New.
3683 (find_pbb_via_hash): New.
3684 (dependency_in_loop_p): New.
3685 (mark_loops_parallel): New.
3686 (free_aux_in_new_loops): New.
3687 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3688 bb with it's relevant pbb. Mark newly created loops. Remove mark
3689 innermost loop parallel without checking.
3690 (gloog): Add parameter BB_PBB_MAPPING.
3691 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3692 (gloog): Change declaration.
3693 (mark_loop_parallel): Make extern.
3694 (free_aux_in_new_loops): Declare.
3695 (bb_pbb_map_hash): New.
3696 (eq_bb_pbb_map): New.
3697 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3698 auto parallelization when flag_graphite_force_parallel is set.
3699 (graphite_finalize): Added free_aux_in_new_loops.
3700 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3701 the innermost loop that marked parallel. Use
3702 flag_graphite_force_parallel instead of loop->can_be_parallel.
3703 (loop_parallel_p): Move inner most checking out of function.
3704
37052009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3706
3707 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3708 type of lower and upper bound of loops signed long int.
3709
37102009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3711
3712 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3713 expression outside the loop.
3714
37152009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3716
3717 * gcc.dg/graphite/interchange-8.c: New.
3718
37192009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3720
3721 * gcc.dg/graphite/interchange-0.c: XFailed.
3722 * gcc.dg/graphite/interchange-5.c: XFailed.
3723 * gcc.dg/graphite/interchange-6.c: XFailed.
3724
37252009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3726
3727 * graphite-interchange.c (compute_array_size_poly): The end of the
3728 recursion should return 1.
3729
37302009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3731
3732 * graphite-interchange.c (compute_array_size_cstr): Allow the
3733 subscript multiplier to be -1.
3734 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3735 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3736 data_container. Initializes PDR_DATA_CONTAINER.
3737 (print_pdr_access_layout): New.
3738 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3739 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3740 data_container.
3741 (PDR_DATA_CONTAINER): New.
3742 (new_poly_dr): Update declaration.
3743 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3744 (build_poly_dr): Call pdr_add_data_dimensions.
3745
37462009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3747
3748 * graphite-poly.h (struct poly_dr): Fix comment.
3749 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3750 (pdr_add_memory_accesses): New.
3751 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3752
37532009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3754
3755 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3756 (print_pbb): Add call to print_pdrs.
3757 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3758
37592009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3760 Li Feng <nemokingdom@gmail.com>
3761
3762 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3763 (dependency_between_pbbs_p): New.
3764 (lexicographically_gt_p): Assure !empty_p before polyhedron
3765 intersection assign.
3766 (build_lexicographically_gt_constraint): Correct lexicographically
3767 judging.
3768 * graphite-dependences.h: New.
3769 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3770
37712009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3772
3773 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3774 (gloog): Print to dump_file the generated clast.
3775 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3776 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3777
37782009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3779
3780 * graphite-poly.c (extend_scattering): Increment
3781 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3782
37832009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3784
3785 * graphite-interchange.c (compute_array_size_poly): Added exit of
3786 recursion condition. Continue iterating even after the first equality.
3787 (compute_array_size): Same.
3788
37892009-06-24 Li Feng <nemokingdom@gmail.com>
3790
6c9df8cb 3791 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
c6bb733d 3792 -fdump-tree-final_cleanup to -fdump-tree-optimized.
6c9df8cb 3793 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3794 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3795 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
c6bb733d 3796
37972009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3798
3799 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3800 only when the use verifies is_gimple_reg.
3801
38022009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3803
3804 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3805 Allocate scaldims after call to unify_scattering_dimensions.
3806
38072009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3808
3809 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3810
38112009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3812 Albert Cohen <albert.cohen@inria.fr>
3813
3814 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3815 variables for the strip mining.
3816
38172009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3818 Pranav Garg <pranav.garg2107@gmail.com>
3819
3820 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3821 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3822 (graphite-blocking.o): New rule.
3823 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3824 * graphite-blocking.c: New.
3825 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3826 flag_loop_strip_mine.
3827 (psct_scattering_dim_for_loop_depth): New.
3828 * graphite-poly.h (scop_do_strip_mine): Declared.
3829 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3830 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3831 flag_loop_strip_mine.
3832
38332009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3834
3835 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3836 a GMP value and a PPL coefficient at each iteration of a loop.
3837
38382009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3839
3840 * graphite-dependences.c (dependence_polyhedron): Do not use
3841 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3842 pbb_nb_scattering_transform.
3843 (graphite_legal_transform_dr): Same.
3844 * graphite-poly.c (extend_scattering): Same.
3845 (unify_scattering_dimensions): Same.
3846 (print_scattering_function): Same.
3847 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3848 PBB_NB_LOCAL_VARIABLES.
3849 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3850 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3851 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3852 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3853 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3854 (pbb_nb_scattering_transform): New.
3855 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3856 (psco_scattering_dim): Add assert on parameters.
3857 (psct_scattering_dim): Same.
3858 (psct_scattering_dim_for_loop_depth): Declared.
3859 (psct_local_var_dim): New.
3860 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3861 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3862 correct layout, call pbb_nb_local_vars.
3863 (psct_add_local_variable, psct_add_scattering_dimension): New.
3864 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3865 Initialize PBB_NB_SCATTERING_TRANSFORM.
3866
38672009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3868
3869 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3870 (set_coef): Renamed ppl_set_coef.
3871 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3872
38732009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3874
3875 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3876 test a boolean against 1.
3877 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3878 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3879 (pbb_do_interchange): Returns true when a transform has been performed.
3880 (scop_do_interchange): Same.
3881 * graphite-poly.c (apply_poly_transforms): Use the return value of
3882 scop_do_interchange.
3883 * graphite-poly.h (scop_do_interchange): Update declaration.
3884
38852009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3886
3887 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3888 after last use.
3889 * sese.c (sese_reset_aux_in_loops): New.
3890 * sese.h (sese_reset_aux_in_loops): New.
3891
38922009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3893
3894 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3895 multiplier and multiply the constant by the multiplier.
3896 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3897 (build_poly_dr): Do not use the multiplier to define the subscript.
3898
38992009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3900
3901 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3902 compiler's data reference. Initialize PDR_CDR.
3903 (print_pdr): Call dump_data_reference.
3904 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3905 Add compiler_dr field.
3906 (PDR_BB): Renamed PDR_PBB.
3907 (PDR_CDR): New.
3908 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3909 GCC's data reference representation.
3910 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3911 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3912
39132009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3914
3915 * graphite-poly.c (print_scattering_function): Also print the layout.
3916 * graphite-poly.h (pbb_nb_local_vars): New.
3917
39182009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3919
3920 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3921
39222009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3923
3924 * graphite-poly.c (print_pdr, debug_pdr): New.
3925 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3926 (PDR_BASE): Removed.
3927
39282009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3929
6c9df8cb 3930 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
c6bb733d 3931 ltrans-{1..6,8}.c.
3932
39332009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3934
3935 * graphite-interchange.c (compute_subscript): Allow also -1 in the
3936 subscript identification column.
3937 (pbb_do_interchange): Print to dump_file that some loops "will be
3938 interchanged". Rely on that chain of characters in the testcases.
3939 * gcc.dg/graphite/interchange-0.c: New.
3940 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
3941 interchange-*.c files and compile them with -floop-interchange.
3942
39432009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
3944
3945 * graphite-interchange.c (interchange_profitable_p): Renamed
3946 pbb_interchange_profitable_p.
3947
39482009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3949 Harsha Jagasia <harsha.jagasia@amd.com>
3950 Pranav Garg <pranav.garg2107@gmail.com>
3951
3952 * graphite-interchange.c (interchange_profitable_p): Make static.
3953 (pbb_interchange_loop_depths, pbb_do_interchange,
3954 scop_do_interchange): New.
3955 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
3956 for flag_loop_interchange.
3957 * graphite-poly.h (scop_do_interchange): Declared.
3958 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
3959 flag_loop_interchange is used.
3960
39612009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3962
3963 * graphite-dependences.c (dependence_polyhedron): Update use of
3964 pbb_nb_scattering_dims.
3965 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
3966 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
3967 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
3968 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
3969
39702009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3971
3972 * graphite.c: Cleanup foo.
3973
39742009-06-16 Sebastian Pop <sebastian.pop@amd.com>
3975
3976 * Merge from mainline (r143684:148293).
3977 * Disabled libpcp until it gets fixed.
3978
39792009-06-05 Sebastian Pop <sebastian.pop@amd.com>
3980 Harsha Jagasia <harsha.jagasia@amd.com>
3981
3982 * graphite-interchange.c: New.
3983 * Makefile.in (graphite-interchange.o): New.
3984 * graphite-poly.h (interchange_profitable_p): Declared.
3985 * graphite-ppl.h (value_max): New.
3986
39872009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3988
3989 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
3990 * graphite-poly.h: Fix some comments.
3991 (pdr_dim): New.
3992 (pdr_scop): New.
3993
39942009-06-04 Sebastian Pop <sebastian.pop@amd.com>
3995
3996 * graphite-poly.h
3997 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
3998 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
3999 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4000 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4001 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4002 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4003 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4004 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4005 * graphite-clast-to-gimple.c: Same.
4006 * graphite-dependences.c: Same.
4007 * graphite-poly.c: Same.
4008 * graphite-sese-to-poly.c: Same.
4009
40102009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4011
4012 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4013 expressions for an IV rename, as returned by clast_to_gcc_expression.
4014 (copy_renames): Rename new_name to expr.
4015 * sese.c (debug_rename_elt): Same.
4016 (get_rename): Same.
4017 (set_rename): Same.
4018 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4019 the information from the rename map.
4020 (rename_variables_in_stmt): Same.
4021 (add_loop_exit_phis): Rename new_name to expr.
4022 (insert_loop_close_phis): Same.
4023 (add_guard_exit_phis): Same. Call force_gimple_operand.
4024 * sese.h (struct rename_map_elt): Rename new_name to expr.
4025 (new_rename_map_elt): Same.
4026
40272009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4028
4029 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4030 * sese.c (set_rename): Make it extern.
4031 * sese.h (set_rename): Declared.
4032
40332009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4034
4035 * graphite-poly.c (extend_scattering): Free values.
4036 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4037 Free iterators.
4038 (ppl_print_powerset_matrix): Same.
4039 * graphite-scop-detection.c (free_scops_1): New.
4040 (limit_scops): Call free_scops_1.
4041 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4042 (build_poly_dr): Free PPL coefficients.
4043 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4044
40452009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4046
4047 * graphite-dependences.c: New.
4048 * graphite-data-ref.c: Removed.
4049 * graphite-data-ref.h: Removed.
4050 * Makefile.in (graphite-data-ref.o): Removed.
4051 (graphite-dependences.o): Added.
4052 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4053 * graphite-poly.c: Same.
4054 Move the data dependence testing to graphite-dependences.c.
4055
40562009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4057
4058 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4059 from graphite_cannot_represent_loop. Code refactored.
4060 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4061
40622009-05-17 Li Feng <nemokingdom@gmail.com>
4063
6c9df8cb 4064 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 4065 Cover all the testcases (not only the filtered ones).
4066
40672009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4068
4069 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4070 unnecessary check. Update comments. Move check for REAL_TYPE here.
4071 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4072 done in (stmt_simple_for_scop_p).
4073
40742009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4075
4076 * graphite.c (print_global_statistics): New.
4077 (print_graphite_scop_statistic): New.
4078 (print_graphite_statistics): New.
4079 (graphite_initialize, graphite_transform_loops): Print statistics.
4080 * graphite-scop-detection (build_scops): Print statistics.
4081 (print_graphite_scop_statistics): New.
4082 (print_graphite_statistics): New.
4083
40842009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4085
4086 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4087 (debug_clast_name_index): Removed.
4088 (debug_clast_name_indexes_1): Removed.
4089 (debug_clast_name_indexes): Removed.
4090 (clast_name_index_elt_info): Removed.
4091 (eq_clast_name_indexes): Removed.
4092 (clast_name_to_index): Removed.
4093 (new_clast_name_index): Removed.
4094 (save_clast_name_index): Removed.
4095 (save_var_name): Moved...
4096 (init_sese_params_index): Removed.
4097 (clast_name_to_gcc): Remove use of name_tree.
4098 (initialize_cloog_names): Same.
4099 (gloog): Do not call init_sese_params_index.
4100 * graphite-sese-to-poly.c (save_var_name): ...here.
4101 (parameter_index_in_region): New.
4102 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4103 (parameter_index_in_region): Removed.
4104 (is_parameter): Remove use of name_tree.
4105 * sese.h (struct name_tree): Removed.
4106 (struct sese): Remove use of name_tree. New field params_names.
4107 (SESE_PARAMS_NAMES): New.
4108 (SESE_PARAMS): Remove duplicate.
4109 (parameter_index_in_region): Removed.
4110 (sese_nb_params): Remove use of name_tree.
4111 (struct clast_name_index): New.
4112 (new_clast_name_index): New.
4113 (clast_name_to_index): New.
4114 (save_clast_name_index): New.
4115 (debug_clast_name_index): New.
4116 (debug_clast_name_indexes_1): New.
4117 (debug_clast_name_indexes): New.
4118 (clast_name_index_elt_info): New.
4119 (eq_clast_name_indexes): New.
4120
41212009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4122
4123 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4124 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4125 (graphite_loop_normal_form): Do not pass region. Do not
4126 initialize SESE_OLDIVS.
4127 (build_graphite_loop_normal_form): Update call to
4128 graphite_loop_normal_form.
4129 * sese.c (debug_oldivs): Removed.
4130 (new_sese): Do not initialize SESE_OLDIVS.
4131 (free_sese): Do not free SESE_OLDIVS.
4132 (oldiv_for_loop): Removed.
4133 * sese.h (struct sese): Remove old_ivs.
4134 (SESE_OLDIVS): Removed.
4135 (oldiv_for_loop): Removed.
4136
41372009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4138
4139 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4140 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4141 replaced by a call to newivs_to_depth_to_newiv.
4142 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4143 (clast_to_gcc_expression_red): Same.
4144 (gcc_type_for_clast_expr): Same.
4145 (gcc_type_for_clast_eq): Same.
4146 (graphite_translate_clast_equation): Same.
4147 (graphite_create_guard_cond_expr): Same.
4148 (graphite_create_new_guard): Same.
4149 (graphite_create_new_loop): Same.
4150 (build_iv_mapping): Same.
4151 (translate_clast): Same.
4152 (gloog): Same.
4153 (loop_iv_stack_patch_for_consts): Removed. *
4154 sese.c (iv_stack_entry_is_constant): Removed.
4155 (iv_stack_entry_is_iv): Removed.
4156 (loop_iv_stack_push_iv): Removed.
4157 (loop_iv_stack_insert_constant): Removed.
4158 (loop_iv_stack_pop): Removed.
4159 (loop_iv_stack_get_iv): Removed.
4160 (loop_iv_stack_get_iv_from_name): Removed.
4161 (debug_loop_iv_stack): Removed.
4162 (free_loop_iv_stack): Removed.
4163 (loop_iv_stack_remove_constants): Removed. *
4164 sese.h (iv_stack_entry_kind): Removed.
4165 (iv_stack_entry_data_union): Removed.
4166 (iv_stack_entry_struct): Removed.
4167 (iv_stack_entry_p): Removed.
4168 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4169 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4170 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4171 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4172 (gbb_loop_at_index): Fix indenting.
4173 (gbb_loop_index): Removed.
4174
41752009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4176
4177 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4178 Call clast_name_to_index.
4179
41802009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4181
4182 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4183 do not pass params. Get params from SESE_PARAMS.
4184 (clast_to_gcc_expression): Same.
4185 (clast_to_gcc_expression_red): Same.
4186 (gcc_type_for_clast_eq): Same.
4187 (graphite_translate_clast_equation): Same.
4188 (graphite_create_new_loop): Same.
4189 * sese.c (rename_variables_in_stmt): Fix comment.
4190
41912009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4192
4193 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4194 newivs_index.
4195 Call save_clast_name_index.
4196 (translate_clast): Pass newivs_index.
4197 (gloog): Create and free newivs_index.
4198
41992009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4200
4201 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4202 (clast_name_index_p): New type.
4203 (debug_clast_name_index): New.
4204 (debug_clast_name_indexes_1): New.
4205 (debug_clast_name_indexes): New.
4206 (clast_name_index_elt_info): New.
4207 (eq_clast_name_indexes): New.
4208 (clast_name_to_index): New.
4209 (new_clast_name_index): New.
4210 (save_clast_name_index): New.
4211 (init_sese_params_index): New.
4212 (gloog): Call init_sese_params_index.
4213 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4214 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4215 (free_sese): Free SESE_PARAMS_INDEX.
4216 * sese.h (struct sese): Add params_index.
4217 (SESE_PARAMS_INDEX): New.
4218
42192009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4220
4221 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4222 (graphite_create_new_loop): Pass the newivs vector. Push the
4223 newly created IV to newivs.
4224 (translate_clast): Pass the newivs vector.
4225 (gloog): Create and destroy the newivs vector.
4226
42272009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4228
4229 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4230 (graphite_loop_normal_form): Initialize loop->aux with the unique
4231 IV that has been created.
4232
42332009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4234
4235 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4236 scev with parameters in the base part. They where forbidden
4237 exidently.
4238
42392009-05-11 Li Feng <nemokingdom@gmail.com>
4240
6c9df8cb 4241 * gcc.dg/graphite/graphite.exp: Set different default
c6bb733d 4242 compile options by file names.
6c9df8cb 4243 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4244 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4245 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4246 * gcc.dg/graphite/scop-matmult.c: Ditto.
c6bb733d 4247
42482009-05-08 Li Feng <nemokingdom@gmail.com>
4249
6c9df8cb 4250 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4251 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4252 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4253 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
c6bb733d 4254
42552009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4256
4257 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4258 by final cleanup.
4259
42602009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4261
4262 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4263 allow integer constant strides.
4264 (graphite_can_represent_expr): Depend on outermost_loop.
4265 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4266 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4267 build_scops_1): Same.
4268 (scopdet_basic_block_info): Same and insert layered SCoP
4269 detection.
4270 (try_generate_gimple_bb): Cleanup.
4271 (build_scops): Enable data references.
4272
6c9df8cb 4273 * gcc.dg/graphite/id-5.c: New.
4274 * gcc.dg/graphite/id-9.c: New.
c6bb733d 4275 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4276 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4277
42782009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4279
4280 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4281 that we have not yet built for this SCoP.
4282
42832009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4284
4285 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4286 for complex numbers.
4287
42882009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4289
4290 * graphite-ppl.c: Fix build if cloog is not available.
4291
42922009-05-04 Li Feng <nemokingdom@gmail.com>
4293
4294 * tree-parloops.c (loop_parallel_p): Remove construction of
4295 NITER and REDUCTION_LIST.
4296 (try_get_loop_niter): New.
4297 (try_create_reduction_list): New.
4298 (parallelize_loops): Bypass the failed checkings in autopar
4299 when can_be_parallel in loop structure is set to true.
4300
43012009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4302
6c9df8cb 4303 * gcc.dg/graphite/id-6.c: Update testcase.
4304 * gcc.dg/graphite/scop-3.c: Dito.
c6bb733d 4305
43062009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4307
4308 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4309 Enable EQ_EXPR and NE_EXPR again.
4310
43112009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4312
4313 * graphite-scop-detection.c (graphite_can_represent_scev):
4314 Add check if scev is affine multivariate.
4315 (harmful_stmt_in_bb): Check if we can represent the conditions.
4316 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4317 harmful_stmt_in_bb.
6c9df8cb 4318 * gcc.dg/graphite/id-7.c: New.
c6bb733d 4319
43202009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4321
4322 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4323 Check all bbs in region, not only the bbs that are represented in
4324 GRAPHITE.
4325 (build_poly_scop): Add newline.
6c9df8cb 4326 * gcc.dg/graphite/id-8.c: New.
c6bb733d 4327
43282009-04-30 Li Feng <nemokingdom@gmail.com>
4329
4330 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4331 when loop initialize.
4332 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4333 * common.opt: Declare flag_graphite_force_parallel.
4334 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4335 loop parallel.
4336 * graphite-poly.c (apply_poly_transforms): Introduce
4337 flag_graphite_force_parallel.
4338 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4339 * toplev.c (process_options): ditto and replace a not correctly
4340 encoded space.
4341
43422009-04-30 Li Feng <nemokingdom@gmail.com>
4343
4344 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4345 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4346 to the redefinition.
4347 (compute_cloog_iv_types_1): ditto.
4348 (build_iv_mapping): ditto.
4349 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4350 initialization.
4351 (free_gimple_bb): Removed GBB_LOOPS related free part.
4352 (build_bb_loops): Removed.
4353 * sese.h (struct gimple_bb): Removed loops.
4354 (GBB_LOOPS): Removed.
4355 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4356 (gbb_loop_index): ditto.
4357
43582009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4359
4360 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4361 allow non constant strides.
6c9df8cb 4362 * gcc.dg/graphite/scop-20.c: New.
c6bb733d 4363
43642009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4365
4366 * graphite-scop-detection.c (dot_all_scops): Fix system call
4367 return value warning.
4368 (dot_scop): Same.
4369
43702009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4371
6c9df8cb 4372 * gcc.dg/graphite/id-6.c: Fix pattern.
4373 * gcc.dg/graphite/scop-3.c: Same.
c6bb733d 4374
43752009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4376
4377 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4378 build_pairwise_constraint, dr_equality_constraints,
4379 build_pairwise_scheduling_equality,
4380 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4381 build_lexicographically_gt_constraint, dependence_polyhedron,
4382 graphite_legal_transform_dr, graphite_legal_transform_bb,
4383 graphite_legal_transform): New.
4384 * graphite-poly.h (graphite_legal_transform): Declared.
4385 * graphite-sese-to-poly.c (build_poly_scop): Call to
4386 graphite_legal_transform is disabled for the moment.
4387
43882009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4389
4390 * graphite-poly.h (pbb_nb_scattering_dims): New.
4391 (pbb_nb_scattering): Use it.
4392
43932009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4394
4395 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4396 Pointset_Powerset version of ppl_insert_dimensions.
4397 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4398
43992009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4400
4401 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4402
44032009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4404
4405 * graphite-poly.h: Fix comment.
4406
44072009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4408
4409 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4410
44112009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4412
4413 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4414 statements.
4415
44162009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4417
4418 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4419 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4420 conditions.
4421
44222009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4423
4424 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4425 handle EQ_EXPR and NE_EXPR.
4426
44272009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4428
4429 * graphite-poly.h (poly_dr): Fix comment.
4430
44312009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4432 Tobias Grosser <grosser@fim.uni-passau.de>
4433
4434 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4435 with a zero dimension polyhedron.
4436 (find_scop_parameters): Move the call to scop_set_nb_params here.
4437 (build_loop_iteration_domains): Store in loop->aux the iteration
4438 domain polyhedron.
4439 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4440 by any loop in scop.
4441 (build_poly_scop): Do not call scop_set_nb_params.
4442
44432009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4444 Tobias Grosser <grosser@fim.uni-passau.de>
4445
4446 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4447 add_condition_to_domain not GT_EXPR.
4448
44492009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4450
4451 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4452 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4453 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4454 upper_bound_assign to calculate unions.
6c9df8cb 4455 * gcc.dg/graphite/id-6.c: New.
c6bb733d 4456
44572009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4458
4459 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4460 handle abnormal edges.
4461
44622009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4463
4464 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4465 (free_poly_bb): Also free poly_drs.
4466 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4467 (poly_dr): Polyhedron to Pointset_Powerset.
4468 (pdr_accessp_nb_subscripts): Same.
4469 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4470 poly_drs.
4471
44722009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4473
4474 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4475 names into more meaningful names.
4476
44772009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4478
6c9df8cb 4479 * gfortran.dg/graphite/interchange-1.c: New.
4480 * gfortran.dg/graphite/interchange-2.c: New.
c6bb733d 4481
44822009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4483
4484 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4485 the reduction_list.
4486 * tree-parloops.c (rewrite_phi_with_iv): New.
4487 (rewrite_all_phi_nodes_with_iv): New.
4488 (canonicalize_loop_ivs): Call them.
4489
44902009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4491
4492 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4493 graphite_find_data_references_in_stmt.
4494 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4495 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4496
44972009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4498
4499 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4500
45012009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4502
4503 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4504 instead of bb_in_region.
4505 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4506 (build_sese_conditions): Use flag_bb_in_sese.
4507 * sese.c (register_bb_in_sese): Removed.
4508 (new_sese): Remove initialization of SESE_REGION_BBS.
4509 (free_sese): Do not free SESE_REGION_BBS.
4510 * sese.h (struct sese): Remove field region_basic_blocks.
4511 (SESE_REGION_BBS): Removed.
4512 (bb_in_sese_p): Implement in function of bb_in_region.
4513
45142009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4515
4516 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4517 loops.
4518
45192009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4520
4521 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4522 and EQ_EXPR.
4523 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4524 (add_condition_to_domain): New.
4525 (add_condition_to_pbb): New.
4526 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
6c9df8cb 4527 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
c6bb733d 4528
45292009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4530
4531 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4532 ppl_Pointset_Powerset.
4533 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4534 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4535 (pbb_nb_loops): Same.
4536 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4537 add_conditions_to_domain): Same.
4538 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4539 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4540 ppl_const_Polyhedron_t.
4541 (ppl_print_powerset_matrix): New.
4542 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4543 ppl_print_powerset_matrix): New.
4544 (ppl_print_polyhedron_matrix): Updated.
4545
45462009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4547
4548 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4549
45502009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4551
4552 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4553 (print_iteration_domains, debug_iteration_domain,
4554 debug_iteration_domains): New.
4555 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4556 debug_iteration_domains): Declared.
4557 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4558 indenting.
4559
45602009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4561 Sebastian Pop <sebastian.pop@amd.com>
4562
4563 * graphite-poly.h (print_iteration_domain): New.
4564 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4565 (build_sese_conditions_1, build_sese_conditions_after,
4566 build_sese_conditions_before): New.
4567 (build_sese_conditions): Rewritten.
4568
45692009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4570 Tobias Grosser <grosser@fim.uni-passau.de>
4571
4572 Cleanup of code generation liveouts.
4573 * graphite-clast-to-gimple.c (translate_clast): Use a single
4574 rename_map instead of one per translated statement.
4575 Do not use SESE_LIVEOUT_RENAMES.
4576 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4577 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4578 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4579 phi node of a reduction: when a loop contains a reduction used outside
4580 the loop, there should be a scalar close phi node on the exit block.
4581 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4582 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4583 (free_sese): Do not free them.
4584 (sese_build_liveouts_use): Do not use them.
4585 (sese_build_liveouts_bb): Same.
4586 (sese_build_liveouts): Same.
4587 (sese_insert_phis_for_liveouts): Same.
4588 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4589 (defined_in_loop_p): New.
4590 (alive_after_loop): New.
4591 (close_phi_not_yet_inserted_p): New.
4592 (struct alep, alep_p): New.
4593 (add_loop_exit_phis): Remove from the rename_map all the names defined
4594 in the code generated loop.
4595 (insert_loop_close_phis): Traverse the rename_map passed to it.
4596 Don't use SESE_LIVEOUT_RENAMES.
4597 (default_liveout_before_guard): Renamed default_before_guard.
4598 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4599 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4600 (register_sese_liveout_renames): Removed.
4601 (copy_bb_and_scalar_dependences): Do not call it.
4602 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4603 reduction_list.
4604 (SESE_LIVEOUT): Removed.
4605 (SESE_LIVEOUT_RENAMES): Removed.
4606 (SESE_REDUCTION_LIST): Removed.
4607 (sese_build_liveouts): Removed.
4608 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4609 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4610 (insert_guard_phis): Same.
4611 (rename_map_elt): Declare a VEC of them.
4612 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4613 trees not pointers to trees.
4614
4615 Rewrite in canonical close SSA form:
4616 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4617 (limit_scops): Close the scop after the block containing the close phi
4618 nodes.
4619 (canonicalize_loop_closed_ssa): New.
4620 (canonicalize_loop_closed_ssa_form): New.
4621 (build_scops): Call canonicalize_loop_closed_ssa_form.
4622
4623 * graphite-sese-to-poly.c: Fix typos.
4624
46252009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4626
4627 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4628 Extended.
4629 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4630 (print_pbb): Add conditions.
4631
46322009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4633 Sebastian Pop <sebastian.pop@amd.com>
4634
4635 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4636 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4637 (build_scop_bbs_1): New.
4638 (build_scop_bbs): Rewrite.
4639 * sese.h (bb_in_region): New.
4640
46412009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4642
4643 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4644 poly_drs vector.
4645 (print_scop): Style.
4646 * graphite-poly.h (poly_bb): Add drs vector.
4647 (PBB_DRS): Add accessor.
4648 * graphite-sese-to-poly.c (build_poly_dr): New.
4649 (build_pbb_drs, build_scop_drs): New.
4650 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4651
46522009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4653
4654 * tree-ssa-loop.c: Include forgotten toplev.h
4655
46562009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4657
4658 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
6c9df8cb 4659 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4660 * gcc.dg/graphite/pr37928.c: Same
4661 * gcc.dg/graphite/pr38409.c: Same
4662 * gcc.dg/graphite/pr38498.c: Same
4663 * gcc.dg/graphite/pr38559.c: Same
4664 * gcc.dg/graphite/pr39335.c: Same
4665 * gcc.dg/graphite/pr39335_1.c: Same
4666 * gfortran.dg/graphite/block-2.f: Same
c6bb733d 4667 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4668 with -floop-*.
4669
46702009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4671
4672 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4673 build_access_matrix, build_scop_data_accesses): Remove access function
4674 building. (We get a new version soon).
4675 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4676 * sese.h (nb_loops_around_loop_in_sese): Remove.
4677 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4678
46792009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4680 Sebastian Pop <sebastian.pop@amd.com>
4681
4682 * graphite-scop-detection.c (struct scopdet_info): Rename last
4683 field to exit.
4684 (scopdet_basic_block_info, build_scops_1): Don't use
4685 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4686
46872009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4688 Sebastian Pop <sebastian.pop@amd.com>
4689
4690 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4691 * sese.c (sese_build_liveouts_use): Renamed from
4692 sese_build_livein_liveouts_use. Remove liveins.
4693 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4694 Call sese_build_liveouts_use.
4695 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4696 Call sese_build_liveouts_bb.
4697 (new_sese, free_sese): Remove liveins.
4698 (sese_add_exit_phis_var): Deleted.
4699 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4700 directly.
4701 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4702
4703 * sese.h (sese): Remove num_ver and livein.
4704 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4705
47062009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4707
4708 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4709
47102009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4711
4712 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4713 (build_scop_scattering): Do not use compare_prefix_loops any more.
4714 (nb_common_loops): New.
4715
47162009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4717
4718 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4719 (register_old_and_new_names): Renamed set_rename.
4720
47212009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4722
4723 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4724 of the decl from the previous commit.
4725
47262009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4727
4728 * graphite-scop-detection.c (dot_scop): New.
4729 * graphite-scop-detection.h (dot_scop): Declared.
4730
47312009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4732
4733 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4734
47352009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4736
4737 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4738 condition at the end of the loop.
4739 * graphite.c (graphite_initialize, graphite_finalize): Print to
4740 dump_file the compiled function.
4741 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4742 of create_empty_loop_on_edge.
4743 (translate_clast): Update the code generation of loops for the new
4744 shape of loops.
4745 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4746
47472009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4748
4749 Reverted the patch from 2009-03-19.
4750
47512009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4752
4753 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4754 poly_drs vector.
4755 (print_scop): Style.
4756 * graphite-poly.h (poly_bb): Add drs vector.
4757 (PBB_DRS): Add accessor.
4758 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4759 (build_access_matrix_with_af, build_access_matrix,
4760 build_scop_data_accesses): Delete.
4761 (build_poly_dr): New.
4762 (build_pbb_drs, build_scop_drs): New.
4763 (build_poly_scop): call build_scop_drs.
4764
47652009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4766
4767 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4768 once per basic block.
4769
47702009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4771
4772 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4773 (graphite_can_represent_expr): Renamed from loop_affine_expr
4774 and enhanced.
4775 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4776 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4777 (scopdet_basic_block_info): Actually define entry_block.
4778 (stmt_simple_memref_p): Moved here from ...
4779
4780 * tree-data-ref.c (stmt_simple_memref_p): here.
4781 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4782
47832009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4784
6c9df8cb 4785 * gcc.dg/graphite/id-4.c: New.
c6bb733d 4786
47872009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4788
4789 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4790 (register_old_and_new_names): Update the content of the map.
4791 When there was already a rename_map_elt in the map at that
4792 location, free it.
4793 (copy_bb_and_scalar_dependences): Do rename_variables after
4794 expand_scalar_variables.
4795 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4796 of the map. When there was already a rename_map_elt in the
4797 map at that location, free it.
4798 (translate_clast): Pass the rename_map. Do not initialize and free
4799 a rename_map per stmt_user.
4800 (gloog): Initialize and free one rename_map and pass it to
4801 translate_clast.
4802
48032009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4804
4805 * sese.c (expand_scalar_variables_stmt,
4806 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4807 parameter.
4808 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4809 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4810 the gimple_stmt_iterator of the statement to be expanded.
4811 * graphite-scop-detection.c (is_simple_operand): Do handle
4812 REALPART_EXPR.
4813
48142009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4815
4816 * graphite-scop-detection.c (is_simple_operand): Do not handle
4817 REALPART_EXPR.
6c9df8cb 4818 * gcc.dg/graphite/id-2.c: New.
c6bb733d 4819
4820 * graphite-sese-to-poly.c (build_bb_loops,
4821 add_value_to_dim, scan_tree_for_params_right_scev,
4822 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4823 find_params_in_bb, build_loop_iteration_domains,
4824 add_conditions_to_domain): Remove subtract.
4825
48262009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4827
4828 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4829 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4830 pbb_loop_at_index -> gbb_loop_at_index.
4831 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4832 (debug_loop_vec): Delete.
4833 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4834 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4835 (PBB_LOOPS): Removed.
4836 (PBB_BLACK_BOX): Insert cast.
4837 (pbb_set_black_box): New setter.
4838 (pbb_loop_at_index, pbb_loop_index): Removed.
4839 (scop_set_region, scop_set_nb_params): New.
4840 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4841 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4842 (build_poly_scop): Use scop_set_nb_params.
4843 * sese.h (gimple_bb): Add LOOPS.
4844 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4845
48462009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4847
4848 Revert previous commit.
4849
48502009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4851
4852 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4853 (register_old_and_new_names): Update the content of the map.
4854 When there was already a rename_map_elt in the map at that
4855 location, free it.
4856 (copy_bb_and_scalar_dependences): Do rename_variables after
4857 expand_scalar_variables.
4858 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4859 of the map. When there was already a rename_map_elt in the
4860 map at that location, free it.
4861 (translate_clast): Pass the rename_map. Do not initialize and free
4862 a rename_map per stmt_user.
4863 (gloog): Initialize and free one rename_map and pass it to
4864 translate_clast.
4865
48662009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4867
4868 Remove forgotten line in revert.
4869
48702009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4871
4872 Revert previous commit.
4873
48742009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4875
4876 * sese.c (register_old_and_new_names): Update the content
4877 of the map. When there was already a rename_map_elt in the
4878 map at that location, free it.
4879 (copy_bb_and_scalar_dependences): Do rename_variables after
4880 expand_scalar_variables.
4881 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4882 of the map. When there was already a rename_map_elt in the
4883 map at that location, free it.
4884 (translate_clast): Pass the rename_map. Do not initialize and free
4885 a rename_map per stmt_user.
4886 (gloog): Initialize and free one rename_map and pass it to
4887 translate_clast.
4888
48892009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4890
4891 * graphite-clast-to-gimple.c (translate_clast): context_loop
4892 is never NULL.
4893
48942009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4895 Sebastian Pop <sebastian.pop@amd.com>
4896
4897 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4898 of the use of ppl_Polyhedron_map_space_dimensions.
4899
49002009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4901 Sebastian Pop <sebastian.pop@amd.com>
4902
4903 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4904 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4905 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4906 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4907 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4908 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4909 pbb_nb_params): New.
4910 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4911 nb_loops_around_pbb): Adapt return types.
4912
49132009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4914
4915 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4916 graphite-clast-to-gimple.o, graphite-data-ref.o,
4917 graphite-scop-detection.o, graphite-poly.o): Add
4918 more headers.
4919
49202009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4921
4922 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4923 graphite-clast-to-gimple.o, graphite-data-ref.o,
4924 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4925
49262009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4927
6c9df8cb 4928 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4929 * gcc.dg/graphite/pr37828.c: Same.
4930 * gcc.dg/graphite/pr37684.c: Same.
4931 * gcc.dg/graphite/block-0.c: Same.
4932 * gcc.dg/graphite/block-1.c: Same.
4933 * gcc.dg/graphite/block-2.c: Same.
4934 * gcc.dg/graphite/block-3.c: Same.
4935 * gcc.dg/graphite/block-4.c: Same.
4936 * gcc.dg/graphite/block-5.c: Same.
4937 * gcc.dg/graphite/block-6.c: Same.
4938 * gfortran.dg/graphite/pr38083.f90: Same.
4939 * gfortran.dg/graphite/block-1.f90: Same.
4940 * gfortran.dg/graphite/block-3.f90: Same.
4941 * gfortran.dg/graphite/pr37852.f90: Same.
4942 * gfortran.dg/graphite/block-4.f90: Same.
4943 * gfortran.dg/graphite/pr37980.f90: Same.
4944 * gfortran.dg/graphite/pr38953.f90: Same.
4945 * gfortran.dg/graphite/pr37857.f90: Same.
c6bb733d 4946 * opts.c: Remove -floop-block from -O2.
4947 * graphite-poly.c: Fail if -floop-block -floop-interchange or
4948 -floop-strip-mine are used.
4949
49502009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4951 Sebastian Pop <sebastian.pop@amd.com>
4952
4953 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
4954 dimensions.
4955 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
4956 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
4957 strip_mine_profitable_p, is_interchange_valid,
4958 graphite_trans_bb_block, graphite_trans_loop_block,
4959 graphite_trans_scop_block): Temporary removed.
4960 (extend_scattering, unify_scattering_dimensions): New.
4961 (print_scattering_function, graphite_read_transforms):
4962 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4963 (graphite_generate_scattering_fns): Removed.
4964 (apply_poly_transforms): Cleanup.
4965 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4966 (schedule_to_scattering): Moved.
4967 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
4968 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
4969 (pbb_nb_scattering): New.
4970 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
4971 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
4972 Removed.
4973 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
4974 shift_poly.
4975 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
4976 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
4977 -> PBB_TRANSFORMED_SCATTERING.
4978 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
4979 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
4980 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
4981 (check_poly_representation): Do not return bool.
4982 (graphite_transform_loops): Reformat.
4983 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
4984
49852009-03-04 Sebastian Pop <sebastian.pop@amd.com>
4986
4987 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
4988 debug_pbb_domain, debug_pbb, debug_scop): New.
4989 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
4990 debug_pbb_domain, debug_pbb, debug_scop): Declared.
4991
49922009-03-02 Sebastian Pop <sebastian.pop@amd.com>
4993
4994 PR middle-end/39335
4995 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
4996 when the type precision of the induction variable should be
4997 larger than the type precision of nit.
4998 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
4999 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5000 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5001
6c9df8cb 5002 * gcc.dg/graphite/pr39335_1.c: New.
5003 * gcc.dg/graphite/pr39335.c: New.
c6bb733d 5004
50052009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5006
5007 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5008 SSA_NAMES not struct reduction_info.
5009
50102009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5011
5012 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5013
50142009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5015 Tobias Grosser <grosser@fim.uni-passau.de>
5016
5017 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5018 (free_sese): Free SESE_REDUCTION_LIST.
5019 * sese.h (struct sese): Add field reduction_list.
5020 (SESE_REDUCTION_LIST): New.
5021 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5022 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5023
50242009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5025 Tobias Grosser <grosser@fim.uni-passau.de>
5026
5027 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5028 of loop_p.
5029
50302009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5031 Tobias Grosser <grosser@fim.uni-passau.de>
5032
5033 * tree-parloops.c (struct brli, build_reduction_list_info,
5034 analyze_reduction_list, gather_scalar_reductions): New.
5035 (loop_parallel_p): Build a reduction list containing only
5036 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5037 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5038 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5039 * tree-flow.h (gather_scalar_reductions): Declared.
5040
50412009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5042
5043 PR middle-end/39308
5044 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5045 number_of_iterations_exit from a gcc_assert.
5046
50472009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5048 Jan Sjodin <jan.sjodin@amd.com>
5049
5050 * output.h (graphite_out_file, graphite_in_file): Declared.
5051 * toplev.c (graphite_out_file, graphite_in_file): New.
5052 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5053 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5054 Don't call schedule_to_scattering.
5055 * common.opt (fgraphite-write, fgraphite-read): New.
5056 * graphite-poly.c: Include output.h.
5057 (print_scattering_function, print_scattering_functions,
5058 debug_scattering_function, debug_scattering_functions,
5059 graphite_write_transforms, graphite_read_transforms,
5060 graphite_generate_scattering_fns): New.
5061 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5062 Call graphite_generate_scattering_fns, graphite_write_transforms,
5063 graphite_read_transforms.
5064 (new_poly_bb): Initialize PBB_SCATTERING.
5065 (free_poly_bb): Free PBB_SCATTERING.
5066 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5067 * graphite-poly.h (struct poly_bb): Add field scattering.
5068 (PBB_SCATTERING): New.
5069 (print_scattering_function, print_scattering_functions,
5070 debug_scattering_function, debug_scattering_functions): Declared.
5071 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5072 GMP values, not integers!
5073 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5074 ppl_read_polyhedron_matrix): New.
5075 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5076 debug_ppl_polyhedron_matrix,
5077 ppl_read_polyhedron_matrix): Declared.
5078 * Makefile.in (graphite-poly.o): Depends on output.h.
5079
50802009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5081 Tobias Grosser <grosser@fim.uni-passau.de>
5082
5083 Revert this change:
5084 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5085 scalar evolutions in the scop_entry->loop_father.
5086
50872009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5088 Tobias Grosser <grosser@fim.uni-passau.de>
5089
5090 * graphite.h (ref_nb_loops): Remove declaration.
5091 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5092 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5093 debug_gbb): Moved to sese.h.
5094 * sese.h: As said.
5095
50962009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5097 Tobias Grosser <grosser@fim.uni-passau.de>
5098
5099 * graphite-data-ref.[ch]: Disable.
5100
51012009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5102 Tobias Grosser <grosser@fim.uni-passau.de>
5103
5104 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5105 scalar evolutions in the scop_entry->loop_father.
5106
51072009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5108
5109 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5110 (graphite_cannot_represent_loop_niter): Renamed
5111 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5112 (limit_scops): build_sese_loop_nests does not return a bool.
5113 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5114 * sese.c (nb_reductions_in_loop): ... from here.
5115 (graphite_loop_normal_form): ... from here.
5116 (sese_record_loop): Does not fail, so does not return a bool.
5117 (build_sese_loop_nests): Same.
5118 * sese.h (build_sese_loop_nests): Update declaration.
5119 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5120 (build_graphite_loop_normal_form): New.
5121 (gloog): Call build_graphite_loop_normal_form.
5122 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5123 build_sese_loop_nests.
5124
6c9df8cb 5125 * gcc.dg/graphite/id-1.c: New.
c6bb733d 5126
51272009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5128 Tobias Grosser <grosser@fim.uni-passau.de>
5129
5130 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5131 The SCoP detection fix is sufficient.
5132
51332009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5134
5135 PR tree-optimization/39260
5136 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5137 the basic block contains a condition with a real type.
5138 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5139
5140 * gcc.dg/graphite/pr39260.c: New.
5141
51422009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5143
5144 * graphite-poly.c: Inlcude params.h.
5145 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5146 the size of a tile.
5147 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5148 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5149
51502009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5151 Tobias Grosser <grosser@fim.uni-passau.de>
5152
5153 * graphite-scop-detection.c (dot_all_scops_1,
5154 dot_all_scops): Moved here.
5155 * graphite-scop-detection.h (dot_all_scops): Declared here.
5156 * graphite.c (graphite_initialize, graphite_finalize): New.
5157 (graphite_transform_loops): Cleaned up.
5158 * sese.c (debug_oldivs): Moved here.
5159 * graphite-poly.c (graphite_apply_transformations): Renamed
5160 apply_poly_transforms.
5161 (debug_loop_vec): Moved here.
5162 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5163 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5164 find_scop_parameters, build_scop_iteration_domain,
5165 add_conditions_to_constraints, build_scop_canonical_schedules,
5166 build_scop_data_accesses): Now static.
5167 (build_poly_scop, check_poly_representation): New.
5168
51692009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5170
5171 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5172 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5173 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5174 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5175 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5176 scan_tree_for_params, struct irp_data, dx_record_params,
5177 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5178 build_loop_iteration_domains, add_conditions_to_domain,
5179 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5180 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5181 build_sese_conditions, add_conditions_to_constraints,
5182 build_scop_iteration_domain, build_access_matrix_with_af,
5183 build_access_matrix,
5184 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5185
5186 * graphite-sese-to-poly.c: New.
5187 * graphite-sese-to-poly.h: New.
5188
5189 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5190
51912009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5192
5193 * graphite.c: Split graphite code generation to a new file.
5194 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5195 max_precision_type, clast_to_gcc_expression_red,
5196 clast_to_gcc_expression, gcc_type_for_clast_expr,
5197 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5198 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5199 graphite_create_new_guard, clast_get_body_of_loop,
5200 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5201 graphite_create_new_loop, build_iv_mapping, copy_renames,
5202 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5203 compute_cloog_iv_types, free_scattering, save_var_name,
5204 initialize_cloog_names, build_scop_context, build_cloog_prog,
5205 set_cloog_options, debug_clast_stmt, scop_to_clast,
5206 print_generated_program, debug_generated_program,
5207 gloog): Moved to graphite-clast-to-gimple.c.
5208
5209 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5210
5211 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5212 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5213 loop_iv_stack_pop, loop_iv_stack_get_iv,
5214 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5215 free_loop_iv_stack, loop_iv_stack_remove_constants,
5216 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5217 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5218 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5219 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5220 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5221 get_vdef_before_sese, sese_adjust_vphi,
5222 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5223 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5224 is_iv, expand_scalar_variables_ssa_name,
5225 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5226 expand_scalar_variables, rename_variables, remove_condition,
5227 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5228 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5229 default_liveout_before_guard, add_guard_exit_phis,
5230 insert_guard_phis, register_old_and_new_names,
5231 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5232 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5233 if_region_set_false_region, create_if_region_on_edge,
5234 move_sese_in_condition): Moved to sese.c.
5235
5236 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5237 if_region_exit, if_region_get_condition_block,
5238 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5239 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5240 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5241 ivtype_map_elt, new_ivtype_map_elt,
5242 recompute_all_dominators): Moved to sese.h.
5243
5244 * graphite-clast-to-gimple.c: New.
5245 * graphite-clast-to-gimple.h: New.
5246 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5247 * sese.c: Modified as said above.
5248 * sese.h: Same.
5249
52502009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5251
5252 * graphite.c: Split scop detection to a new file.
5253 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5254 move_sd_regions, loop_affine_expr, exclude_component_ref,
5255 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5256 graphite_cannot_represent_loop_niter, struct scopdet_info,
5257 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5258 find_single_entry_edge, find_single_exit_edge,
5259 create_single_entry_edge, sd_region_without_exit,
5260 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5261 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5262 Moved to graphite-scop-detection.c.
5263
5264 * graphite-scop-detection.c: New.
5265 * graphite-scop-detection.h: New.
5266 * Makefile.in: Add new rule for graphite-scop-detection.o.
5267
5268 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5269 tree-scalar-evolution.h.
5270 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5271 build_sese_loop_nests): Moved here from graphite.c.
5272 (param_index): Renamed parameter_index_in_region.
5273
52742009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5275 Sebastian Pop <sebastian.pop@amd.com>
5276
5277 * gcc.dg/graphite/block-0.c: Expected to fail now.
5278 * gcc.dg/graphite/block-1.c: Same.
5279 * gcc.dg/graphite/block-5.c: Same.
5280 * gcc.dg/graphite/block-6.c: Same.
5281
52822009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5283 Sebastian Pop <sebastian.pop@amd.com>
5284
5285 * graphite.h: Separate from graphite_bb_p the polyhedral
5286 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5287 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5288 graphite-data-ref.h.
5289 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5290 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5291 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5292 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5293 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5294 scop_nb_params): Moved to graphite-poly.h.
5295 * graphite-data-ref.c: Same.
5296 * graphite-data-ref.h: New.
5297 * graphite.c: Same.
5298 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5299 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5300 is_interchange_valid, graphite_trans_bb_block,
5301 graphite_trans_loop_block, scop_max_loop_depth,
5302 graphite_trans_scop_block, graphite_apply_transformations,
5303 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5304 graphite-poly.c.
5305 * graphite-poly.h: New.
5306 * graphite-poly.c: New.
5307 * Makefile.in (OBJS-common): Add graphite-poly.o.
5308 (graphite-poly.o): New rule.
5309 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5310 (DR_SCOP): Removed.
5311
53122009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5313 Tobias Grosser <grosser@fim.uni-passau.de>
5314
5315 * graphite.c: Replace gb -> gbb.
5316 * graphite.h: Same.
5317 * graphite-data-ref.c: Same.
5318
53192009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5320 Tobias Grosser <grosser@fim.uni-passau.de>
5321
5322 * Makefile.in (OBJS-commmon): Add sese.o.
5323 (sese.o): New.
5324 (graphite.o): Add sese.h.
5325 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5326 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5327 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5328 Move to sese.
5329 (block_before_scop): Add missing return.
5330 (new_scop, free_scop): Remove SESE data structures.
5331 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5332 find_scop_parameters, build_loop_iteration_domains,
5333 add_conditions_to_domain, register_scop_liveout_renames,
5334 copy_bb_and_scalar_dependences): Scop -> SESE.
5335
5336 (add_conditions_to_domain): SCoP -> SESE and remove check
5337 (scop_contains_non_iv_scalar_phi_nodes): New.
5338 (build_scop_conditions_1, build_scop_conditions): Remove check for
5339 non iv scalar phi nodes.
5340 (print_scop_statistics): New.
5341 (graphite_transform_loops): Cleanup.
5342
5343 * graphite.h: Move to sese & cleanup.
5344 * sese.c: New.
5345 * sese.h: New.
5346
53472009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5348 Tobias Grosser <grosser@fim.uni-passau.de>
5349
5350 * graphite.c (build_scop_conditions_1): Conditions are only
5351 at the end of a basic block.
5352
53532009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5354 Tobias Grosser <grosser@fim.uni-passau>
5355
5356 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5357 field.
5358 (GBB_ALPHA): Removed.
5359
53602009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5361 Tobias Grosser <grosser@fim.uni-passau.de>
5362
5363 * graphite-data-ref.c (graphite_test_dependence): Don't use
5364 GBB_DYNAMIC_SCHEDULE.
5365 * graphite.c (new_graphite_bb): Same.
5366 (free_graphite_bb): Same.
5367 (build_scop_dynamic_schedules): Removed.
5368 (graphite_transform_loops): Don't call it.
5369 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5370 (GBB_DYNAMIC_SCHEDULE): Removed.
5371
53722009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5373 Tobias Grosser <grosser@fim.uni-passau.de>
5374
5375 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5376 (print_graphite_bb): Same.
5377 (build_cloog_prog): Same.
5378
53792009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5380 Tobias Grosser <grosser@fim.uni-passau.de>
5381
5382 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5383
53842009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5385 Tobias Grosser <grosser@fim.uni-passau.de>
5386
5387 * graphite.c (build_scop_context): Don't use CloogMatrix.
5388 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5389 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5390
53912009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5392 Tobias Grosser <grosser@fim.uni-passau.de>
5393
5394 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5395 liveout_renames, add_params fields...
5396 (struct sese): ... here.
5397 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5398 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5399
54002009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5401 Tobias Grosser <grosser@fim.uni-passau.de>
5402
5403 * graphite.c (print_scop): Do not print the CLooG program.
5404 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5405 build_cloog_prog, gloog): Don't use SCOP_PROG.
5406 (find_transform): Renamed scop_to_clast.
5407 (print_generated_program, debug_generated_program): New.
5408 (graphite_transform_loops): Adapt to new interface.
5409 * graphite.h (struct scop): Remove program field.
5410 (SCOP_PROG): Removed.
5411 (print_generated_program, debug_generated_program): Declared.
5412
54132009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5414
5415 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5416 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5417 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5418 free_graphite_bb, build_scop_canonical_schedules,
5419 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5420 schedules are now represented using a ppl_Linear_Expression_t.
5421 * graphite.h (struct graphite_bb): Same.
5422 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5423 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5424
54252009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5426
5427 * graphite.c: Free local memory.
5428 * graphite-ppl.c: Same.
5429
54302009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5431
5432 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5433 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5434 swap_constraint_variables, scale_constraint_variable): Removed.
5435 (graphite_trans_bb_strip_mine): Remove pong.
5436 * graphite-ppl.c: Include missing header files.
5437 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5438 * graphite-ppl.h (ppl_strip_loop): Declared.
5439 * Makefile.in (graphite-ppl.o): Adjust dependences.
5440
54412009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5442
5443 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5444 (build_scop_iteration_domain): Same.
5445
54462009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5447
5448 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5449 ping pong.
5450 (add_value_to_dim, scan_tree_for_params_right_scev,
5451 scan_tree_for_params_int): New.
5452 * graphite-ppl.c (oppose_constraint): New.
5453 (insert_constraint_into_matrix): Implement missing cases.
5454 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5455
54562009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5457
5458 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5459 use ppl_move_dimension.
5460
54612009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5462
5463 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5464 * graphite.c: Same.
5465 * graphite.h: Same.
5466 * graphite-ppl.c: Same.
5467 * graphite-ppl.h: Same.
5468
54692009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5470
5471 Revert last 3 commits.
5472
54732009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5474
5475 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5476 ping pong.
5477 (add_value_to_dim, scan_tree_for_params_right_scev,
5478 scan_tree_for_params_int): New.
5479 * graphite-ppl.c (oppose_constraint): New.
5480 (insert_constraint_into_matrix): Implement missing cases.
5481 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5482
54832009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5484
5485 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5486
54872009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5488 Tobias Grosser <grosser@fim.uni-passau.de>
5489
5490 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5491 use ppl_move_dimension.
5492 * graphite-ppl.c (ppl_move_dimension): New.
5493 * graphite-ppl.h (ppl_move_dimension): Declared.
5494
54952009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5496
5497 * graphite.c: Do not include cloog/cloog.h.
5498 (print_graphite_bb): Remove ping pong, call PPL print function.
5499
55002009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5501
5502 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5503 (graphite.o): Add dependence on graphite-ppl.h.
5504 (graphite-ppl.o): New.
5505 (graphite-data-ref.c): Ping pong between PPL data structures
5506 and matrices.
5507 * graphite-ppl.c: New.
5508 * graphite-ppl.h: New.
5509 * graphite.c: Include graphite-ppl.h.
5510 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5511 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5512 Ping pong between PPL data structures and matrices.
5513 (new_graphite_bb): Create a PPL constraint system.
5514 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5515 (build_loop_iteration_domains): Use PPL functions.
5516 * graphite.h: Include graphite-ppl.h. Fix comments.
5517 (graphite_bb): Use a ppl_Constraint_System_t instead of
5518 CloogMatrix for representing the domain.
5519 (scop): Remove static_schedule.
5520 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5521
55222009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5523
5524 * graphite.c: Fix some comments.
5525
55262009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5527
5528 PR middle-end/38953
5529 * graphite.c (if_region_set_false_region): After moving a region
5530 in the false branch of a condition, remove the empty dummy
5531 basic block.
5532 (gloog): Remove wrong fix for PR38953.
5533
55342009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5535
5536 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5537 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5538 register_bb_in_sese, new_sese, free_sese): Moved.
5539 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5540 outermost_loop_in_scop, build_scop_iteration_domain,
5541 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5542 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5543 Use loop_in_sese_p instead of loop_in_scop_p.
5544 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5545 (free_scop): Do not free SCOP_BBS_B.
5546 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5547 ref_nb_loops): Moved here...
5548 * graphite.h (ref_nb_loops): ... from here.
5549 (struct scop): Remove bbs_b bitmap.
5550 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6c9df8cb 5551 * gcc.dg/graphite/scop-19.c: New
c6bb733d 5552
55532009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5554
5555 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5556 detection.
5557
55582009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5559
5560 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5561 eq_loop_to_cloog_loop): Remove.
5562 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5563 * graphite.h (struct scop): Remove loop2cloog_loop.
5564 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5565
55662009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5567
5568 * opts.c (decode_options): Only add graphite options to O2
5569 if we compile with graphite enabled.
5570
55712009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5572
5573 * Merge from mainline (r143163:143684).
5574
55752009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5576
5577 * graphite.c (debug_value): Removed.
5578 * graphite.h (debug_value): Removed.
5579
55802009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5581
5582 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5583 after graphite: pass_copy_prop does not maintain a proper loop closed
5584 SSA form. pass_copy_prop should be fixed.
5585
55862009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5587
5588 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5589
55902009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5591
5592 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5593 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5594 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5595 changed the CFG.
5596
55972009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5598
5599 * graphite.c (gloog): Return true when code gen succeeded.
5600 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5601 the code of the function did not changed. After cleanup_tree_cfg
5602 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5603 form.
5604
56052009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5606
5607 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5608 gimple_call_lhs is NULL.
5609
56102009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5611 Tobias Grosser <tobi.grosser@amd.com>
5612
5613 * graphite.c (graphite_trans_scop_block): Do not block single
5614 nested loops.
5615
56162009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5617 Tobias Grosser <tobi.grosser@amd.com>
5618
5619 * graphite.c (build_scop_canonical_schedules): Start schedules at
5620 zero.
5621
56222009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5623 Tobias Grosser <tobi.grosser@amd.com>
5624
5625 * graphite.c (compare_prefix_loops): New.
5626 (build_scop_canonical_schedules): Rewritten.
5627 (graphite_transform_loops): Move build_scop_canonical_schedules
5628 after build_scop_iteration_domain.
5629
56302009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5631 Tobias Grosser <tobi.grosser@amd.com>
5632
5633 * graphite.c (add_conditions_to_domain): Add the loops to
5634 the dimension of the iteration domain. Do copy the domain
5635 only when it exists.
5636 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5637 (add_conditions_to_constraints): New.
5638 (can_generate_code_stmt, can_generate_code): Removed.
5639 (gloog): Do not call can_generate_code.
5640 (graphite_transform_loops): Call add_conditions_to_constraints
5641 after building the iteration domain.
5642
56432009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5644 Tobias Grosser <tobi.grosser@amd.com>
5645 Jan Sjodin <jan.sjodin@amd.com>
5646
5647 * graphite.c (scan_tree_for_params): On substractions negate
5648 all the coefficients of the term.
5649 (clast_to_gcc_expression_red): New. Handle reduction expressions
5650 of more than two operands.
5651 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5652 (get_vdef_before_scop): Handle also the case of default definitions.
5653
56542009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5655
5656 PR middle-end/38431
5657 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5658 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5659 (gloog): Do not call cleanup_tree_cfg.
5660 (graphite_transform_loops): Call cleanup_tree_cfg after all
5661 scops have been code generated.
5662
56632009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5664
5665 * passes.c (init_optimization_passes): Schedule after
5666 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5667
56682009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5669
5670 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5671 Fix comment.
5672 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5673 Set the type of an expression to the type of its assign statement.
5674 (expand_scalar_variables_expr): Do not pass loop_p.
5675 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5676 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5677 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5678
56792009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5680
5681 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5682 an expression to the gimple_expr_type of its assign statement.
5683 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5684 or tcc_declaration.
5685
56862009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5687
5688 PR tree-optimization/38786
6c9df8cb 5689 * gcc.dg/graphite/pr38786.c: New.
c6bb733d 5690 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5691 the SSA_NAME case of expand_scalar_variables_expr.
5692 (expand_scalar_variables_expr): Also gather the scalar computation
5693 used to index the memory access.
5694 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5695 the gimple_stmt_iterator where it inserts new code.
5696
56972009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5698
6c9df8cb 5699 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
c6bb733d 5700
57012009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5702
5703 * opts.c (decode_options): Enable flag_graphite_identity and
5704 flag_loop_block in -O2 and above.
5705
57062009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5707
5708 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5709 Fix merge problem: replace with the file from trunk.
5710
57112009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5712
5713 * Merge from mainline (r141727:143163).
5714
57152009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5716 Jan Sjodin <jan.sjodin@amd.com>
5717
5718 PR tree-optimization/38559
6c9df8cb 5719 * gcc.dg/graphite/pr38559.c: New.
c6bb733d 5720
5721 * graphite.c (debug_value, copy_constraint,
5722 swap_constraint_variables, scale_constraint_variable, ): New.
5723 (get_lower_bound, get_upper_bound): Removed.
5724 (graphite_trans_bb_strip_mine): Clean up this code that works
5725 only for constant number of iterations. Fully copy upper and
5726 lower bound constraints, not only the constant part of them.
5727 * graphite.h (debug_value): Declared.
5728
57292009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5730
5731 PR tree-optimization/38492
5732 PR tree-optimization/38498
5733 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5734 * tree-chrec.h (scev_is_linear_expression): Declared.
5735 * graphite.c (graphite_cannot_represent_loop_niter): New.
5736 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5737 (graphite_loop_normal_form): Use gcc_assert.
5738 (scan_tree_for_params): Use CASE_CONVERT.
5739 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5740 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5741 Use gcc_assert. Discard scops that contain unhandled cases.
5742 (build_scop_conditions): Return a boolean status for unhandled cases.
5743 (strip_mine_profitable_p): Print the loop number, not its depth.
5744 (is_interchange_valid): Pass the depth of the loop nest, don't
5745 recompute it wrongly.
5746 (graphite_trans_bb_block): Same.
5747 (graphite_trans_bb_block): Print tentative of loop blocking.
5748 (graphite_trans_scop_block): Do not print that the loop has been
5749 blocked.
5750 (graphite_transform_loops): Do not handle scops that contain condition
5751 scalar phi nodes.
5752
6c9df8cb 5753 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
c6bb733d 5754 in trunk.
6c9df8cb 5755 * gcc.dg/graphite/block-0.c: Update test.
5756 * gcc.dg/graphite/block-1.c: Same.
5757 * gcc.dg/graphite/block-2.c: Remove xfail and test for
c6bb733d 5758 blocking.
6c9df8cb 5759 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5760 * gcc.dg/graphite/block-3.c: New.
5761 * gcc.dg/graphite/pr38498.c: New.
c6bb733d 5762
57632008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5764
5765 PR tree-optimization/38510
5766 * gcc.dg/graphite/pr38510.c: New.
5767 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5768 (translate_clast): Call recompute_all_dominators before
5769 graphite_verify.
5770 (gloog): Call recompute_all_dominators before graphite_verify.
5771
57722008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5773
5774 PR tree-optimization/38492
5775 * graphite.c (rename_map_elt, debug_rename_elt,
5776 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5777 rename_map_elt_info, eq_rename_map_elts,
5778 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5779 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5780 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5781 (sese_build_livein_liveouts): New.
5782 (new_sese, free_sese): New.
5783 (new_scop): Call new_sese.
5784 (free_scop): Call free_sese.
5785 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5786 (register_old_new_names): Renamed register_old_and_new_names.
5787 (register_scop_liveout_renames, add_loop_exit_phis,
5788 insert_loop_close_phis, struct igp,
5789 default_liveout_before_guard, add_guard_exit_phis,
5790 insert_guard_phis, copy_renames): New.
5791 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5792 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5793 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5794 (scop_adjust_phis_for_liveouts): New.
5795 (gloog): Call scop_adjust_phis_for_liveouts.
5796
5797 * graphite.h (struct sese): Documented. Added fields liveout,
5798 num_ver and livein.
5799 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5800 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5801 (struct scop): Added field liveout_renames.
5802 (SCOP_LIVEOUT_RENAMES): New.
5803
58042008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5805
5806 PR tree-optimization/38409
5807 * gcc.dg/graphite/pr38409.c: New.
5808 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5809
58102008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5811
5812 * graphite.c (gcc_type_for_cloog_iv): By default return
5813 integer_type_node.
5814 (graphite_create_new_loop): Don't fold_convert the already
5815 fold_convert-ed expression.
5816
58172008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5818
5819 PR tree-optimization/38446
5820 * gcc.dg/graphite/pr38446.c: New.
5821 * graphite.c (register_bb_in_sese): New.
5822 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5823 looking at the bbs in the region.
5824 * graphite.h (sese): Add region_basic_blocks pointer set to
5825 structure and initialize at the time of defining new scop.
5826
58272008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5828
5829 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5830 (find_params_in_bb): Do not free data refs.
5831 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5832
58332008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5834
6c9df8cb 5835 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5836 * gcc.dg/graphite/scop-17.c: Same.
5837 * gcc.dg/graphite/block-5.c: New.
5838 * gcc.dg/graphite/block-6.c: New.
5839 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5840 * gcc.dg/graphite/pr37684.c: Same.
5841 * gcc.dg/graphite/block-2.c: Same.
c6bb733d 5842
5843 * graphite.c (struct ivtype_map_elt): New.
5844 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5845 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5846 gcc_type_for_cloog_iv): New.
5847 (loop_iv_stack_patch_for_consts): Use the type of the induction
5848 variable from the original loop, except for the automatically
5849 generated loops, i.e., in the case of a strip-mined loop, in
5850 which case there is no original loop: in that case just use
5851 integer_type_node.
5852 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5853 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5854 (clast_name_to_gcc): Accept params to be NULL.
5855 (clast_to_gcc_expression): Take an extra parameter for the type.
5856 Convert to that type all the expressions built by this function.
5857 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5858 (graphite_translate_clast_equation): Compute the type of the
5859 clast_equation before translating its LHS and RHS.
5860 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5861 (graphite_create_new_loop): Compute the type of the induction
5862 variable before translating the lower and upper bounds and before
5863 creating the induction variable.
5864 (rename_variables_from_edge, rename_phis_end_scop): New.
5865 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5866 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5867 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5868 compute_cloog_iv_types): New.
5869 (gloog): Call compute_cloog_iv_types before starting the
5870 translation of the clast.
5871
5872 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5873 (GBB_CLOOG_IV_TYPES): New.
5874 (debug_ivtype_map): Declared.
5875 (oldiv_for_loop): New.
5876
58772008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5878
5879 PR middle-end/38459
5880 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5881 (param_index): Assert if parameter is not know after parameter
5882 detection.
5883 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5884 (find_scop_parameters): Mark, that we have finished parameter
5885 detection.
5886 (graphite_transform_loops): Move condition detection before parameter
5887 detection.
5888 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6c9df8cb 5889 * gfortran.dg/graphite/pr38459.f90: New.
c6bb733d 5890
58912008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5892
5893 * graphite.c (graphite_transform_loops): Always call find_transform ()
5894 in ENABLE_CHECKING. So we test these code paths, even if we do not
5895 generate code.
5896
58972008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5898
5899 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5900 (print_scop): Ditto.
5901
59022008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5903
5904 PR middle-end/38084
6c9df8cb 5905 Fix gfortran.dg/graphite/id-3.f90.
c6bb733d 5906 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5907 regions more than once.
5908
59092008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5910
6c9df8cb 5911 Fix gfortran.dg/graphite/id-4.f90.
c6bb733d 5912 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5913 when not needed.
5914
59152008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5916
6c9df8cb 5917 Fix gfortran.dg/graphite/id-1.f90.
c6bb733d 5918 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5919 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5920 (max_precision_type): New.
5921 (value_clast): Removed.
5922 (clast_to_gcc_expression): Be more careful to types of expressions.
5923 Use max_precision_type and update use of gmp_cst_to_tree.
5924 (graphite_translate_clast_equation): Use max_precision_type.
5925 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5926 use the type of the condition.
5927 (graphite_create_new_loop): Do not use integer_type_node, use the
5928 max_precision_type of lb and ub.
5929
59302008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5931
5932 * graphite.c (build_scops_1): Initialize open_scop.exit
5933 and sinfo.last.
5934
59352008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5936
6c9df8cb 5937 * gcc.dg/graphite/pr38084.c: New.
5938 * gfortran.dg/graphite/id-1.f90: New.
5939 * gfortran.dg/graphite/id-2.f90: New.
5940 * gfortran.dg/graphite/id-3.f90: New.
5941 * gfortran.dg/graphite/id-4.f90: New.
5942 * gfortran.dg/graphite/pr37857.f90: New.
c6bb733d 5943
59442008-12-02 Sebastian Pop <sebastian.pop@amd.com>
5945 Jan Sjodin <jan.sjodin@amd.com>
5946 Harsha Jagasia <harsha.jagasia@amd.com>
5947
5948 PR middle-end/37852
5949 PR middle-end/37883
5950 PR middle-end/37928
5951 PR middle-end/37980
5952 PR middle-end/38038
5953 PR middle-end/38039
5954 PR middle-end/38073
5955 PR middle-end/38083
5956 PR middle-end/38125
5957
6c9df8cb 5958 * gcc.dg/graphite/pr38073.c: New.
5959 * gcc.dg/graphite/pr37928.c: New.
5960 * gcc.dg/graphite/pr37883.c: New.
5961 * gcc.dg/graphite/pr38125.c: New.
5962 * gfortran.dg/graphite/pr38083.f90: New.
5963 * gfortran.dg/graphite/pr37852.f90: New.
5964 * gfortran.dg/graphite/pr37980.f90: New.
c6bb733d 5965
6c9df8cb 5966 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
c6bb733d 5967 the number of detected scops. Copy exact same test for loop
5968 blocking...
6c9df8cb 5969 * gcc.dg/graphite/block-1.c: Fix the number of expected
c6bb733d 5970 loops to be blocked as reductions are not handled.
6c9df8cb 5971 * gcc.dg/graphite/block-4.c: ...here. New.
c6bb733d 5972
5973 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
5974 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
5975 ...here.
5976 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
5977 * Makefile.in (graphite.o): Depend on value-prof.h.
5978 (graphite.o-warn): Removed -Wno-error.
5979 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
5980 to be a NULL pointer. Call update_stmt. Return the newly created
5981 cannonical induction variable.
5982
5983 * graphite.h (debug_rename_map): Declared. Fix some comments.
5984
5985 * graphite.c: Reimplement the code generation from graphite to gimple.
5986 Include value-prof.h.
5987 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
5988 (get_old_iv_from_ssa_name): Removed.
5989 (graphite_stmt_p): New.
5990 (new_graphite_bb): Test for useful statements before building a
5991 graphite statement for the basic block.
5992 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
5993 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
5994 reason.
5995 (recompute_all_dominators, graphite_verify,
5996 nb_reductions_in_loop, graphite_loop_normal_form): New.
5997 (scop_record_loop): Call graphite_loop_normal_form.
5998 (build_scop_loop_nests): Iterate over all the blocks of the
5999 function instead of relying on the incomplete information from
6000 SCOP_BBS. Return the success of the operation.
6001 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6002 (add_bb_domains): Removed.
6003 (build_loop_iteration_domains): Don't call add_bb_domains.
6004 Add the iteration domain only to the basic blocks that have been
6005 translated to graphite.
6006 (build_scop_conditions_1): Add constraints only if the basic
6007 block have been translated to graphite.
6008 (build_scop_data_accesses): Completely disabled until data
6009 dependence is correctly implemented.
6010 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6011 (remove_all_edges_1, remove_all_edges): Removed.
6012 (get_new_name_from_old_name): New.
6013 (graphite_rename_variables_in_stmt): Renamed
6014 rename_variables_in_stmt. Call get_new_name_from_old_name.
6015 Use replace_exp and update_stmt.
6016 (is_old_iv): Renamed is_iv.
6017 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6018 Use replace_exp and update_stmt.
6019 (expand_scalar_variables_expr): Same. Use the map to get the
6020 new names for the renaming of induction variables and for the
6021 renaming of variables after a basic block has been copied.
6022 (expand_scalar_variables): Same.
6023 (graphite_rename_variables): Renamed rename_variables.
6024 (move_phi_nodes): Removed.
6025 (get_false_edge_from_guard_bb): New.
6026 (build_iv_mapping): Do not insert the induction variable of a
6027 loop in the renaming iv map if the basic block does not belong
6028 to that loop.
6029 (register_old_new_names, graphite_copy_stmts_from_block,
6030 copy_bb_and_scalar_dependences): New.
6031 (translate_clast): Heavily reimplemented: copy basic blocks,
6032 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6033 At each translation step call graphite_verify ensuring the
6034 consistency of the SSA, loops and dominators information.
6035 (collect_virtual_phis, find_vdef_for_var_in_bb,
6036 find_vdef_for_var_1, find_vdef_for_var,
6037 patch_phis_for_virtual_defs): Removed huge hack.
6038 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6039 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6040 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6041 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6042 if_region_get_condition_block, if_region_set_false_region,
6043 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6044 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6045 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6046 rewrite_into_sese_closed_ssa): New.
6047 (gloog): Remove dead code. Early return if code cannot be
6048 generated. Call cleanup_tree_cfg once the scop has been code
6049 generated.
6050 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6051 block loops with less than two loops.
6052 (graphite_apply_transformations): Remove the call to
6053 scop_remove_ignoreable_gbbs.
6054 (limit_scops): When build_scop_loop_nests fails, continue on
6055 the next scop. Fix open_scop.entry.
6056 (graphite_transform_loops): Call recompute_all_dominators: force the
6057 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6058 Call initialize_original_copy_tables and free_original_copy_tables
6059 to be able to copy basic blocks during code generation.
6060 When build_scop_loop_nests fails, continue on next scop.
6061 (value_clast): New union.
6062 (clast_to_gcc_expression): Fix type cast warning.
6063
60642008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6065
6066 * Merge from mainline (r140838:141727).
6067
60682008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6069
6070 PR middle-end/37833
6071
6072 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6073
60742008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6075
6076 PR middle-end/37943
6077
6078 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6079 exits and conditions.
6c9df8cb 6080 * gcc.dg/graphite/pr37943.c: New.
c6bb733d 6081
60822008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6083
6084 PR middle-end/37886
6085 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6086
60872008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6088
6089 * doc/invoke.texi: Fix spaces.
6090
60912008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6092
6093 PR tree-optimization/37891
6094 Reverted last commit.
6095 * graphite.c (create_single_entry_edge): Set
6096 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6097
60982008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6099 Mitul Thakkar <mitul.thakkar@amd.com>
6100
6101 * graphite.c (create_single_entry_edge): Set
6102 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6103
61042008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6105
6106 * doc/invoke.texi: Add -fgraphite-identity.
6107 * graphite.c (graphite_apply_transformations): Check for
6108 -fgraphite-identity.
6109 * toplev.c (process_options): Add flag_graphite_identity.
6110 * tree-ssa-loop.c: Add flag_graphite_identity.
6111
61122008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6113
6114 Undo changes from 2008-10-02:
6115 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6116 operand type when copying the operand to a variable of different type.
6117 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6118 with the IV name after increment.
6119
61202008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6121 Harsha Jagasia <harsha.jagasia@amd.com>
6122
6123 PR tree-optimization/37828
6c9df8cb 6124 * gcc.dg/graphite/pr37828.c: New.
c6bb733d 6125 * graphite.c (graphite_trans_loop_block): Do not loop block
6126 single nested loops.
6127
61282008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6129 Sebastian Pop <sebastian.pop@amd.com>
6130
6131 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6132 rename_map_elt_info, eq_rename_map_elts): New.
6133 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6134 (expand_scalar_variables_expr): Change parameters.
6135 (expand_scalar_variables_stmt): Same.
6136 (expand_scalar_variables): Same.
6137 (graphite_rename_ivs): Rename graphite_rename_variables.
6138 (build_iv_mapping): New.
6139 (translate_clast): Call build_iv_mapping.
6140 * graphite.h (gbb_p): New name.
6141
61422008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6143
6144 PR tree-optimization/37684
6145 * gcc.dg/graphite/pr37684.c: New.
6146 * graphite.c (exclude_component_ref): New.
6147 (is_simple_operand): Call exclude_component_ref.
6148
61492008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6150 Harsha Jagasia <harsha.jagasia@amd.com>
6151
6152 PR tree-optimization/37485
6153 * gcc.dg/graphite/block-2.c: New
6154 * graphite.c (gmp_cst_to_tree): Moved.
6155 (iv_stack_entry_is_constant): New.
6156 (iv_stack_entry_is_iv): New.
6157 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6158 (loop_iv_stack_insert_constant): New.
6159 (loop_iv_stack_pop): Use new datatpype.
6160 (loop_iv_stack_get_iv): Same.
6161 (loop_iv_stack_get_iv_from_name): Same.
6162 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6163 (loop_iv_stack_patch_for_consts): New.
6164 (loop_iv_stack_remove_constants): New.
6165 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6166 (translate_clast): Call loop_iv_stack_patch_for_consts and
6167 loop_iv_stack_remove_constants.
6168 (gloog): Use new datatype. Redirect construction edge to end
6169 block to avoid accidental deletion.
6170 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6171 iv stack entry.
6172 (union iv_stack_entry_data): New. Data in iv stack entry.
6173 (struct iv_stack_entry): New. Datatype for iv stack entries.
6174
61752008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6176
6177 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6178 operand type when copying the operand to a variable of different type.
6179
61802008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6181
6182 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6183 with the IV name after increment.
6184
61852008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6186
6187 * Merge from mainline (r140164:140838).
6188
61892008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6190
6191 * graphite-data-ref.c: New.
6192 * graphite.c (print_scop): Also dump the dependence graph.
6193 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6194 (new_scop): Initialize SCOP_DEP_GRAPH.
6195 (build_scop_dynamic_schedules): New.
6196 (build_access_matrix_with_af): Fixed column numbering.
6197 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6198 * graphite.h: Add ifndef/define guards against multiple inclusion.
6199 (struct scop): Add dep_graph field.
6200 (SCOP_DEP_GRAPH): Defined.
6201 (ref_nb_loops): Fixed and moved to other position.
6202 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6203 (nb_loops_around_loop_in_scop): New.
6204 (graphite_dump_dependence_graph): Declared.
6205 (graphite_build_rdg_all_levels): Declared.
6206 (graphite_test_dependence): Declared.
6207 * Makefile.in (graphite-data-ref.o): New target.
6208
62092008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6210
6211 * Merge from mainline (139870:140164).
6212
62132008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6214
6215 * Merge from mainline (138275:139870).
6c9df8cb 6216 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
c6bb733d 6217 the commits from trunk broke the niter detection.
6218
62192008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6220
6221 * graphite.c: Add more documentation. Fix formatting.
6222 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6223 loop_iv_stack_debug): Moved...
6224 (schedule_to_scattering): Move before use.
6225 (dot_all_scops): Include in "#if 0" the code for system
6226 call dotty.
6227
6228 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6229 loop_iv_stack_debug): ...here.
6230
62312008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6232
6233 * tree-phinodes.c (make_phi_node): Extern.
6234 (add_phi_node_to_bb): New.
6235 (create_phi_node): Call add_phi_node_to_bb.
6236 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6237 (remove_statement): Handle case where stored phi was updated
6238 and is no longer the same.
6239 * graphite.c (is_parameter): New.
6240 (is_old_iv): New.
6241 (expand_scalar_variables_expr): New.
6242 (expand_scalar_variables_stmt): New.
6243 (expand_scalar_variables): New.
6244 (move_phi_nodes): Create new phi instead of moving old one.
6245 (translate_clast): Call expand_scalar_variables.
6246 (find_vdef_for_var_in_bb): Also scan regular definitions.
6247 (skip_phi_defs): New.
6248 (collect_scop_exit_phi_args): New.
6249 (patch_scop_exit_phi_args): New.
6250 (gloog): Patch phis after scop.
6251 * tree-flow.h: (add_phi_node_to_bb): Declared.
6252 (make_phi_node): Declared.
6253
62542008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6255
6256 * graphite.c (end_scop): Split the entry of the scop when it
6257 is the header of the loop in which the scop is ending.
6258 (build_scops_1, limit_scops): Update uses of end_scop.
6259
62602008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6261
6262 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6263 SCOP_ENTRY or SCOP_EXIT.
6264
62652008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6266
6267 * graphite.c (get_construction_edge): Removed.
6268 (gloog): Construction edge is the scop entry edge.
6269
62702008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6271
6272 * graphite.c (can_generate_for_scop): Removed.
6273 (gloog): Do not call it.
6274
62752008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6276
6277 * graphite.c (new_scop): Entry of a scop is an edge.
6278 Initialize SESE region.
6279 (free_scop): Free SESE region.
6280 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6281 (split_difficult_bb): New, split from end_scop.
6282 (end_scop): Exit of a scop is an edge.
6283 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6284 not automatically updated and thus is always wrong.
6285 * graphite.h (struct sese): New.
6286 (SESE_ENTRY): New.
6287 (SESE_EXIT): New.
6288 (struct scop): New field for a SESE region. Remove entry, exit.
6289 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6290 semantics as before. Moved comment around.
6291
62922008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6293 Sebastian Pop <sebastian.pop@amd.com>
6294
6295 * graphite.c (graphite_transform_loops): Always enable gloog
6296 and find_transform when ENABLE_CHECKING.
6297
62982008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6299
6300 * graphite.c (graphite_transform_loops): Move pretty printer
6301 of SCOPs before doing any transform. Remove call to print_scops
6302 and dot_all_scops_1.
6303
63042008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6305
6306 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6307 (print_graphite_bb): Same.
6308
63092008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6310
6311 * graphite.c (dot_all_scops_1): Cleanup.
6312 (move_scops): Fix comment.
6313
63142008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6315
6316 * graphite.c (build_scop_bbs): Revert commit 139355:
6317
6318 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6319 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6320
6321 * graphite.c (build_scop_bbs): Factor up code.
6322
63232008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6324
6325 * graphite.c (gloog): Update dominator info.
6326
63272008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6328
6329 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6330
63312008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6332
6333 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6334 initialization.
6335 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6336 (translate_clast): Correct formatting.
6337 * graphite.h (struct num_map): Removed.
6338 (struct graphite_bb): Remove num_map field.
6339 (GBB_INDEX_TO_NUM_MAP): Removed.
6340
63412008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6342
6343 * graphite.c (build_access_matrix_with_af): Fix comments.
6344 (build_scop_data_accesses): Same.
6345
63462008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6347
6348 * graphite.c (build_scop_data_accesses): Don't construct
6349 access matrices. Add a FIXME and an assert condition that
6350 should pass when the access matrices will be needed.
6351
63522008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6353
6354 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6355 really_constant_p.
6356 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6357 Moved close by free_graphite_bb.
6358 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6359 (new_scop): Move close by free_scop.
6360 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6361
63622008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6363
6364 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6365 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6366 instead of recursive call.
6367 (graphite_translate_clast_equation): New.
6368 (graphite_create_guard_cond_expr): New.
6369 (graphite_create_new_guard): New.
6370 (get_stack_index_from_iv): Removed.
6371 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6372 (get_true_edge_from_guard_bb): New.
6373 (translate_clast): Handle stmt_guard in clast.
6374 (get_construction_edge): Allow construction edge detection for
6375 a scope entry with multiple predecessors if one predecessor is
6376 the immediate dominator of scope entry.
6377 (can_generate_code_stmt): Enable code generation for clast_guard.
6378 (gloog): Use correct context loop. Removed check for post dominators.
6379 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6380
63812008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6382
6383 * graphite.c (remove_dead_loops): Document better which
6384 loops are removed.
6385
63862008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6387
6388 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6389 and PPLINC.
6390 (graphite.o): Also depends on pointer-set.h.
6391
63922008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6393
6394 * graphite.c (scop_record_loop): Fix compile warning.
6395
63962008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6397 Sebastian Pop <sebastian.pop@amd.com>
6398
6399 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6400
64012008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6402
6403 * graphite.c (build_graphite_bb): Initialize bb->aux to
6404 point to the graphite_bb_p.
6405 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6406 content of bb->aux.
6407 (add_bb_domains): Does not use the scop parameter.
6408 (graphite_transform_loops): Clean bb->aux at the end.
6409
64102008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6411 Sebastian Pop <sebastian.pop@amd.com>
6412
6c9df8cb 6413 * lib/target-supports.exp
c6bb733d 6414 (check_effective_target_fgraphite): New.
6415
6c9df8cb 6416 * gcc.dg/graphite/graphite.exp: Early exit when
c6bb733d 6417 check_effective_target_fgraphite returns false.
6418 Set dg-do-what-default to compile.
6419 (scan-graphite-dump-times): Removed.
6c9df8cb 6420 * gfortran.dg/graphite/graphite.exp: Same.
c6bb733d 6421
6c9df8cb 6422 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
c6bb733d 6423 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6c9df8cb 6424 * gcc.dg/graphite/scop-1.c: Same.
6425 * gcc.dg/graphite/scop-2.c: Same.
6426 * gcc.dg/graphite/scop-3.c: Same.
6427 * gcc.dg/graphite/scop-4.c: Same.
6428 * gcc.dg/graphite/scop-5.c: Same.
6429 * gcc.dg/graphite/scop-6.c: Same.
6430 * gcc.dg/graphite/scop-7.c: Same.
6431 * gcc.dg/graphite/scop-8.c: Same.
6432 * gcc.dg/graphite/scop-9.c: Same.
6433 * gcc.dg/graphite/scop-10.c: Same.
6434 * gcc.dg/graphite/scop-11.c: Same.
6435 * gcc.dg/graphite/scop-12.c: Same.
6436 * gcc.dg/graphite/scop-13.c: Same.
6437 * gcc.dg/graphite/scop-matmult.c: Same.
6438 * gcc.dg/graphite/scop-14.c: Same.
6439 * gcc.dg/graphite/scop-15.c: Same.
6440 * gcc.dg/graphite/block-0.c: Same.
6441 * gcc.dg/graphite/scop-16.c: Same.
6442 * gcc.dg/graphite/block-1.c: Same.
6443 * gcc.dg/graphite/scop-17.c: Same.
6444 * gcc.dg/graphite/scop-18.c: Same.
6445 * gfortran.dg/graphite/block-1.f90: Same.
6446 * gfortran.dg/graphite/scop-1.f: Same.
6447 * gfortran.dg/graphite/block-2.f: Same.
c6bb733d 6448
64492008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6450
6451 * graphite.c: Fix some XXX comments.
6452 (build_scop_dynamic_schedules): Removed.
6453
64542008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6455
6456 * graphite.h (scop_max_loop_depth): Moved...
6457 * graphite.c (scop_max_loop_depth): ...here.
6458 (remove_all_edges_1): New.
6459 (remove_all_edges): Factored code.
6460 (remove_cond_exprs): Check only the last statement for
6461 a GIMPLE_COND expression.
6462
64632008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6464
6465 * graphite.c (scan_tree_for_params): Early return when the
6466 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6467 (find_scop_parameters): Factor out code.
6468 (graphite_trans_bb_strip_mine): Remove dead code.
6469
64702008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6471
6472 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6473 graphite_trans_bb_move_loop): Factor asserts.
6474 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6475 Do not call calculate_dominance_info and estimate_bb_frequencies.
6476
64772008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6478
6479 * graphite.c (create_loops_mapping, free_loops_mapping,
6480 create_loops_mapping_num, debug_loop_mapping_1,
6481 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6482 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6483 graphite_loops_mapping_add_child_num,
6484 graphite_loops_mapping_insert_child,
6485 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6486 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6487 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6488 create_num_from_index, get_num_from_index,
6489 swap_loop_mapped_depth): Removed.
6490 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6491 (free_scop): Do not call free_loops_mapping.
6492 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6493 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6494 get_loop_mapped_depth.
6495 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6496 (graphite_trans_bb_strip_mine): Same.
6497 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6498 (struct scop): Remove field loops_mapping.
6499
65002008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6501 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6502
6503 * graphite.c (scop_record_loop): Factor out one level of the
6504 condition by early return.
6505 (build_scop_loop_nests): Format following FSF coding style.
6506 (build_scop_dynamic_schedules): Factor out code.
6507 (scopdet_bb_info): Reindent. Default case should not be reachable.
6508
65092008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6510 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6511
6512 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6513 assignments that are not handled as simple operands for now.
6514
65152008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6516 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6517
6518 * graphite.c (build_scop_bbs): Factor up code.
6519
65202008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6521 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6522
6523 * graphite.c (stmt_simple_for_scop_p): Factor code out
6524 of the loop.
6525 (enum gbb_type): New. Group all the GBB_* types under it.
6526 (is_loop_exit): Moved...
6527 (end_scop): Enable BB spliting.
6528 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6529 * cfgloop.h (is_loop_exit): Declared.
6530
65312008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6532
6533 * doc/invoke.texi: Remove strides from examples containing
6534 DO loops when the strides are equal to 1.
6535
65362008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6537 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6538
6539 * graphite.c (graphite_trans_scop_block): Or the result with
6540 the result from graphite_trans_loop_block.
6c9df8cb 6541 * gcc.dg/graphite/block-1.c: New.
6542 * gfortran.dg/graphite/block-1.f90: New.
6543 * gfortran.dg/graphite/block-2.f: New.
c6bb733d 6544
65452008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6546
6547 * graphite.c (graphite_transform_loops): Call cloog_initialize
6548 and cloog_finalize.
6549
65502008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6551
6552 * tree-data-ref.c) (stmt_simple_memref_p): New.
6553 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6554 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6555 (is_simple_operand): Call stmt_simple_memref_p.
6556
6c9df8cb 6557 * gcc.dg/graphite/scop-matmult.c: Updated for not
c6bb733d 6558 using pointer arithmetic, as this is optimized by PRE and
6559 makes the code too difficult to analyze.
6560
6c9df8cb 6561 * gcc.dg/graphite/scop-18.c: Same.
c6bb733d 6562
65632008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6564
6565 * gdbinit.in (pgg): New.
6566
65672008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6568
6569 * graphite.c (graphite_trans_loop_block): Fix warning.
6570
65712008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6572
6573 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6574
65752008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6576
6577 * graphite.c (graphite_trans_bb_block): Remove check for
6578 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6579 Check if loop blocking is profitable for every loop, before applying
6580 the changes.
6581 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6582 if flag_loop_block is set.
6583
65842008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6585
6586 * graphite.c: Add some more documentation for the loop
6587 mapping.
6588
65892008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6590
6591 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6592 * graphite.c: Format on less than 80 columns.
6593 * graphite.h: Same.
6594
65952008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6596
6597 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6598
65992008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6600
6601 * doc/invoke.texi (floop-block, floop-strip-mine,
6602 floop-interchange): Update documentation with examples.
6603
66042008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6605
6606 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6607 add_referenced_var.
6608 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6609
66102008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6611
6612 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6613 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6614 * tree-scalar-evolution.c: Revert useless changes.
6615 * tree-phinodes.c: Same.
6616 * cfghooks.c: Same.
6617 * vec.h: Same.
6618 * tree-vectorizer.h: Same.
6619 * tree-flow.h: Same.
6620 * tree-cfg.c: Same.
6621 * common.opt (fgraphite): Update documentation.
6622
66232008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6624
6625 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6626 -floop-interchange): Add more text for explaining what each of these
6627 flags is doing.
6628 * tree-into-ssa.c (gimple_vec): Moved to...
6629 * graphite.c: Include gimple.h.
6630 (gimple_vec): Moved to...
6631 (del_loop_to_cloog_loop): Removed.
6632 (loop_affine_expr): Do not call create_data_ref when the
6633 operand is a constant.
6634 (new_scop): Use free instead of del_loop_to_cloog_loop.
6635 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6636 * gimple.h (gimple_vec): ... here.
6637
66382008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6639
6640 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6641 latch executions.
6642 (build_loop_iteration_domains): Fail, if latch executions unknown.
6643
66442008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6645
6646 * graphite.c (add_conditions_to_domain): New.
6647 (build_scop_conditions_1): Call add_conditions_to_domain.
6648 (set_cloog_options): Allow to disable optimizations.
6649
66502008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6651
6652 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6653 Do not use walk_dominator_tree.
6654 (find_scop_parameters): Do not use walk_dominator_tree.
6655
66562008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6657
6658 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6659 (idx_record_params): Adapt.
6660 * graphite.h (scop_gimple_loop_depth): New.
6661
66622008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6663
6664 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6665 (scan_tree_for_params): Remove value_init.
6666 (build_scop_context): Remove value_init.
6667 (build_loop_iteration_domains): Remove value_init.
6668 (schedule_to_scattering): Remove value_init.
6669 (graphite_trans_bb_strip_mine): Remove value_init.
6670
66712008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6672
6673 * gcc/graphite.c (limit_scops): New.
6674 (graphite_transform_loops): Add limit SCoPs.
6c9df8cb 6675 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6676 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6677 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6678 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6679 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6680 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6681 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6682 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6683 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
c6bb733d 6684 Change loop numbers.
6c9df8cb 6685 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
c6bb733d 6686 Change loop numbers.
6c9df8cb 6687 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6688 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6689 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6690 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6691 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6692 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6693 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6694 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6695 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6696 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
c6bb733d 6697
66982008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6699
6700 * graphite.c (graphite_transform_loops): Call always find_transform.
6701
67022008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6703
6704 * graphite.c (free_loops_mapping): New.
6705 (stmt_simple_for_scop_p): Fix typo.
6706 (stmt_simple_for_scop_p): Fix tuples functions, that
6707 broke polyhedron.
6708 (free_graphite_bb): Fix some memleaks.
6709 (free_scop): Fix some memleaks.
6710 (scopdet_bb_info): Do not forget some tmp SCoPs.
6711 (find_params_in_bb): Fix some memleaks.
6712 (clast_to_gcc_expression): Fix warning.
6713
67142008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6715
6c9df8cb 6716 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6717 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
c6bb733d 6718
67192008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6720
6721 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6722 Move code ifdef-ed HAVE_cloog...
6723 * graphite.c: Include toplev.h.
6724 ... here.
6725 * Makefile.in (OBJS-common): Always build graphite.o.
6726 (BACKEND): Remove @GRAPHITE@.
6727 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6728 (graphite.o): Depend on TOPLEV_H.
6729
67302008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6731
6732 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6733 Remove typo left from polylib to ppl conversion.
6734 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6735
67362008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6737
6738 * toplev.c (process_options): Move the graphite loop optimization
6739 flags...
6740 * tree-ssa-loop.c (graphite_transforms): ... here.
6741 When not configured with CLooG, print to dump_file that
6742 Graphite transforms were not performed.
6c9df8cb 6743 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
c6bb733d 6744 New.
6c9df8cb 6745 * gcc.dg/graphite/*.c: Updated all testcases to use
c6bb733d 6746 scan-graphite-dump-times.
6747
67482008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6749
6750 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6751 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6752
67532008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6754 Jan Sjodin <jan.sjodin@amd.com>
6755
6756 * configure: Regenerated.
6757 * omp-low.c (expand_omp_sections): Remove now unused code.
6758 * config.in (HAVE_polylib): Removed.
6759 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6760 (PPLLIBS, PPLINC): Added.
6761 * graphite.c: Replace unsigned with int wherever possible.
6762 Don't access Cloog's data structures, but use accessor functions.
6763 Clast's stmt->type is now implemented as a vtable: change the
6764 switches of stmt->type into ifs.
6765 (polylib/polylibgmp.h): Don't include.
6766 (initialize_dependence_polyhedron,
6767 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6768 statement_precedes_p, test_dependence, build_rdg_all_levels,
6769 dump_dependence_graph): Removed until this code is cleaned up
6770 or ported to Cloog.
6771 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6772 (POLYLIBINC): Renamed PPLINC.
6773
67742008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6775 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6776 Jan Sjodin <jan.sjodin@amd.com>
6777
6778 Finish the merge and tuplification of graphite.
6779
67802008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6781 Jan Sjodin <jan.sjodin@amd.com>
6782
6783 Partial merge from mainline (138072:138275).
6784 * graphite.c still has to be tuplified.
6785
67862008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6787
6788 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6789 (create_num_from_index): New.
6790 (get_num_from_index): Also pass in the graphite BB.
6791 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6792 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6793 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6794 (is_interchange_valid): Return false when failing.
6795 * graphite.h (struct num_map): New.
6796 (struct graphite_bb): New field num_map.
6797 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6798
67992008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6800
6801 * graphite.c (dump_gbb_conditions): Print also conditions like
6802 "if (a)". Remove dublicated code and use print_generic_expr ().
6803 (stmt_simple_for_scop_p): Only allow conditions we can handle
6804 {<, <=, >, >=}.
6805
68062008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6807
6808 * graphite.h (struct scop): Removed new_ivs field.
6809 (SCOP_NEWIVS): Deleted.
6810 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6811 clast_to_gcc_expression, graphite_create_new_loop):
6812 Removed use of new_ivs.
6813
68142008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6815
6816 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6817 create_loops_mapping_num, debug_loop_mapping_1): New.
6818 (debug_loop_mapping): Call debug_loop_mapping_1.
6819 (get_loop_mapping_for_num,
6820 graphite_loops_mapping_add_child,
6821 graphite_loops_mapping_add_child_num,
6822 graphite_loops_mapping_insert_child,
6823 graphite_loops_mapping_parent,
6824 split_loop_mapped_depth_for_num,
6825 loop_mapped_depth_split_loop): New.
6826 (increment_loop_mapped_depths): Removed.
6827 (swap_loop_mapped_depth_for_num): Reimplemented.
6828 (new_scop): Call create_loops_mapping.
6829 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6830 (translate_clast): Pass the old loop father in parameter, and pass
6831 it to get_old_iv_from_ssa_name.
6832 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6833 can_generate_code, can_generate_for_scop): New.
6834 (graphite_trans_bb_block): Returns false when it fails to transform.
6835 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6836
68372008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6838
6839 Reverted all the changes related to the streamization and
6840 loop fusion.
6841 These changes are now tracked in the streamization branch.
6842
68432008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6844 Jan Sjodin <jan.sjodin@amd.com>
6845
6846 * graphite.c (gbb_compare): Correctly constify.
6847 (gbb_can_be_ignored): Indent.
6848 (graphite_trans_scop_swap_1and2): Add legality check.
6849 Remove dead FIXMEs.
6850
68512008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6852
6853 Remove fallouts from "Reverted the Condate changes".
6854 * tree.h: Remove unused decl.
6c9df8cb 6855 * gcc.dg/tree-checker: Same.
c6bb733d 6856 * timevar.def: Remove counter.
6857
68582008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6859
6860 * Merge from mainline (135673:138072).
6861
6862 Reverted the MIRO changes (from 2008-04-05) that are now
6863 tracked in the miro branch.
6864 * tree-bounds.c: Removed.
6865 * tree-bounds.h: Removed.
6866
6867 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6868 are now tracked in the condate branch.
6869 * tree-check.c: Removed.
6870 * tree-match.c: Removed.
6871 * condate.y: Removed.
6872
68732008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6874
6875 * common.opt: New user flag -floop-block, -floop-strip-mine
6876 and -floop-interchange.
6877 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6878 graphite loop optimization flags is turned on.
6879 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6880 flag_loop_strip_mine and flag_loop_interchange checks before
6881 optimizations.
6882 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6883 -floop-strip-mine and -floop-interchange.
6c9df8cb 6884 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
c6bb733d 6885 -fgraphite.
6c9df8cb 6886 * gcc.dg/graphite/scop-16.c: Ditto.
6887 * gcc.dg/graphite/scop-17.c: Ditto.
6888 * gcc.dg/graphite/scop-18.c: Ditto.
c6bb733d 6889
68902008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6891 Sebastian Pop <sebastian.pop@amd.com>
6892
6893 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6894 (create_empty_loop_on_edge): More fixes.
6895 * tree-phinodes.c (resize_phi_node): Extern.
6896 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6897 * cfghooks.c (update_dominator_information): New split from
6898 split_edge.
6899 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6900 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6901 successor of the function entry block.
6902
6903 * graphite.c: Include pointer-set.h.
6904 (debug_loop_mapping, increment_loop_mapped_depths,
6905 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6906 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6907 swap_loop_mapped_depth_for_num, get_num_from_index,
6908 swap_loop_mapped_depth, loop_iv_stack_debug,
6909 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6910 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6911 get_old_iv_from_ssa_name): New.
6912 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6913 (free_scop): Free SCOP_LOOPS_MAPPING.
6914 (scop_record_loop): Record old ivs.
6915 (create_var_name): Removed.
6916 (initialize_cloog_names): Allocate double space in case strip mine
6917 applies to all loops once.
6918 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6919 (clast_to_gcc_expression): Same. Implement more clast to gimple
6920 translation.
6921 (graphite_create_new_loop): Pass in ivstack.
6922 (remove_all_edges): Pass in the construction_edge.
6923 (graphite_remove_iv): Removed.
6924 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6925 remove_cond_exprs): Rewritten.
6926 (move_phi_nodes): New.
6927 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6928 (translate_clast): Pass in ivstack. Rewrite some cases.
6929 (set_cloog_options, debug_clast_stmt): New.
6930 (find_transform): Use set_cloog_options.
6931 (outermost_loop_layer): Removed.
6932 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
6933 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
6934 mark_old_loops, remove_dead_loops): New.
6935 (gloog): Rewritten.
6936 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
6937 (const_column_index, get_first_matching_sign_row_index,
6938 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
6939 get_upper_bound): New.
6940 (graphite_trans_bb_strip_mine): Also update the iv map.
6941
6942 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
6943 (struct name_tree): Add a loop field.
6944 (struct scop): Add a graphite_loops_mapping field.
6945 (SCOP_LOOPS_MAPPING): New.
6946 (debug_clast_stmt): Declare.
6947 * lambda.h (find_induction_var_from_exit_cond): Declare.
6948 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
6949 * cfgloop.h (update_dominators_in_loop): Removed declaration.
6950 (create_empty_loop_on_edge): Updated.
6951 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
6952 rename_variables_in_bb): Declare.
6953 * tree-cfg.c (remove_bb): Extern.
6954
6c9df8cb 6955 * gcc.dg/graphite/block-0.c: New.
c6bb733d 6956
69572008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6958 Sebastian Pop <sebastian.pop@amd.com>
6959
6960 * graphite.c (strip_mine_profitable_p): New.
6961 (graphite_trans_bb_block): Disable strip mining if not profitable.
6962
6c9df8cb 6963 * gcc.dg/graphite/scop-18.c: New.
6964 * gcc.dg/graphite/scop-17.c: Fixed.
6965 * gcc.dg/graphite/scop-16.c: Fixed.
c6bb733d 6966
69672008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
6968 Jan Sjodin <jan.sjodin@amd.com>
6969 Sebastian Pop <sebastian.pop@amd.com>
6970
6971 * graphite.c (is_interchange_valid): New.
6972 (graphite_trans_bb_block): Check loop nest of basic block for legality
6973 of interchange.
6974
6975 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
6976 outer_most_loop, gbb_outer_most_loop_index): New.
6977
6978 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
6979 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6c9df8cb 6980 * gcc.dg/graphite/scop-16.c: New.
6981 * gcc.dg/graphite/scop-17.c: New.
c6bb733d 6982
69832008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6984
6985 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
6986 (graphite_trans_scop_block): Ignore SCoPs without bbs.
6987
69882008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
6989
6990 * graphite.c (new_scop): Initialize SCOP_EXIT.
6991 (scopdet_info): Add.
6992 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
6993 (build_scops_1): Cleanup, bugfixes.
6994 (build_scops): Cleanup.
6995
6c9df8cb 6996 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
6997 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
c6bb733d 6998
69992008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7000
6c9df8cb 7001 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
c6bb733d 7002
6c9df8cb 7003 * gfortran.dg/graphite/graphite.exp: Use
c6bb733d 7004 DEFAULT_GRAPHITE_FLAGS.
7005
6c9df8cb 7006 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
c6bb733d 7007
70082008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7009
7010 * graphite.c (scan_tree_for_params): Do not assert any more if
7011 MULT_EXPR parameter is negative.
7012
6c9df8cb 7013 * gfortran.dg/graphite/scop-1.f: New.
c6bb733d 7014
6c9df8cb 7015 * gfortran.dg/graphite/graphite.exp: New.
c6bb733d 7016
6c9df8cb 7017 * gcc.dg/graphite/scop-15.c: New.
c6bb733d 7018
70192008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7020
7021 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7022
70232008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7024
7025 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7026 graphite_swap_loops.
7027 (graphite_trans_bb_move_loop): New.
7028 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7029 (graphite_trans_bb_block): New.
7030 (graphite_trans_loop_block): New.
7031 (graphite_trans_scop_swap_1and2): Rename from
7032 graphite_trans_swap_1and2.
7033 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7034 (graphite_trans_scop_block): New.
7035 (graphite_apply_transformations): Rename from
7036 graphite_transformations.
7037
6c9df8cb 7038 * gcc.dg/graphite/scop-matmult.c: New.
c6bb733d 7039
70402008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7041
7042 * graphite.c (gbb_compare): New.
7043 (graphite_sort_gbbs): New.
7044 (gbb_can_be_ignored): New.
7045 (scop_remove_ignoreable_gbbs): New.
7046 (graphite_transformations): Cleanup and add
7047 scop_remove_ignoreable_gbbs.
7048 * lambda.h (lambda_vector_compare): New.
7049
70502008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7051
7052 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7053 (graphite_swap_loops): int -> unsigned
7054 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7055 (graphite_transformations): New.
7056 (graphite_transform_loops): Move to graphite_transformations.
7057 * graphite.h (gbb_nb_loops): Return unsigned.
7058
70592008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7060
7061 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7062 the domain matrix. This makes scop-0.c work again.
7063
70642008-06-20 Richard Guenther <rguenther@suse.de>
7065
7066 * graphite.h: Adjust copyright to GPLv3.
7067 * graphite.c: Likewise.
7068 (stmt_simple_memref_for_scop_p): Split out from ...
7069 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7070 and simplify.
7071 (get_bb_type): Optimize.
7072 (is_pred): Remove.
7073 (is_bb_addable): Fix memleak, replace is_pred call with
7074 single_pred.
7075 (build_scops): Use current_loops.
7076 (param_index): Fix memleak.
7077
70782008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7079
7080 * graphite.c: Fix formatting.
7081
70822008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7083
7084 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7085 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7086 (create_var_name, save_var_name): Newly defined functions.
7087 (initialize_cloog_names): Part of the code factored out to
7088 save_var_name.
7089 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7090 in clast_reduction statement.
7091 (graphite_create_new_loop): Now takes a new parameter
7092 for outer_loop.
7093 (translate_clast): Now also takes the context_loop and bb_exit
7094 parameters. Rewritten the code so that it creates a gimple code
7095 inside the given context.
7096 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7097 remove_cond_expr, disconnect_cond_expr,
7098 disconnect_virtual_phi_nodes): Newly defined functions.
7099 * graphite.h (struct scop): added old_ivs vector.
7100 SCOP_OLDIVS: New macro.
7101
71022008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7103
7104 * cfgloopmanip.c: Add missing function comments, fix formatting.
7105
71062008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7107
7108 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7109 (create_empty_loop_on_edge): Defined.
7110 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7111 instead of void.
7112 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7113 (update_dominators_in_loop): Declared as extern
7114 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7115
71162008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7117
7118 * graphite.c (print_graphite_bb): Allow changing number of loops
7119 in SCoP domain.
7120 (initialize_cloog_names): Allow changing number of loops.
7121 (build_cloog_prog): Simplify.
7122 (find_transform): Enable cloog option --strides.
7123 (graphite_swap_loops): New.
7124 (graphite_strip_mine_loop): New.
7125 (graphite_trans_swap_1and2): New.
7126 (graphite_trans_strip): New.
7127 (graphite_transform_loops): Add graphite_trans_strip.
7128 * graphite.h (scop_max_loop_depth): New.
7129
71302008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7131
7132 * graphite.c (build_scop_iteration_domain): Remove forgotten
7133 line. (Fixes compile)
7134
71352008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7136
7137 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7138 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7139 (build_bb_loops): New.
7140 (graphite_transform_loops): Add build_bb_loops.
7141 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7142 numbers.
7143 * graphite.h (graphite_bb): Add loops.
7144 (gbb_nb_loops): New.
7145 (gbb_loop_at_index): New.
7146 (gbb_loop_index): New.
7147 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7148 using nb_params_in_scop.
7149
71502008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7151
7152 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7153 (build_scop_canonical_schedules): Build minimized schedule.
7154 (schedule_to_scattering): Adapt to minimized schedule.
7155 * graphite.h (graphite_bb): Add/Update descriptions.
7156
71572008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7158 Tobias Grosser <grosser@fim.uni-passau.de>
7159
7160 * graphite.c (print_graphite_bb): Add condition printing.
7161 (dump_value): New.
7162 (dump_gbb_conditions): New.
7163 (build_scop_conditions_1): New.
7164 (build_scop_conditions): New.
7165 * graphite.h (graphite_bb): Add conditions.
7166
71672008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7168
7169 * graphite.c (print_graphite_bb):
7170 (free_graphite_bb): New.
7171 (free_scop): Free bbs.
7172 (get_bb_type): Free doms.
7173 (build_scop_context): Free context matrix.
7174 (build_loop_iteration_domains): Remove unused code.
7175 (build_cloog_prog): Free scattering function and blocklist.
7176 (find_transform): Free options.
7177
71782008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7179
7180 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7181 Remove unnecessery cloog data structures. Make a copy of the domain
7182 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7183 unnecessary cloog data structures. Fix memory leaks. Remove insert
7184 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7185 used.
7186 (build_scop_iteration_domain): Remove unnecessary cloog
7187 data structures. Fix memory leaks.
7188 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7189 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7190
71912008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7192
7193 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7194
71952008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7196
7197 * graphite.c (end_scop): Style fix.
7198 (schedule_to_scattering): Style and comment fix.
7199
72002008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7201 * graphite.c (print_graphite_bb): Fix definiton of
7202 schedule_to_scattering.
7203 (initialize_cloog_names): Change nb_scattdims to max loop
7204 depth in SCoP.
7205 (schedule_to_scattering): Take parameter for number of scattering
7206 dimensions.
7207 (build_cloog_prog): Only build as much scattering dimensions as
7208 necessary.
7209
72102008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7211
7212 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7213 in polyhedron/aermod.f90.
7214
72152008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7216 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7217 Harsha Jagasia <harsha.jagasia@amd.com>
7218
7219 * graphite.c (is_bb_addable): Fix segfault.
7220
72212008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7222
7223 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7224 with multiple exits and conditional handling in edge cases.
7225 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7226
6c9df8cb 7227 * gcc.dg/graphite/scop-14.c: New.
c6bb733d 7228
72292008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7230 Adrien Eliche <aeliche@isty.uvsq.fr>
7231
7232 * graphite.c (is_bb_addable): Add more comments and enhance
7233 readablity of the source code. Fix memory leak.
7234 (is_loop_exit): Fix memory leak.
7235
72362008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7237
7238 * graphite.c (first_loop_in_scop): Deleted.
7239 (setup_cloog_loop): Only walk the loop chain for inner loops.
7240 (build_scop_iteration_domain): Execute setup_cloog_loop for
7241 all loops in the first layer.
7242
72432008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7244
7245 * graphite.c (scan_tree_for_params): Change the way params are
7246 added to be indepenent of the number of loops.
7247 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7248 handling.
7249 (build_cloog_prog): Revert to short matrix format.
7250
72512008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7252 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7253
7254 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7255 warning.
7256
72572008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7258
7259 * graphite.c (nb_data_refs_in_scop): New.
7260 (graphite_transform_loops): Print more stats: number of
7261 loops, basic blocks and data references per scop.
7262
72632008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7264 Jan Sjodin <jan.sjodin@amd.com>
7265
7266 * graphite.c (loop_affine_expr, idx_record_params,
7267 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7268 instead of instantiate_parameters.
7269
72702008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7271
7272 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7273 add support for parameters, add STATIC_SCHEDULE at the right places,
7274 cleanup.
7275
72762008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7277
7278 * graphite.c (build_scop_loop_nests): Only add the loops, that
7279 are contained completely in the SCoP.
7280 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7281 and the domains are fixed.
7282 (build_scop_canonical_schedules): Add support for bbs not contained
7283 in any SCoP.
7284
72852008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7286
7287 * graphite.h (scop_contains_loop): Update comments to match
7288 the actual behavior.
7289 (scop_contains_loop): New.
7290 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7291
72922008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7293
7294 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7295 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7296 as GBB_COND_HEADER.
7297
72982008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7299 Tobias Grosser <grosser@fim.uni-passau.de>
7300
7301 * graphite.c (graphite_transform_loops): Early return when
7302 there are no loops in the function.
7303
73042008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7305 Jan Sjodin <jan.sjodin@amd.com>
7306
7307 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7308 offset of the last loop.
7309 (setup_cloog_loop): Copy the entire outer constraint matrix.
7310
73112008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7312 Jan Sjodin <jan.sjodin@amd.com>
7313
7314 * graphite.c (stmt_in_scop_p, function_parameter_p,
7315 invariant_in_scop_p): Removed.
7316 (scan_tree_for_params): Can be used with no constraint
7317 matrix for gathering parameters.
7318 (idx_record_params): Don't use idx_record_param, instead use
7319 scan_tree_for_params.
7320 (find_scop_parameters): Same.
7321 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7322 Fix the size of loop domains.
7323 (schedule_to_scattering): Exit when the outer loop is not in scop.
7324 (find_transform): Enable build_cloog_prog.
7325
73262008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7327 Jan Sjodin <jan.sjodin@amd.com>
7328
7329 * graphite.c (schedule_to_scattering): Make scattering domains
7330 uniformly of the same size, as required by CLooG 0.14.0 and before.
7331
73322008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7333 Jan Sjodin <jan.sjodin@amd.com>
7334
7335 * graphite.c (schedule_to_scattering): Rewrite, correct the
7336 translation of the scheduling function to scattering.
7337 (build_cloog_prog): Call schedule_to_scattering only once.
7338 * graphite.h (scop_loop_index): Do not fail for loops not
7339 in the scop: return -1.
7340
73412008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7342
7343 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7344 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7345 (setup_cloog_loop): Export GBB_DOMAIN.
7346 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7347 able to rebuild the original control flow.
7348 * graphite.h (graphite_bb): Add domain field and access macro.
7349 (GBB_DOMAIN): New.
7350
73512008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7352
7353 * graphite.c (debug_gbb): New.
7354 (print_scop, build_graphite_bb): Use SCOP_BBS.
7355 (build_scop_bbs): Reimplemented.
7356 (dfs_bb_in_scop_p): Removed.
7357 (build_scop_loop_nests): Reorder loops inserted in
7358 SCOP_LOOP_NEST: outer loops should come first.
7359 (build_scop_canonical_schedules): Reinitialize at zero
7360 the components of the SCOP_STATIC_SCHEDULE for the loops
7361 that have already been parsed.
7362
7363 * graphite.h (debug_gbb): Declared.
7364
73652008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7366 Jan Sjodin <jan.sjodin@amd.com>
7367
7368 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7369 (graphite_loop_to_gcc_loop): Removed.
7370 (remove_all_edges): New.
7371 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7372 (gloog): Remove useless code.
7373
73742008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7375
7376 * graphite.c (get_bb_type): Reworked. We distinguish between
7377 loops with one or multiple exits.
7378 (is_loop_exit): New.
7379 (is_pred): New.
7380 (is_bb_addable): Rework condition handling, now support for case
7381 case statements and loops with multiple exits.
7382
6c9df8cb 7383 * gcc.dg/graphite/scop-11.c: New.
7384 * gcc.dg/graphite/scop-12.c: New.
7385 * gcc.dg/graphite/scop-13.c: New.
c6bb733d 7386
73872008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7388
7389 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7390 we have too many colors.
7391
73922008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7393
7394 * doc/invoke.texi (-ftree-loop-fusion): Document.
7395 * tree-pass.h (pass_loop_fusion): Declared.
7396 * tree-loop-fusion.c: New.
7397 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7398 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7399 * tree-data-ref.h (find_data_references_in_loop): Declared.
7400 * common.opt (ftree-loop-fusion): Declared.
7401 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7402
74032008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7404
7405 * graphite.c (build_access_matrix): Fix typo from the merge.
7406
74072008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7408
7409 * Merge from mainline (130800:135673).
7410
74112008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7412
7413 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7414 Update dominators after splitting.
7415
74162008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7417
7418 * graphite.c (is_bb_addable): Return the harmful statement.
7419 Factor up some code.
7420 (end_scop): New. Splits end of scope bbs on a harmful statement.
7421 (build_scops_1): Call end_scop.
7422
74232008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7424
7425 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7426 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7427 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7428 build_scops_1): Removed.
7429 (build_scops_2): Renamed build_scops_1.
7430
74312008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7432
7433 * graphite.c: Fix formatting.
7434
74352008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7436
7437 * graphite.c (get_bb_type): New.
7438 (move_scops): New.
7439 (build_scops_2): New.
7440 (is_bb_addable): New.
7441 (build_scops): Switch the scop detection.
7442 (build_scop_bbs): Add entry bb to scop.
7443 * graphite.h (struct scop): Update comment.
7444
74452008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7446
7447 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7448 more colors.
7449
74502008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7451
6c9df8cb 7452 * gcc.dg/graphite/scop-1.c: Update.
7453 * gcc.dg/graphite/scop-2.c: Update.
7454 * gcc.dg/graphite/scop-4.c: Update.
7455 * gcc.dg/graphite/scop-5.c: Add.
7456 * gcc.dg/graphite/scop-6.c: Add.
c6bb733d 7457
74582008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7459
6c9df8cb 7460 * gcc.dg/graphite/scop-0.c: Add.
7461 * gcc.dg/graphite/scop-7.c: Add.
7462 * gcc.dg/graphite/scop-8.c: Add.
7463 * gcc.dg/graphite/scop-9.c: Add.
7464 * gcc.dg/graphite/scop-10.c: Add.
c6bb733d 7465
74662008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7467
7468 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7469 Check affine expressions depending on the outermost loop
7470 instead of a scop.
7471 (stmt_simple_for_scop_p): Same.
7472 (harmfule_stmt_in_scop): Same.
7473
74742008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7475
7476 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7477 mark entry and exit, that are not part of the SCoP and update HTML
7478 formatting.
7479
74802008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7481
7482 * graphite.c (basic_block_simple_for_scop_p): Renamed
7483 harmful_stmt_in_bb.
7484 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7485 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7486 (all_preds_visited_p, all_succs_visited_p,
7487 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7488 scop_end_loop): New.
7489 (build_scops): Do not use dfs_enumerate_from.
7490
6c9df8cb 7491 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
c6bb733d 7492
74932008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7494
7495 * graphite.c: Add comments to functions that are missing a
7496 description.
7497 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7498
74992008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7500
7501 * graphite.c (nb_params_in_scop): Moved...
7502 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7503 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7504 (clast_to_gcc_expression): Reduce column size to less than 80.
7505 (graphite_create_iv): Return the new name of the IV.
7506 (find_transform): Set options->esp and options->cpp.
7507 (gloog): Comment out the invalidation of the old loop code.
7508 (initialize_dependence_polyhedron): Replace scop_nb_params with
7509 nb_params_in_scop.
7510
7511 * graphite.h (nb_params_in_scop): ... here.
7512 (scop_nb_params): Removed.
7513 (loop_domain_dim): Return something even when the loop was not
7514 found in the hash table: avoid ICEing on all the graphite.exp
7515 testcases.
7516
75172008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7518
7519 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7520
7521 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7522 according to nesting level.
7523 (find_scop_parameters): Call instantiate_parameters.
7524 (scan_tree_for_params): Extend it to handle general affine bounds.
7525 Inner loop bound can depend on outer loop induction variable.
7526 (setup_cloog_loop): tmp variable is allocated on stack. Call
7527 instantiate_parameters with respect to outermost_loop_in_scop.
7528 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7529 graphite.h.
7530 (create_empty_loop): Function loopify should be given edge
7531 probability, instead of edge frequency. Dominance relation from
7532 switch_bb to loop_header.
7533 (clast_to_gcc_expression): Added handling of clast_reduction node.
7534 (gloog): New functionality for removing old loop.
7535 (test_dependence): Factored out from build_rdg_all_levels.
7536 (build_rdg_all_levels): Dependence testing factored out to
7537 test_dependence function.
7538
7539 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7540 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7541 from graphite.c
7542
75432008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7544
7545 * graphite.c (free_scop, param_index, initialize_cloog_names,
7546 nb_params_in_scop): Use name_tree map instead of just a tree
7547 for keeping track of the variable name associated to that tree.
7548 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7549 clast_to_gcc_expression, graphite_create_iv,
7550 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7551 graphite_stmt_to_gcc_stmt): New.
7552 (gloog): Call these.
7553 * graphite.h (struct name_tree): New.
7554 (struct scop): Use name_tree instead of tree for params.
7555 Store a vector of name_tree for new_ivs.
7556 (SCOP_NEWIVS): New.
7557 (scop_nb_params): Use name_tree instead of tree.
7558
75592008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7560 Sebastian Pop <sebastian.pop@amd.com>
7561
7562 * tree-bounds.c: New.
7563 * tree-bounds.h: New.
7564 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7565 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7566 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7567 flag_mudflap.
7568 * gcc.c: Same.
7569 * toplev.c: Same.
7570 * c-cppbuiltin.c: Same.
7571 * c-pragma.c: Same.
7572 * common.opt: Same.
7573 * varasm.c: Same.
7574 * tree-outof-ssa.c: Same.
7575 * c-common.c: Same.
7576 * Makefile.in: Same.
7577
75782008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7579 Sebastian Pop <sebastian.pop@amd.com>
7580
7581 * tree-loop-distribution.c (remaining_stmts,
7582 upstream_mem_writes): Removed static variables.
7583 (copy_loop_before, create_bb_after_loop,
7584 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7585 rdg_build_components, rdg_build_partitions,
7586 dump_rdg_partitions): Extern.
7587 (generate_loops_for_partition, generate_code_for_partition): Do not
7588 return a bool.
7589 (already_processed_vertex_p, predecessor_has_mem_write,
7590 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7591 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7592 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7593 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7594 Pass remaining_stmts and upstream_mem_writes as parameters.
7595 (rdg_component): Moved...
7596 (build_rdg_partition_for_component): Do not aggregate components when
7597 flag_streamize_loops is set.
7598 (gen_sequential_loops): New.
7599 (ldist_gen): Call gen_sequential_loops.
7600
7601 * tree-pass.h (pass_loop_streamization): Declared.
7602
7603 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7604 basic blocks when loops structures exist.
7605
7606 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7607
7608 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7609
7610 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7611 eliminate_local_variables_stmt, eliminate_local_variables,
7612 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7613 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7614 of code delimited by two edges in the CFG.
7615 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7616 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7617 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7618 the case of parallelisation of reductions.
7619 (create_loop_fn): Extern.
7620 (create_omp_parallel_region): New.
7621
7622 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7623 dump_data_reference for printing dra and drb.
7624 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7625 RDGE_RELATION.
7626 (build_rdg): Don't call free_dependence_relations for the moment, as
7627 we attach dependence relations on each edge of the RDG.
7628 To be fixed later.
7629
7630 * tree-data-ref.h (rdg_component): ...here.
7631 (struct rdg_edge): New field ddr_p relation.
7632 (RDGE_RELATION): New.
7633 (create_bb_after_loop, copy_loop_before,
7634 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7635 rdg_build_partitions, dump_rdg_partitions,
7636 free_rdg_components): Declared.
7637
7638 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7639 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7640
7641 * tree-loop-streamization.c: New.
7642
7643 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7644 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7645
7646 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7647
7648 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7649
7650 * passes.c: Schedule pass_loop_streamization.
7651
76522008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7653
7654 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7655 update comment.
7656
76572008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7658
7659 * graphite.c (dot_all_scops): Update formatting.
7660 Bbs can now be part of more than one SCoP.
7661
76622008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7663
7664 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7665 malloc problems.
7666 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7667 * graphite.h (loop_to_cloog_loop): New.
7668
76692008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7670
7671 * graphite.c (loop_domain_dim, ref_nb_loops,
7672 loop_iteration_vector_dim): New.
7673 (build_access_matrix_with_af, build_access_matrix,
7674 initialize_dependence_polyhedron): Fixed for new matrix layout.
7675 No longer assume that all iteration domains are of the same
7676 dimensionality.
7677
76782008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7679
7680 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7681 defined in a loop at depth 0 is invariant.
7682 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7683 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7684 be called at loop depth 0.
7685
7686 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7687 a parameter.
7688 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7689 (down_open_scop): Removed.
7690 (loop_in_scop_p): Redefined.
7691 (scop_affine_expr): New argument: scop.
7692 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7693 a harmful statement ending a scop.
7694 (basic_block_simple_for_scop_p): New argument: scop.
7695 (get_loop_start): Removed.
7696 (new_scop): Initialize SCOP_LOOPS.
7697 (free_scop): Free SCOP_LOOPS.
7698 (succs_at_same_depth, preds_at_same_depth): New.
7699 (end_scop): Test the validity of a scop.
7700 (add_dominators_to_open_scops): New.
7701 (test_for_scop_bound): Call add_dominators_to_open_scops.
7702 Add cases for opening and closing multiple scops.
7703 (build_scops, build_scop_bbs): Iterate over basic blocks in
7704 depth first order.
7705 (build_graphite_bb): Pass scop directly.
7706 (dfs_bb_in_scop_p): New.
7707 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7708 several times.
7709 (nb_loops_around_gb): Use loop_in_scop_p.
7710 (schedule_to_scattering): Disabled for the moment the code computing
7711 the "textual order for outer loop".
7712
7713 * graphite.h (struct scop): New field loops.
7714 (SCOP_LOOPS): New.
7715 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7716
6c9df8cb 7717 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
c6bb733d 7718
77192008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7720 Sebastian Pop <sebastian.pop@amd.com>
7721
7722 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7723 * common.opt (fstreamize-loops): New.
7724 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7725 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7726 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7727 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7728
77292008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7730
7731 * tree-data-ref.c (build_empty_rdg): New.
7732 (build_rdg): Use it.
7733 * tree-data-ref.h (build_empty_rdg): Declared.
7734 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7735 (find_vertex_for_stmt): Removed.
7736 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7737
77382008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7739
7740 * tree-loop-distribution.c (generate_builtin): After cancelling the
7741 loop tree, also delete basic blocks.
7742 (rdg_flag_uses): Stop recursion when a vertex has already been
7743 processed.
7744
77452008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7746
7747 * graphite.c (build_scop_alpha): Removed.
7748 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7749 and dump_dependence_graph to avoid compiler warnings.
7750
77512008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7752
7753 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7754 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7755 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7756 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7757 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7758 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7759 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7760 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7761 dump_dependence_graph): New.
7762 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7763 (GBB_ALPHA): New.
7764 (struct scop): New field loop2cloog_loop.
7765 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7766 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7767
77682008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7769
7770 * graphite.c (build_graphite_bb): Fix initialization
7771 of the graphite basic block.
7772
77732008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7774
7775 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7776 loop domain matrix. Pass in the number of loops contained in the
7777 constraint matrix.
7778 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7779 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7780 loops that are not surrounding the current loop are not represented
7781 in the domain constraint matrix.
7782 (build_scop_iteration_domain): Initial domain constraint matrix
7783 contains only the eq/ineq, cst, and scop parameters columns.
7784
77852008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7786
7787 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7788 (print_graphite_bb): Print scattering.
7789
77902008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7791
7792 * graphite.c (initialize_cloog_names): Initialize names of
7793 scattering variables.
7794
77952009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7796
7797 * graphite.c (dot_all_scops_1): Disable debug output while
7798 printing graph.
7799
78002008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7801
7802 * graphite.c (find_transform): Change cloog output language to C.
7803
78042008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7805
7806 * tree-loop-distribution.c (generate_memset_zero,
7807 generate_builtin, generate_code_for_partition,
7808 rdg_flag_all_uses): New.
7809 (rdg_flag_uses): Gather in the same partition the statements defining
7810 the VUSES of the current statement.
7811 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7812 Gather in the same partition not only the stores to the same memory
7813 access, but also the reads.
7814 (ldist_generate_loops): Renamed ldist_gen.
7815
78162008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7817 Tobias Grosser <grosser@fmi.uni-passau.de>
7818
7819 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7820 next pointer, don't use the inner pointer.
7821
78222008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7823
7824 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7825 (find_transform): Call dot_all_1.
7826 * graphite.h (dot_all_scops): Declared.
7827
78282007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7829
7830 * tree-loop-distribution.c: Fix apsi.f ICE.
7831 (create_bb_after_loop): New.
7832 (generate_loops_for_partition): Use it.
6c9df8cb 7833 * gfortran.dg/ldist-1.f90: New.
c6bb733d 7834
7835 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7836 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7837
78382007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7839
7840 * graphite.c (find_transform): Dump cloog program sent to cloog.
7841
78422007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7843
7844 * graphite.c (initialize_cloog_names): Initialize cloog
7845 iterator names.
7846
78472007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7848
7849 * graphite.c (build_scop_context): Fix typo, for the matrix
7850 format: insert '0 >= 0' instead of '-1 >= 0'.
7851
78522007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7853
7854 * Fix merge problems.
7855
78562007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7857
7858 * graphite.c (setup_cloog_loop): Fix typo.
7859
78602007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7861
7862 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7863 * tree-loop-distribution.c: Reimplemented.
7864 * tree-pass.h (pass_loop_distribution): New.
7865 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7866 print_loops.
7867 * graphds.h (struct graph): New field indexes.
7868 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7869
7870 * tree-vect-analyze.c: Remove declaration of static functions when not
7871 needed.
7872 * tree-vectorizer.c: Same.
7873 (rename_variables_in_loop): Now extern.
7874 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7875 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7876 calling redirect_edge_and_branch_force.
7877
7878 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7879
7880 * tree-data-ref.c: Don't include tree-chrec.h.
7881 (debug_data_dependence_relations): New.
7882 (dump_data_dependence_relation): Call dump_data_reference on data refs
7883 in the relation.
7884 (same_access_functions): Moved...
7885 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7886 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7887 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7888 struct rdg_vertex_info, ): New.
7889 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7890 at DDR_REVERSED_P.
7891 (create_rdg_vertices): Initialize the htab of graph->indexes.
7892 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7893 (stmts_from_loop): Don't save LABEL_EXPR.
7894 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7895 hash_stmt_vertex_del): New.
7896 (build_rdg): Initialize rdg->indexes.
7897 (free_rdg, stores_from_loop, ref_base_address,
7898 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7899 have_similar_memory_accesses_1, ref_base_address_1,
7900 remove_similar_memory_refs): New.
7901
7902 * tree-data-ref.h: Include tree-chrec.h.
7903 (debug_data_dependence_relations): Declared.
7904 (same_access_functions): ...here. Now static inline.
7905 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7906 ddr_dependence_level): New.
7907 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7908 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7909 RDG_MEM_READS_STMT): New.
7910 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7911 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7912 rdg_vertex_for_stmt): Declared.
7913 (struct rdg_edge): New field level.
7914 (RDGE_LEVEL, free_rdg): New.
7915 (stores_from_loop, remove_similar_memory_refs,
7916 rdg_defs_used_in_other_loops_p,
7917 have_similar_memory_accesses): Declared.
7918 (rdg_has_similar_memory_accesses): New.
7919
7920 * lambda.h (dependence_level): New.
7921 * common.opt (ftree-loop-distribution): New.
7922 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7923 (print_loop_ir): Renamed print_loops.
7924 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7925 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7926 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7927 (tree-loop-distribution.o): Added.
7928 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7929 (mark_virtual_ops_in_bb): New.
7930 (print_loops_bb, debug_loop_num, debug_loop): New.
7931 * passes.c: Scheduled pass_loop_distribution.
7932
79332007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7934
7935 * graphite.c (scan_tree_for_params): Correct the number of columns
7936 for polylib format.
7937 (nb_flat_iterator): New.
7938 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
7939 (build_scop_iteration_domain): Correct the number of columns for
7940 polylib format.
7941
79422007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7943
7944 * Merge from mainline (129697:130800).
7945
79462007-10-30 Sebastian Pop <sebastian.pop@amd.com>
7947
7948 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
7949 dominated by SCoP's exit.
7950 (graphite_transform_loops): Compute post dominators.
7951
79522007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7953
7954 * Merge from mainline (127169:129697).
7955
79562007-10-28 Sebastian Pop <sebastian.pop@amd.com>
7957
7958 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
7959 parameter for the basic block that contains the expression. Use
7960 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
7961 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
7962 the expression.
7963 * graphite.h (gbb_loop): New.
7964 (GBB_LOOP): Removed.
7965
79662007-08-03 Sebastian Pop <sebpop@gmail.com>
7967
7968 * Makefile.in: Fix merge problem.
7969
79702007-08-03 Sebastian Pop <sebpop@gmail.com>
7971
7972 * Merge from mainline (125309:127169).
7973 * tree-loop-distribution.c: Disabled.
7974
79752007-06-05 Sebastian Pop <sebpop@gmail.com>
7976
7977 * Merge from mainline (r123693:125309).
7978
79792007-05-30 Sebastian Pop <sebpop@gmail.com>
7980
7981 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
7982 correct_modify_p
7983 (correct_modify_p, check_statements, number_of_lvalue_uses,
7984 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
7985 instead of MODIFY_EXPR.
7986 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
7987 and push new edges.
7988
79892007-05-24 Sebastian Pop <sebpop@gmail.com>
7990
7991 * tree-loop-distribution.c (struct rdg): Replace arrays by
7992 VECs for edges and vertices.
7993 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
7994 (RDGV_NB_PARTITIONS): New.
7995 (PRDG_NBV, PRDG_NBE): Removed.
7996 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
7997 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
7998 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
7999
80002007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8001 Sebastian Pop <sebpop@gmail.com>
8002
8003 * doc/invoke.texi (-ftree-loop-distribution): Document.
8004 * tree-loop-distribution.c: New file.
8005 * tree-pass.h (pass_loop_distribution): Declared.
8006 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8007 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8008 and set reversed_p.
8009 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8010 (DDR_REVERSED_P): New.
8011 * common.opt (-ftree-loop-distribution): New.
8012 * tree-flow.h (distribute_loops): Declared.
8013 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8014 * passes.c (init_optimization_passes): Schedule loop distribution.
8015
80162007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8017
8018 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8019 (print_scop): Don't print when scop is NULL.
8020 (build_scop_context, find_transform): Don't output to stderr.
8021
80222007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8023
8024 * tree-data-ref.c: Don't include graphite.h.
8025 Comment out the code for printing data reference's scop.
8026 (build_access_matrix_with_af): Moved...
8027 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8028 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8029 (print_graphite_bb): Print basic block's schedule.
8030 (print_scop): Don't print the schedule, call cloog's pretty printer.
8031 (bb_in_scop_p): A basic block is in a scop only if it is both
8032 dominated and postdominated by the scop's entry and exit basic blocks.
8033 (function_parameter_p): New.
8034 (invariant_in_scop_p): Use function_parameter_p.
8035 (new_scop, save_scop): New.
8036 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8037 save_scop.
8038 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8039 (loop_in_scop_p): New.
8040 (scop_record_loop): Use loop_in_scop_p.
8041 (build_scop_domain): Renamed build_scop_iteration_domain.
8042 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8043 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8044 setup_cloog_loop, dot_scop_1, dot_scop): New.
8045 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8046 (struct scop): Add a pointer to cloog's representation of a program.
8047
80482007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8049
8050 * doc/invoke.texi (-ftree-check-verbose): Renamed
8051 -ftree-checks-verbose.
8052 * common.opt (flag_tree_check_verbose): Renamed
8053 flag_tree_checks_verbose.
8054 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8055
80562007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8057
8058 * configure: Regenerated.
8059 * config.in: Regenerated.
8060 * tree-ssa-loop.c (graphite_transforms): Execute
8061 graphite_transform_loops only when HAVE_cloog.
8062 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8063 * graphite.c: Include polylibgmp.h and cloog.h.
8064 (graphite_transform_loops): Removed loops parameter.
8065 * tree-flow.h (graphite_transform_loops): Update declaration.
8066 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8067 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8068 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8069 (OBJS-common): Remove dependence on graphite.o.
8070 (BACKEND): Depend on @GRAPHITE@.
8071
80722007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8073
8074 * doc/invoke.texi (-ftree-check-verbose): Documented.
6c9df8cb 8075 * gcc.dg/tree-checker/tree-checks-1.c: New.
8076 * gcc.dg/tree-checker/tree-checks-2.c: New.
8077 * gcc.dg/tree-checker/tree-checks-3.c: New.
8078 * gcc.dg/tree-checker/tree-checks-4.c: New.
8079 * gcc.dg/tree-checker/tree-checks.exp: New.
8080 * gcc.dg/tree-checker/condates.crp: New.
c6bb733d 8081 * common.opt (ftree-checks-verbose): New.
8082 * tree-check.c (tree_check_warning): Move extra stderr output
8083 under control of flag_tree_check_verbose.
8084
80852007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8086
8087 * tree-match.c: Fix comments formatting.
8088 * tree-match.h: Fix comments formatting.
8089 * tree-check.c: Fix comments formatting.
8090 (tree_check_init): Restructure.
8091
80922007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8093
8094 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8095
80962007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8097
8098 * Merge from mainline (r120733:123693).
8099
81002007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8101
8102 * condate.y: New file.
8103 * tree-match.h (struct patt_info_s): New field sign.
8104 (struct condate_s): New field msg.
8105 (normalize_condate, name_condate, add_condate): New.
8106 (conds[], condate_parse): Made extern.
8107 * tree-check.c (tree_check_warning): First arg changed to cond;
8108 warning reformatted.
8109 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8110 (tree_scan): New.
8111 (tree_check): Process trivial condates.
8112 (read_delimited_string): Removed.
8113 (print_cond): Print name and msg.
8114 (conds[]): Made extern.
8115 (parse_tree_check_file_once): Rewritten to use the parser in
8116 condate.y.
8117 Processing of option --tree_check_string moved to tree_scan().
8118 * Makefile.in: Added condate.y
8119
81202007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8121
8122 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8123 Use VECs instead of varrays.
8124 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8125 * Makefile.in (pretty-print.o): Depend on vec.h.
8126 * pretty-print.c: Include tree.h and vec.h.
8127 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8128 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8129 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8130 pp_free_list): Use VECs instead of varrays.
8131 * pretty-print.h: Do not include varray.h.
8132 (struct tree_chunk_s): Declaration moved before its use.
8133 (output_buffer): Rename varray field to chunks.
8134 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8135 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8136 save_global_holes): Use VECs instead of varrays.
8137 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8138 * tree-check.c (scan_cfg_stmts, push_node,
8139 print_matching_stmt): Removed.
8140 (tree_check_instance, push_global_holes_if_new, tree_check,
8141 execute_tree_check): Use VECs instead of varrays.
8142 (gate_tree_check): Don't execute the CFG check when basic_block_info
8143 is not available.
8144
81452007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8146
8147 * Merge from mainline (r115016:120733).
8148
81492007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8150
8151 * Merge from mainline (r117632:117661).
8152
81532007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8154
8155 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8156 * tree-pass.h (TDF_DEBUG, debug_p): New.
8157 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8158 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8159 get_loop_exit_condition, analyze_evolution_in_loop,
8160 analyze_initial_condition, analyze_scalar_evolution,
8161 instantiate_parameters, number_of_latch_executions): Use debug_p.
8162 * tree-chrec.c (chrec_apply): Use debug_p.
8163 * tree-data-ref.c: Include graphite.h.
8164 (dump_data_reference): Print also the access matrix.
8165 (analyze_array, analyze_indirect_ref, init_data_ref,
8166 analyze_offset_expr, address_analysis, object_analysis,
8167 create_data_ref, finalize_ddr_dependent,
8168 non_affine_dependence_relation, analyze_ziv_subscript,
8169 analyze_siv_subscript_cst_affine,
8170 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8171 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8172 analyze_miv_subscript, analyze_overlapping_iterations,
8173 build_classic_dist_vector, subscript_dependence_tester,
8174 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8175 (build_access_matrix_with_af): No longer static.
8176 * tree-data-ref.h (scop_p): ... declaration here.
8177 (data_reference.scop): New field.
8178 (DR_SCOP, DR_ACCESS_MATRIX): New.
8179 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8180 * graphite.c (print_graphite_bb): Call dump_data_references.
8181 (print_scop): Use scop_nb_loops and scop_dim_domain.
8182 (test_for_scop_bound): Use debug_p.
8183 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8184 scop_nb_params.
8185 (scop_loop_index): Moved...
8186 (scop_record_loop): New.
8187 (build_scop_loop_nests): Use scop_record_loop.
8188 (build_scop_domain): Use scop_dim_domain.
8189 (build_access_matrix): Implemented.
8190 (build_scop_canonical_schedules): Use scop_nb_loops.
8191 (build_graphite_bb): Initialize GBB_SCOP.
8192 * graphite.h (scop_p): Moved...
8193 (graphite_bb.scop): New field.
8194 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8195 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8196 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8197 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8198 scop_loop_index): New.
8199 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8200
82012007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8202
8203 * Merge from mainline (r117661:120450).
8204
82052006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8206
8207 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8208 at the first declaration outside the varying loop, instantiate as
8209 far as possible.
8210 * tree-chrec.c (for_each_scev_op): New.
8211 * tree-chrec.h (for_each_scev_op): Declared.
8212 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8213 * tree-data-ref.c (get_references_in_stmt,
8214 find_data_references_in_stmt): New, from trunk.
8215 (find_data_references_in_loop): Use get_references_in_stmt
8216 and find_data_references_in_loop, modified as in trunk.
8217 (build_access_matrix_with_af): New.
8218 * tree-data-ref.h (data_reference): Add a field access_matrix.
8219 (data_ref_loc): New, as in trunk.
8220 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8221 invariant_in_scop_p, param_index, scan_tree_for_params,
8222 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8223 idx_record_param, idx_record_params, build_access_matrix,
8224 build_scop_data_accesses, build_scop_canonical_schedules,
8225 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8226 build_scop_params): New.
8227 * graphite.h (graphite_bb): New.
8228 (scop): Add fields static_schedule, params, loop_nest,
8229 iteration_domain.
8230 * lambda.h: Declare vecs of lambda_matrix.
8231 * tree-flow.h (print_loop_ir_bb): Declared.
8232 * tree-cfg.c (print_loop_ir_bb): New.
8233 (print_loop): Use print_loop_ir_bb.
8234
82352006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8236
8237 * Merge from mainline (r115016:117632).
8238
82392006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8240
8241 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8242 break due to a warning.
8243
82442006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8245
8246 * graphite.c (print_scops, debug_scops): New.
8247 (graphite_transform): Renamed graphite_find_transform.
8248 * graphite.h (debug_scops): Declared.
8249
82502006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8251
8252 * tree-match.c: Reformat following the GNU style.
8253 * tree-match.h: Reformat following the GNU style.
8254 * tree-pattern.h: Removed empty file.
8255 * Makefile.in: Remove references to tree-pattern.h.
8256 * tree-check.c: Reformat following the GNU style.
8257 (execute_tree_check): Move gate condition code to...
8258 (gate_tree_check): ...here. New function.
8259 (pass_check): Use the gate function.
8260
82612006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8262
8263 * tree-pattern.h: New. Tree pattern matching and checking using
8264 concrete syntax.
8265 * tree-check.c: New. Tree/CFG checking pass.
8266 * tree-match.c: New. Library for tree pattern matching.
8267 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8268 * toplev.c, flags.h: Add globals for tree-check pass.
8269 * Makefile.in: Integrate the files in tree-check pass.
8270 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8271 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8272 Introduce a "lazy" pretty-print mode.
8273 * tree.c, tree.h: Add tree_name.
8274
82752006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8276
8277 * doc/invoke.texi (-fgraphite): Correct typo.
8278 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8279 use of print_loop_ir.
6c9df8cb 8280 * gcc.dg/graphite/scop-1.c: New.
8281 * gcc.dg/graphite/scop-2.c: New.
8282 * gcc.dg/graphite/graphite.exp: New.
c6bb733d 8283 * graphite.c: Include domwalk.h.
8284 (print_scop): Print only the entry and exit blocks.
8285 (debug_scop): No longer static.
8286 (affine_expr): Fix formating. Return also true when the expression is
8287 constant.
8288 (stmt_simple_for_scop_p): Fix formating.
8289 (build_scops): Use domwalk.
8290 (get_loop_start, end_scop, test_for_scop_bound): New.
8291 (graphite_transform_loops): Avoid printing on stderr.
8292 * graphite.h (debug_scop): Declared.
8293 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8294 * Makefile.in (graphite.o): Depend on domwalk.h.
8295 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8296 declarations for static functions.
8297 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8298 controlling output verbosity.
8299
83002006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8301 Plesco Alexandru <shurikx@gmail.com>
8302
8303 * doc/invoke.texi (-fgraphite): Document.
8304 * tree-pass.h (pass_graphite_transforms): Declared.
8305 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8306 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8307 (pass_graphite_transforms): Defined.
8308 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8309 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8310 * graphite.c, graphite.h: New.
8311 * common.opt (fgraphite): Declared.
8312 * tree-flow.h (graphite_transform_loops): Declared.
8313 * Makefile.in (OBJS-common): Add graphite.o.
8314 (graphite.o): New rule.
8315 * passes.c (pass_graphite_transforms): Scheduled.
8316