]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
Use FOR_EACH_VEC_ELT.
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
323be14f 12010-09-09 Sebastian Pop <sebastian.pop@amd.com>
2
3 * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
4
37336b6b 52010-09-02 Vladimir Kargov <kargov@gmail.com>
6
7 * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
8 (is_valid_stmt_p): Add data reference and operation-specific checks.
9 (is_valid_bb_p): Change structure, add loop validity check.
10 (is_scop_p): Move the TODO list
11 (find_scops_new): New.
12 (build_scops_new): Move part of functionality to find_scops_new and
13 build_scops. Add necessary steps for successful SCoP construction.
14 (build_scops): Compute SCoP sets for both detection algorithms, choose
15 the resulting one depending on static condition.
16
e7560952 172010-08-24 Sebastian Pop <sebastian.pop@amd.com>
18
19 * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
20
97b0e4df 212010-08-24 Sebastian Pop <sebastian.pop@amd.com>
22
23 * graphite-dependences.c (dot_deps): Avoid set but not used warning.
24 (dot_deps_stmt): Same.
25 * graphite-poly.c (dot_lst): Same.
26
c7f969c4 272010-08-23 Sebastian Pop <sebastian.pop@amd.com>
28
29 * graphite-blocking.c (scop_do_strip_mine): Do not call
30 graphite_legal_transform.
31 (scop_do_block): Same.
32
168e8fc0 332010-08-20 Vladimir Kargov <kargov@gmail.com>
34
35 * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
36 description.
37
36f62589 382010-08-20 Sebastian Pop <sebastian.pop@amd.com>
39
40 PR middle-end/45230
41 * gcc.dg/graphite/id-pr45230.c: New.
42
3e0b5bba 432010-08-20 Sebastian Pop <sebastian.pop@amd.com>
44
45 * tree-scalar-evolution.c (instantiate_array_ref): New.
46 (instantiate_scev_r): Also handle ARRAY_REFs.
47
a05095f9 482010-08-20 Sebastian Pop <sebastian.pop@amd.com>
49
50 * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
51 Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
52 RESULT_DECL, and FIELD_DECL. Return false for an
53 SSA_NAME_IS_DEFAULT_DEF.
54 (compute_scalar_evolution_in_loop): Do not further analyze the
55 scalar evolution when no_evolution_in_loop_p returns true.
56
bef5a5f5 572010-08-20 Sebastian Pop <sebastian.pop@amd.com>
58
59 * tree-chrec.h (evolution_function_is_affine_p): Do not check
60 whether CHREC_LEFT is invariant. A function is affine when
61 CHREC_RIGHT is invariant.
62
7ba04629 632010-08-20 Sebastian Pop <sebastian.pop@amd.com>
64
65 * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
66 is_gimple_reg.
67 (rewrite_degenerate_phi): Same.
68 (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
69
e3135850 702010-08-18 Vladimir Kargov <kargov@gmail.com>
71
72 * graphite-scop-detection.c (graphite_can_represent_scev,
7ba04629 73 graphite_can_represent_expr, stmt_has_simple_data_refs_p,
e3135850 74 graphite_can_represent_loop): Remove outermost_loop.
75
a4a4b66a 762010-08-17 Sebastian Pop <sebastian.pop@amd.com>
77
78 PR middle-end/45229
79 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
80 handle GIMPLE_CALLs with no LHS.
81
0d5d0b4d 822010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
83 Sebastian Pop <sebastian.pop@amd.com>
84
85 * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
86 Call remove-build-file to clean up the generated *.graphite files.
87
882010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
1aefcf09 89
90 * doc/invoke.texi (debugging options): Update documentation.
91 (-floop-interchange): Same.
92 (-flopp-strip-mine): Same.
93 (-floop-block): Same.
94 (-fgraphite-read): Add documentation.
95 (-fgraphite-write): Same.
96
0d5d0b4d 972010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
91a594b4 98
99 * toplev.c (process_options): Disable graphite loop optimization
100 options when -fgraphite-read flag is used.
101
c64f5631 1022010-08-17 Riyadh Baghdadi <baghdadi.mr@gmail.com>
103
104 * graphite-poly.c (init_graphite_out_file): New.
105 (init_graphite_in_file): New.
106 (apply_poly_transforms): Updated to enable reading and writing of
107 multiple scop files.
108 * toplev.c (init_asm_output): Remove graphite in/out file initialization.
109
629787af 1102010-08-17 Tobias Grosser <grosser@fim.uni-passau.de>
111
112 * graphite-scop-detection.c (graphite_can_represent_scev): Remove
113 redundant checks.
114
3648398c 1152010-08-12 Sebastian Pop <sebastian.pop@amd.com>
116
117 * graphite-clast-to-gimple.c (precision_for_value): Adjust
118 computation of precision by 1.
119
63b03ccf 1202010-08-12 Riyadh Baghdadi <baghdadi.mr@gmail.com>
121
122 * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
123 (openscop_read_polyhedron_matrix): New.
124 * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
125 (openscop_read_N_int): Same.
126 * graphite-poly.c (openscop_read_N_int): New.
127 (openscop_read_one_int): New.
128 (openscop_read_N_string): New.
129 (openscop_read_one_string): New.
130 (openscop_read_powerset_matrix): New.
131 (graphite_read_transforms): Remove.
132 (graphite_read_scatt): New.
133 (graphite_read_scop_file): New.
134 (apply_poly_transforms): Updated to call graphite_read_scop_file.
135
f2459691 1362010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
137
138 * graphite-poly.c: Change include order.
139
f366948c 1402010-08-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
141
142 * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
143 (cloog_matrix_nrows): New.
144
086610eb 1452010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
146
147 * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
148 from matrix lines.
149 * graphite-poly.c (openscop_print_scattering_function_1): Same.
150 (print_scattering_function_1): Same.
151 (openscop_print_pbb_domain): Same.
152 (openscop_print_scop_context): Same.
153 (print_scop_context): Same.
154
c8f5df71 1552010-08-11 Riyadh Baghdadi <baghdadi.mr@gmail.com>
156
157 * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
158 (openscop_print_pdr_polyhedron): Print pph.
159
650f2420 1602010-07-29 Sebastian Pop <sebastian.pop@amd.com>
161
162 * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
163 * gfortran.dg/graphite/graphite.exp: Same.
164 * gcc.dg/graphite/vect-pr43423.c: New.
165
be90fd3f 1662010-07-29 Sebastian Pop <sebastian.pop@amd.com>
167
168 * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
169 priority signed types.
170
e84af3c1 1712010-07-29 Sebastian Pop <sebastian.pop@amd.com>
172
173 * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
174 to lang_hooks.types.type_for_size. Call build_nonstandard_integer_type.
175
8c4b14b0 1762010-07-29 Riyadh Baghdadi <baghdadi.mr@gmail.com>
177
178 * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
179 (openscop_print_polyhedron_matrix): New.
180 * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
181 * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
182 (openscop_print_pdr_powerset): New.
183 (openscop_print_powerset_matrix): New.
184 (openscop_print_scattering_function_1): New.
185 (print_scattering_function): Add support for scattering names and
186 OpenScop format.
187 (graphite_write_transforms): Remove.
188 (apply_poly_transforms): Updated to call print_scop.
189 (print_pdr_access_layout): Updated to support OpenScop format.
190 (print_pdr): Same.
191 (openscop_print_pbb_domain): New.
192 (print_pbb_body): Added a parameter to allow indicating that pbb_body is
193 not provided.
194 (print_pbb): Updated to call the new print_pbb_body.
195 (openscop_print_scop_context): New.
196 (print_scop_header): New.
197 (print_scop): Updated to call print_scop_header.
198 * graphite-poly.h: Document OpenScop format.
199
68a6a8ba 2002010-07-29 Sebastian Pop <sebastian.pop@amd.com>
201
202 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
203 the case removed in the previous patch, when the only phi argument
204 is defined in the same loop as the phi node itself. Handle it
205 separately from the invariant case by both propagating it outside
206 the region and replacing the phi node with an assign.
207
51ec8951 2082010-07-28 Sebastian Pop <sebastian.pop@amd.com>
209
210 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
211 constant phi nodes with one argument are is_gimple_min_invariant
212 and SSA_NAME_IS_DEFAULT_DEF.
213
214 * gfortran.dg/graphite/id-22.f: New.
215
04b8cadb 2162010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
217
f0fc00f2 218 * graphite.c (graphite_initialize): Do not initialize
219 CLooG and initialize the Parma Polyhedra Library
220 manually when using CLOOG_ORG.
221 (graphite_finalize): Do not finalize CLooG and finalize
222 the Parma Polyhedra Library manually when using CLOOG_ORG.
223 * graphite-cloog-compat.h (cloog_initialize): Hide function
224 when using CLOOG_ORG.
225 (cloog_finalize): Same.
226
a2c572ef 2272010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
f0fc00f2 228
04b8cadb 229 * graphite-clast-to-gimple.c (free_scattering): Change
230 CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
231 (CLOOG_ORG).
232 (build_cloog_prog): Same.
233 * graphite-cloog-compat.h (cloog_domain): Removed.
234 (cloog_scattering): New.
235 (cloog_set_domain): Removed.
236 (cloog_set_scattering): New.
237 (cloog_next_domain): Removed.
238 (cloog_next_scattering): New.
239 (cloog_set_next_domain): Removed.
240 (cloog_set_next_scattering): New.
241 (CloogScatteringList): New.
242 (CloogScattering): New.
243 (cloog_scattering_free): New.
244 (new_Cloog_Scattering_from_ppl_Polyhedron): New.
245 * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
246 New.
247
08a88144 2482010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
249
250 * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
251 CloogState.
252 (set_cloog_options): Same.
253 (print_clast_stmt): Same.
254 (scop_to_clast): Same.
255 (print_generated_program): Same.
256 (gloog): Same.
257 * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
258 (scop_to_clast): Extend with CloogState.
259 * graphite-cloog-util.c: Include graphite-cloog-compat.h
260 (new_Cloog_Domain_from_ppl_Polyhedron):
261 Extend with CloogState. Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
262 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
263 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
264 * graphite-cloog-util.h (build_cloog_prog): Same.
265 * graphite-cloog-copat.h (build_cloog_prog): New.
266 (CloogState): New.
267 (cloog_state_malloc): New.
268 (cloog_state_free): New.
269 (cloog_loop_malloc): New.
270 (cloog_options_malloc): New.
271 (cloog_statement_alloc): New.
272 (cloog_domain_from_cloog_matrix): New.
273 (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
274 (new_Cloog_Domain_from_ppl_Polyhedron): New.
275
2e6bc1c7 2762010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
277
278 * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
279 type of NAME now depends on used CLooG version.
280 (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
281 (gcc_type_for_clast_expr): Same.
282 (print_clast_stmt): Replace pprint with clast_pprint.
283 * graphite-cloog-compat.h: Provide compatibility macros for
284 CLooG Legacy.
285 (clast_name_p): New.
286 (clast_expr_term): New.
287 (clast_expr_red): New.
288 (clast_expr_bin): New.
289 (clast_pprint): New.
290
ebd32a89 2912010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
292
293 * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
294 compatible to newer CLooG releases (CLOOG_ORG).
295 (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
296 (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
297 * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
298 (build_cloog_prog) : New.
299 (cloog_program_extract_scalars): New.
300 (cloog_program_scatter): New.
301
1b2c23d4 3022010-07-27 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
303
304 * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
305 conditionally (CLOOG_ORG).
306 * graphite-cloog-compat.h: New. Include graphite-cloog-compat.h.
307 (cloog_statement_usr): New.
308 (cloog_domain): Same.
309 (cloog_set_domain): Same.
310 (cloog_next_domain): Same.
311 (cloog_set_next_domain): Same.
312 (cloog_program_nb_scattdims): Same.
313 (cloog_program_set_nb_scattdims): Same.
314 (cloog_program_names): Same.
315 (cloog_program_set_names): Same.
316 (cloog_program_set_context): Same.
317 (cloog_program_set_loop): Same.
318 (cloog_program_blocklist): Same.
319 (cloog_program_set_blocklist): Same.
320 (cloog_program_scaldims): Same.
321 (cloog_program_set_scaldims): Same.
322 (cloog_names_nb_parameters): Same.
323 (cloog_names_set_nb_parameters): Same.
324 (cloog_names_parameters): Same.
325 (cloog_names_set_parameters): Same.
326 (cloog_names_set_nb_iterators): Same.
327 (cloog_names_set_iterators): Same.
328 (cloog_names_set_nb_scattering): Same.
329 (cloog_names_set_scattering): Same.
330 (cloog_statement_set_usr): Same.
331 (cloog_loop_set_next): Same.
332 (cloog_loop_set_domain): Same.
333 (cloog_loop_set_block): Same.
334 (cloog_block_list_next): Same.
335 (cloog_block_list_set_next):
336 (cloog_block_list_set_block): Same.
337
c9a67530 3382010-07-27 Sebastian Pop <sebastian.pop@amd.com>
339
340 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
341 a bool.
342 (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
343 (rewrite_commutative_reductions_out_of_ssa_loop): Same.
344 (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
345 when something has been changed.
346 (rewrite_commutative_reductions_out_of_ssa): Same.
347
348 * gcc.dg/graphite/id-26.c: New.
349
ed455480 3502010-07-26 Sebastian Pop <sebastian.pop@amd.com>
351
352 * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
353 handle the case when def is in the sese region.
354 (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
355 for invariant expressions.
356 (rewrite_cross_bb_phi_deps): Removed.
357 (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
358 (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
359 rewrite_cross_bb_phi_deps.
360
72085fb7 3612010-07-26 Sebastian Pop <sebastian.pop@amd.com>
362
363 * graphite-sese-to-poly.c
364 (rewrite_commutative_reductions_out_of_ssa_loop): Call
365 scev_analyzable_p only on is_gimple_reg
366
367 * gcc.dg/graphite/id-25.c: New.
368
5d21c24a 3692010-07-22 Sebastian Pop <sebastian.pop@amd.com>
370
371 * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
372 (rewrite_close_phi_out_of_ssa): Propagate constant values or
373 parametric expressions outside the scop region.
374 (rewrite_cross_bb_scalar_deps): Same.
375 * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
376
377 * gcc.dg/graphite/run-id-5.c: New.
378 * gcc.dg/graphite/run-id-6.c: New.
379 * gfortran.dg/graphite/id-21.f: New.
380
a865acd7 3812010-07-22 Sebastian Pop <sebastian.pop@amd.com>
382
383 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
384 SSA_NAME_DEF_STMT only on SSA_NAMEs.
385
386 * gcc.dg/graphite/id-24.c: New.
387
52f57b4e 3882010-07-22 Sebastian Pop <sebastian.pop@amd.com>
389
390 * tree-scalar-evolution.c (instantiate_scev_name): Do not
391 instantiate default definitions.
392
c07c57fb 3932010-07-20 Vladimir Kargov <kargov@gmail.com>
394
395 * graphite-scop-detection.c (is_valid_stmt_p): New.
396 (is_valid_bb_p): New.
397
259c0e44 3982010-07-20 Vladimir Kargov <kargov@gmail.com>
399 Sebastian Pop <sebastian.pop@amd.com>
400
401 * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
402 (loop_exits_from_bb_p): New.
403 * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
404 (loop_exits_from_bb_p): Declared.
405 * graphite-scop-detection.c (scopdet_basic_block_info): Call
406 loop_exits_to_bb_p.
407
000edd14 4082010-07-20 Vladimir Kargov <kargov@gmail.com>
409
410 * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
411 tree-data-ref.h.
412 (dot_regions_1): New.
413 (dot_regions): New.
414 * refined-regions.h (dot_regions): Declared.
415 * Makefile.in (refined-regions.o): Update dependences.
416
38f26d41 4172010-07-20 Sebastian Pop <sebastian.pop@amd.com>
418
419 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
420 extra parameter for the region. Call scev_analyzable_p.
421 (rewrite_reductions_out_of_ssa): Update call to
422 rewrite_close_phi_out_of_ssa.
423 (rewrite_cross_bb_phi_deps): Same.
424 (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
425 parameter for the region. Call scev_analyzable_p.
426 (rewrite_commutative_reductions_out_of_ssa): Update call to
427 rewrite_commutative_reductions_out_of_ssa_loop.
428
e075a7a2 4292010-07-20 Sebastian Pop <sebastian.pop@amd.com>
430
431 * gcc.dg/tree-ssa/pr20742.c: New.
432
39888e8f 4332010-07-15 Sebastian Pop <sebastian.pop@amd.com>
434
435 * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
436
437 * gcc.dg/graphite/id-23.c: New.
438
15822b8e 4392010-07-15 Sebastian Pop <sebastian.pop@amd.com>
440
441 * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
442 SSA scalar phi nodes that can be scev_analyzable_p.
443
444 * gfortran.dg/graphite/id-20.f: Adjust testcase.
445
49253930 4462010-07-15 Sebastian Pop <sebastian.pop@amd.com>
447
448 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
449 handle SSA_NAME_IS_DEFAULT_DEF.
450
bac2de0b 4512010-07-15 Sebastian Pop <sebastian.pop@amd.com>
452
453 * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
454
455 * gcc.dg/graphite/pr42729.c: New.
456
55c89f69 4572010-07-15 Sebastian Pop <sebastian.pop@amd.com>
458
459 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
460 case non close-phi nodes with one argument.
461
32a6e336 4622010-07-15 Sebastian Pop <sebastian.pop@amd.com>
463
464 * sese.h (scev_analyzable_p): Scevs could be expressions without
465 chrecs and still be scev_analyzable_p.
466
a73166c0 4672010-07-15 Sebastian Pop <sebastian.pop@amd.com>
468
469 * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
470
18046220 4712010-07-15 Sebastian Pop <sebastian.pop@amd.com>
472
473 * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
474 * cfgloop.h (struct loop): Remove single_iv field.
475 * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
476 (scop_canonicalize_loops): Removed.
477 (scop_ivs_can_be_represented): Do not use loop->single_iv. Iterate
478 over all the loop phi nodes in loop->header.
479 (build_poly_scop): Remove use of scop_canonicalize_loops.
480
b19b9f62 4812010-07-15 Sebastian Pop <sebastian.pop@amd.com>
482
483 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
484 handle GIMPLE_CALL.
485
9e4cd968 4862010-07-15 Sebastian Pop <sebastian.pop@amd.com>
487
488 * tree-chrec.c (chrec_apply): Should only apply to the specified
489 variable. Also handle multivariate chains of recurrences that
490 satisfy evolution_function_is_affine_p. Also handle CASE_CONVERT.
491
4ed27c8e 4922010-07-15 Sebastian Pop <sebastian.pop@amd.com>
493
494 * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
495 (debug_clast_name_indexes_1): Removed.
496 (debug_clast_name_indexes): Removed.
497 (pbb_to_depth_to_oldiv): Removed.
498 (build_iv_mapping): Replace the use of rename_map with iv_map.
499 (translate_clast_user): Remove uses of rename_map. Allocate and
500 free iv_map.
501 (translate_clast_for_loop): Remove uses of rename_map.
502 (translate_clast_for): Same.
503 (translate_clast_guard): Same.
504 (translate_clast): Same.
505 (gloog): Same.
506 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
507 * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
508 * sese.c (set_rename): Now static.
509 (rename_variables_in_stmt): Removed.
510 (rename_uses): New.
511 (is_parameter): Removed.
512 (is_iv): Removed.
513 (expand_scalar_variables_call): Removed.
514 (expand_scalar_variables_ssa_name): Removed.
515 (expand_scalar_variables_expr): Removed.
516 (expand_scalar_variables_stmt): Removed.
517 (expand_scalar_variables): Removed.
518 (rename_variables): Removed.
519 (remove_condition): Removed.
520 (get_true_edge_from_guard_bb): Removed.
521 (get_false_edge_from_guard_bb): Removed.
522 (struct igp): Removed.
523 (default_before_guard): Removed.
524 (convert_for_phi_arg): Removed.
525 (add_guard_exit_phis): Removed.
526 (insert_guard_phis): Removed.
527 (graphite_copy_stmts_from_block): Now also uses iv_map and a
528 region. Do not copy conditions. Do not copy induction variables.
529 Call rename_uses.
530 (copy_bb_and_scalar_dependences): Allocate a local rename_map for
531 the translated statement. Use the iv_map for the induction
532 variable renaming.
533 * sese.h (copy_bb_and_scalar_dependences): Update declaration.
534 (set_rename): Removed declaration.
535 (scev_analyzable_p): ...here.
536 * tree-chrec.c (chrec_apply_map): New.
537 * tree-chrec.h (chrec_apply_map): Declared.
538
5b87c555 5392010-07-15 Sebastian Pop <sebastian.pop@amd.com>
540
541 * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
542 insert_loop_close_phis.
543 * sese.c (name_defined_in_loop_p): Removed.
544 (expr_defined_in_loop_p): Removed.
545 (alive_after_loop): Removed.
546 (close_phi_not_yet_inserted_p): Removed.
547 (struct alep): Removed.
548 (add_loop_exit_phis): Removed.
549 (insert_loop_close_phis): Removed.
550
2c4340a8 5512010-07-15 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
552
5b87c555 553 * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
554 condition.
555 * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
2c4340a8 556
38df5b0a 5572010-07-07 Sebastian Pop <sebastian.pop@amd.com>
558
559 * gfortran.dg/graphite/id-20.f: New.
560
e0e27d35 5612010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
562
563 * graphite-cloog-util.h: Added cloog.h.
564 * graphite-blocking.c: Removed cloog.h.
565 * graphite-dependences.c: Same.
566 * graphite-interchange.c: Same.
567 * graphite-poly.c: Same.
568 * graphite-ppl.c: Same.
569 * graphite-scop-detection.c: Same.
570 * graphite-sese-to-poly.c:
571 Removed cloog.h.
572 Removed graphite-clast-to-gimple.h.
573 (check_poly_representation): Removed (unused).
574 * graphite-sese-to-poly.h
575 (check_poly_representation): Removed (unused).
576
30185452 5772010-07-05 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
578
579 * Makefile.in
580 (OBJS-common): Added graphite-cloog-util.o.
581 (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
582 (graphite-cloog-util.o): New.
583 (graphite-ppl.o): Added graphite-cloog-util.h.
584 * graphite-clast-to-gimple.c:
585 Added graphite-cloog-util.h to include statements.
586 * graphite-cloog-util.c: New.
587 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
588 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
589 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
590 (new_C_Polyhedron_from_Cloog_Matrix): Same.
591 (ppl_Constrain_System_number_of_constraints): Same.
592 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
593 (oppose_constraint): Same.
594 (cloog_matrix_to_ppl_constraint): Same.
595 (new_Constraint_System_from_Cloog_Matrix): Same.
596 (insert_constraint_into_matrix): Same. Declared static.
597 * graphite-cloog-util.h: New.
598 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
599 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
600 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
601 (new_C_Polyhedron_from_Cloog_Matrix): Same.
602 (insert_constraint_into_matrix): Same.
603 * graphite-ppl.c:
604 Added graphite-cloog-util.h to include statements.
605 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
606 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
607 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
608 (new_C_Polyhedron_from_Cloog_Matrix): Same.
609 (insert_constraint_into_matrix): Same.
610 (ppl_Constrain_System_number_of_constraints): Same.
611 (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
612 (oppose_constraint): Same.
613 (cloog_matrix_to_ppl_constraint): Same.
614 (new_Constraint_System_from_Cloog_Matrix): Same.
615 * graphite-ppl.h:
616 (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
617 graphite-cloog-util.h.
618 (new_Cloog_Domain_from_ppl_Polyhedron): Same.
619 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
620 (new_C_Polyhedron_from_Cloog_Matrix): Same.
621 (insert_constraint_into_matrix): Removed.
622
6955599b 6232010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
624
625 * graphite-clast-to-gimple.c
626 (precision_for_value): Resolve value_* calls to matching mpz_* calls.
627 (precision_for_interval): Same.
628 (gcc_type_for_interval): Same.
629 (compute_type_for_level): Same.
630 * graphite-interchange.c
631 (lst_interchange_profitable_p): Same.
632 * graphite-poly.c
633 (psct_scattering_dim_for_loop_depth): Same.
634 * graphite-ppl.c
635 (ppl_max_for_le_pointset): Same.
636 (ppl_min_for_le_pointset): Same.
637
6fba926c 6382010-06-25 Vladimir Kargov <kargov@gmail.com>
639
640 * refined-regions.c (bb_index_compare): New.
641 (get_bbs_in_region): New.
642 (print_bbs_in_region): New.
643 (print_refined_region): Add an argument that allows to print
644 all basic blocks contained in regions.
645 (debug_refined_region): Update call to print_refined_region.
646 * refined-regions.h (print_refined_region): Update declaration.
647 (get_bbs_in_region): Declared.
648 * graphite-scop-detection.c (build_scops_new): Print the refined
649 region tree into the Grahite dump file.
650
b8046a12 6512010-06-24 Sebastian Pop <sebastian.pop@amd.com>
652
653 * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
654 (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
655
dd966e1f 6562010-06-24 Sebastian Pop <sebastian.pop@amd.com>
657
658 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
659 rewrite_close_phi_out_of_ssa.
660
661 * gcc.dg/graphite/id-22.c: New.
662
0569d480 6632010-06-24 Sebastian Pop <sebastian.pop@amd.com>
664
665 * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
666
97142493 6672010-06-24 Sebastian Pop <sebastian.pop@amd.com>
668
669 * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
670 rename_map.
671 * sese.c (debug_rename_map): Same.
672 (get_rename): Same.
673 (set_rename): Same.
674 (rename_variables_in_stmt): Same.
675 (expand_scalar_variables_call): Same.
676 (expand_scalar_variables_ssa_name): Same.
677 (expand_scalar_variables_expr): Same.
678 (expand_scalar_variables_stmt): Same.
679 (expand_scalar_variables): Same.
680 (rename_variables): Same.
681 (graphite_copy_stmts_from_block): Same.
682 (copy_bb_and_scalar_dependences): Same.
683
0c663bd0 6842010-06-24 Sebastian Pop <sebastian.pop@amd.com>
685
686 * graphite-clast-to-gimple.c (copy_renames): Removed.
687 (translate_clast_for): Do not call copy_renames.
688 (translate_clast_guard): Same.
689
42ad5d61 6902010-06-23 Sebastian Pop <sebastian.pop@amd.com>
691
692 * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
693 (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
694 (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
695 before rewrite_cross_bb_scalar_deps.
696
8643dd0a 6972010-06-23 Sebastian Pop <sebastian.pop@amd.com>
698
699 * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
700 Early return in when flag_associative_math is not set.
701
9a34ebd6 7022010-06-23 Sebastian Pop <sebastian.pop@amd.com>
703
704 * gcc.dg/graphite/run-id-2.c: Call abort.
705
097e870c 7062010-06-23 Sebastian Pop <sebastian.pop@amd.com>
707
708 * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
709 of SSA copies on edges except for loop->latch.
710
bf8b5699 7112010-06-23 Sebastian Pop <sebastian.pop@amd.com>
712
713 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
714 Split out of rewrite_reductions_out_of_ssa.
715 * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
716 Declared.
717 * graphite.c (graphite_transform_loops): Call it.
718
e819c864 7192010-06-23 Sebastian Pop <sebastian.pop@amd.com>
720
721 * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
722
b90bb125 7232010-06-15 Sebastian Pop <sebastian.pop@amd.com>
724
725 * passes.c (init_optimization_passes): Add pass_graphite.
726 Schedule a pass_copy_prop before pass_graphite_transforms.
727 * timevar.def (TV_GRAPHITE): Declared.
728 * tree-pass.h (pass_graphite): Declared.
729 * tree-ssa-loop.c (pass_graphite): New.
730
731 * gcc.dg/graphite/id-20.c: New.
732
93206bb0 7332010-06-12 Sebastian Pop <sebastian.pop@amd.com>
734
735 * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
736 Remove calls to rename_nb_iterations and rename_sese_parameters.
737 * graphite-clast-to-gimple.h (gloog): Update declaration.
738 * graphite.c (graphite_transform_loops): Update call to gloog.
739 * sese.c (rename_variables_in_expr): Removed.
740 (rename_nb_iterations): Removed.
741 (rename_sese_parameters): Removed.
742 * sese.h (rename_nb_iterations): Removed.
743 (rename_sese_parameters): Removed.
744
88a551f1 7452010-06-12 Sebastian Pop <sebastian.pop@amd.com>
746
747 * graphite-clast-to-gimple.c (gloog): Remove call to
748 sese_adjust_liveout_phis.
749 * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
750 SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
751 (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
752 rewrite_phi_out_of_ssa.
753 * sese.c (get_vdef_before_sese): Removed.
754 (sese_adjust_vphi): Removed.
755 (sese_adjust_liveout_phis): Removed.
756 * sese.h (sese_adjust_liveout_phis): Removed.
757
39a34dd8 7582010-06-12 Sebastian Pop <sebastian.pop@amd.com>
759
760 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
761 argument for the place after which to insert the out of SSA copy.
762 (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
763 (rewrite_phi_out_of_ssa): Same.
764 (rewrite_cross_bb_scalar_deps): Same.
765 (insert_copyout): Removed.
766 (insert_copyin): Removed.
767 (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
768 insert_out_of_ssa_copy_on_edge instead of insert_copyout and
769 insert_copyin.
770
5d2603f9 7712010-06-12 Sebastian Pop <sebastian.pop@amd.com>
772
773 * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
774 (rewrite_reductions_out_of_ssa): Same.
775 (rewrite_commutative_reductions_out_of_ssa): Same.
776 (build_poly_scop): Do not call these functions.
777 * graphite-sese-to-poly.h (build_poly_scop): Declared.
778 (rewrite_reductions_out_of_ssa): Declared.
779 (rewrite_commutative_reductions_out_of_ssa): Declared.
780 * graphite.c (graphite_transform_loops): Call on every scop
781 rewrite_commutative_reductions_out_of_ssa before calling
782 rewrite_reductions_out_of_ssa and build_scop_bbs.
783
189cea68 7842010-06-12 Sebastian Pop <sebastian.pop@amd.com>
785
786 * graphite-dependences.c (dot_deps): Make system call to dotty run
787 in background.
788 (dot_deps_stmt): Same.
789 * graphite-poly.c (dot_lst): Same.
790
1861e127 7912010-06-11 Sebastian Pop <sebastian.pop@amd.com>
792
793 * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
794 old_type in parameter.
795 (gcc_type_for_value): Update call to gcc_type_for_interval.
796 (compute_type_for_level_1): Renamed compute_type_for_level.
797 Update call to gcc_type_for_interval.
798
f6a2a688 7992010-06-09 Sebastian Pop <sebastian.pop@amd.com>
800
801 * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
802 the scev analysis when the variable is not used outside the loop
803 in a close phi node: call compute_overall_effect_of_inner_loop.
804
3662a419 8052010-06-09 Sebastian Pop <sebastian.pop@amd.com>
806
807 * graphite-sese-to-poly.c (single_pred_cond): Renamed
808 single_pred_cond_non_loop_exit. Return NULL for loop exit edges.
809 (build_sese_conditions_before): Renamed call to single_pred_cond.
810 (build_sese_conditions_after): Same.
811
a344bb22 8122010-06-09 Sebastian Pop <sebastian.pop@amd.com>
813
814 * graphite-poly.h: Fix comments and indentation.
815 * graphite-sese-to-poly.c: Same.
816 (build_sese_conditions_before): Compute stmt and gbb only when needed.
817 * tree-chrec.c: Fix comments and indentation.
818 (tree-ssa-loop-niter.c): Same.
819
9ac63ea9 8202010-06-08 Tobias Grosser <grosser@fim.uni-passau.de>
821
822 * refined-regions.c (create_region): Only initialize the region.
823 (find_regions_with_entry): Initialize parent relation and bbmap
824 correctly.
825 (build_regions_tree): Set outermost_region to region instead of
826 topmost_region.
827 (calculate_region_tree): Remove unneeded parameters.
828
441c9c1d 8292010-06-02 Tobias Grosser <grosser@fim.uni-passau.de>
830
831 * graphite-scop-detection.c (is_scop_p): New.
832 (build_scops_new): New. A skeleton for the new scop detection.
833 (build_scops_old): Renamed from build_scops.
834 (build_scops): New version. Call the new and the old scop
835 detection.
836
93bdb320 8372010-05-27 Tobias Grosser <grosser@fim.uni-passau.de>
838 Antoniu Pop <antoniu.pop@gmail.com>
839
840 * Makefile.in (OBJS-common): Add refined-regions.o.
841 (refined-regions.o): New.
842 (graphite-scop-detection.o): Use refined-regions.h.
843 * graphite-scop-detection.c: Include refined-regions.h
844 (build_scops): Also build the refined region tree.
845 * refined-regions.c: New. Adds an algorithm to detect refined
846 regions.
847 (print_refined_region): New.
848 (debug_refined_region): New.
849 (refined_region_contains_bb_p): New.
850 (refined_region_contains_region_p): New.
851 (is_common_df): New.
852 (struct find_regions_global_data): New.
853 (is_region): New.
854 (typedef struct bb_bb_def): New.
855 (new_bb_bb_def): New.
856 (bb_bb_map_hash): New.
857 (eq_bb_bb_map): New.
858 (find_new_bb): New.
859 (bb_reg_def): New.
860 (new_bb_reg_def): New.
861 (bb_reg_map_hash): New.
862 (eq_bb_reg_map): New.
863 (find_new_region): New.
864 (insert_new_reg): New.
865 (insert_new_bb): New.
866 (insert_shortcut): New.
867 (get_next_postdom): New.
868 (create_region): New.
869 (find_regions_with_entry): New.
870 (find_regions_adc): New.
871 (find_regions): New.
872 (get_topmost_parent): New.
873 (build_regions_tree): New.
874 (calculate_region_tree): New.
875 (free_region_tree): New.
876 * refined-regions.h: New.
877 (struct refined_region): New.
878 (calculate_region_tree): New.
879 (free_region_tree): New.
880 (refined_region_contains_bb_p): New.
881 (refined_region_contains_region_p): New.
882 (print_refined_region): New.
883 (debug_refined_region): New.
884
78b58940 8852010-05-26 Sebastian Pop <sebastian.pop@amd.com>
886
887 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
888 size_one_node.
889
9acb79e3 8902010-05-07 Sebastian Pop <sebastian.pop@amd.com>
891
892 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
893 type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
894
9d828157 8952010-05-07 Sebastian Pop <sebastian.pop@amd.com>
896
897 * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
898 phi_arg_in_outermost_loop.
899 (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
900 (remove_invariant_phi): Same.
901
0ef84e3b 9022010-04-12 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
903
904 * graphite-blocking.c
905 (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
906 * graphite-clast-to-gimple.c
907 (clast_to_gcc_expression): Same.
908 (precision_for_value): Same.
909 (precision_for_interval): Same.
910 (gcc_type_for_interval): Same.
911 (graphite_create_new_guard): Same.
912 (compute_bounds_for_level): Same.
913 (graphite_create_new_loop_guard): Same.
914 * graphite-interchange.c
915 (build_linearized_memory_access): Same.
916 (pdr_stride_in_loop): Same.
917 (memory_strides_in_loop_1): Same.
918 (memory_strides_in_loop): Same.
919 (extend_scattering): Same.
920 (psct_scattering_dim_for_loop_depth): Same.
921 (pbb_number_of_iterations): Same.
922 * graphite-poly.h
923 (debug_iteration_domains): Same.
924 * graphite-ppl.c
925 (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
926 (ppl_set_inhomogeneous_gmp): Same.
927 (ppl_strip_loop): Same.
928 (ppl_lexico_compare_linear_expressions): Same.
929 (ppl_read_polyhedron_matrix): Same.
930 (ppl_max_for_le_pointset): Same.
931 * graphite-ppl.h
932 (ppl_read_polyhedron_matrix): Same.
933 (tree_int_to_gmp): Same.
934 (gmp_cst_to_tree): Same.
935 (ppl_set_inhomogeneous): Same.
936 (ppl_set_inhomogeneous_tree): Same.
937 (ppl_set_coef): Same.
938 (ppl_set_coef_tree): Same.
939 * graphite-sese-to-poly.c
940 (build_pbb_scattering_polyhedrons): Same.
941 (build_scop_scattering): Same.
942 (scan_tree_for_params_right_scev): Same.
943 (scan_tree_for_params): Same.
944 (find_params_in_bb): Same.
945 (find_scop_parameters): Same.
946 (add_upper_bounds_from_estimated_nit): Same.
947 (build_loop_iteration_domains): Same.
948 (add_condition_to_domain): Same.
949 (pdr_add_memory_accesses): Same.
950
2d6fe479 9512010-04-11 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
952
a2c572ef 953 * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
2d6fe479 954 CLooG's value_* macros to their respective mpz_* counterparts.
955 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
956 (graphite_create_new_loop_guard): Same.
957 * graphite-interchange.c (build_linearized_memory_access): Same.
958 (pdr_stride_in_loop): Same.
959 (memory_strides_in_loop_1): Same.
960 (1st_interchange_profitable_p): Same.
961 * graphite-poly.c (extend_scattering): Same.
962 (psct_scattering_dim_for_loop_depth): Same.
963 (pbb_number_of_iterations): Same.
964 (pbb_number_of_iterations_at_time): Same.
965 * graphite-poly.h (new_1st_loop): Same.
966 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
967 (oppose_constraint): Same.
968 (insert_constraint_into_matrix): Same.
969 (ppl_set_inhomogeneous_gmp): Same.
970 (ppl_set_coef_gmp): Same.
971 (ppl_strip_loop): Same.
972 (ppl_lexico_compare_linear_expressions): Same.
973 (ppl_max_for_le_pointset): Same.
974 (ppl_min_for_le_pointset): Same.
975 (ppl_build_realtion): Same.
976 * graphite-ppl.h (gmp_cst_to_tree): Same.
977 (ppl_set_inhomogeneous): Same.
978 (ppl_set_inhomogeneous_tree): Same.
979 (ppl_set_coef): Same.
980 (ppl_set_coef_tree): Same.
981 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
982 (build_scop_scattering): Same.
983 (add_value_to_dim): Same.
984 (scan_tree_for_params_right_scev): Same.
985 (scan_tree_for_params_int): Same.
986 (scan_tree_for_params): Same.
987 (find_params_in_bb): Same.
988 (find_scop_parameters): Same.
989 (add_upper_bounds_from_estimated_nit): Same.
990 (build_loop_iteration_domains): Same.
991 (create_linear_expr_from_tree): Same.
992 (add_condition_to_domain): Same.
993 (pdr_add_memory_accesses): Same.
994
7c0d15dc 9952010-04-05 Sebastian Pop <sebastian.pop@amd.com>
996
997 PR middle-end/43519
998 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
999 lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1000 When converting an unsigned type to signed, double its precision.
1001 (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1002 (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1003 (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1004
10052010-04-05 Sebastian Pop <sebastian.pop@amd.com>
1006
1007 PR middle-end/43519
1008 * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1009 build_nonstandard_integer_type.
1010 (gcc_type_for_interval): Same.
1011
10122010-04-05 Sebastian Pop <sebastian.pop@amd.com>
7778680e 1013
1014 PR middle-end/43519
1015 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1016 POINTER_PLUS_EXPR for pointer types.
1017
1018 * gcc.dg/graphite/id-19.c: New.
1019
f20b6ea9 10202010-04-04 Sebastian Pop <sebastian.pop@amd.com>
1021
1022 PR middle-end/43519
1023 * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1024 * graphite-clast-to-gimple.c: Include langhooks.h.
1025 (max_signed_precision_type): New.
1026 (max_precision_type): Takes two types as arguments.
1027 (precision_for_value): New.
1028 (precision_for_interval): New.
1029 (gcc_type_for_interval): New.
1030 (gcc_type_for_value): New.
1031 (gcc_type_for_clast_term): New.
1032 (gcc_type_for_clast_red): New.
1033 (gcc_type_for_clast_bin): New.
1034 (gcc_type_for_clast_expr): Split up into several functions.
1035 (gcc_type_for_clast_eq): Rewritten.
1036 (compute_bounds_for_level): New.
1037 (compute_type_for_level_1): New.
1038 (compute_type_for_level): New.
1039 (gcc_type_for_cloog_iv): Removed.
1040 (gcc_type_for_iv_of_clast_loop): Rewritten.
1041 (graphite_create_new_loop): Compute the lower and upper bound types
1042 with gcc_type_for_clast_expr.
1043 (graphite_create_new_loop_guard): Same.
1044 (find_cloog_iv_in_expr): Removed.
1045 (compute_cloog_iv_types_1): Removed.
1046 (compute_cloog_iv_types): Removed.
1047 (gloog): Do not call compute_cloog_iv_types.
1048 * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1049 GBB_CLOOG_IV_TYPES.
1050 (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1051 * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1052 (GBB_CLOOG_IV_TYPES): Removed.
1053
1054 * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1055
03ce78db 10562010-04-02 Sebastian Pop <sebastian.pop@amd.com>
1057
1058 Reverted this commit: as at this point the loop closed SSA form
1059 is under a canonical form respecting the single argument condition.
1060 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1061 close phi nodes may have more than one argument.
1062
10632010-04-01 Sebastian Pop <sebastian.pop@amd.com>
1064
1065 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1066 gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1067 (detect_commutative_reduction): Same.
1068
10692010-03-31 Sebastian Pop <sebastian.pop@amd.com>
1070
1071 * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1072 close phi nodes may have more than one argument.
1073
67e28d17 10742010-03-30 Richard Guenther <rguenther@suse.de>
1075 Zdenek Dvorak <ook@ucw.cz>
1076 Sebastian Pop <sebastian.pop@amd.com>
1077
1078 PR middle-end/43464
1079 * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1080 with multiple arguments.
1081 (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1082
ff4c7a5a 10832010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1084
1085 * graphite-dependences.c (print_pddr): Call print_pdr with an
1086 extra argument.
1087 * graphite-poly.c (debug_pdr): Add an extra argument for the
1088 verbosity level.
1089 (print_pdr): Same.
1090 (print_pbb_domain): Same.
1091 (print_pbb): Same.
1092 (print_scop_context): Same.
1093 (print_scop): Same.
1094 (print_cloog): Same.
1095 (debug_pbb_domain): Same.
1096 (debug_pbb): Same.
1097 (print_pdrs): Same.
1098 (debug_pdrs): Same.
1099 (debug_scop_context): Same.
1100 (debug_scop): Same.
1101 (debug_cloog): Same.
1102 (print_scop_params): Same.
1103 (debug_scop_params): Same.
1104 (print_iteration_domain): Same.
1105 (print_iteration_domains): Same.
1106 (debug_iteration_domain): Same.
1107 (debug_iteration_domains): Same.
1108 (print_scattering_function): Same.
1109 (print_scattering_functions): Same.
1110 (debug_scattering_function): Same.
1111 (debug_scattering_functions): Same.
1112 * graphite-poly.h (debug_pdr): Update declaration.
1113 (print_pdr): Same.
1114 (print_pbb_domain): Same.
1115 (print_pbb): Same.
1116 (print_scop_context): Same.
1117 (print_scop): Same.
1118 (print_cloog): Same.
1119 (debug_pbb_domain): Same.
1120 (debug_pbb): Same.
1121 (print_pdrs): Same.
1122 (debug_pdrs): Same.
1123 (debug_scop_context): Same.
1124 (debug_scop): Same.
1125 (debug_cloog): Same.
1126 (print_scop_params): Same.
1127 (debug_scop_params): Same.
1128 (print_iteration_domain): Same.
1129 (print_iteration_domains): Same.
1130 (debug_iteration_domain): Same.
1131 (debug_iteration_domains): Same.
1132 (print_scattering_function): Same.
1133 (print_scattering_functions): Same.
1134 (debug_scattering_function): Same.
1135 (debug_scattering_functions): Same.
1136
1f8d6d4d 11372010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1138
1139 * graphite-poly.c (print_scattering_function_1): New.
1140 (print_scattering_function): Call it.
1141 (print_scop_params): Remove spaces at the end of lines.
1142 (print_cloog): New.
1143 (debug_cloog): New.
1144 * graphite-poly.h (print_cloog): Declared.
1145 (debug_cloog): Declared.
1146
4de8824d 11472010-03-23 Sebastian Pop <sebastian.pop@amd.com>
1148
1149 * tree-ssa-copy.c: Revert this previous change:
1150 (init_copy_prop): Loop closed phi nodes cancontain more than one
1151 argument.
1152 (execute_copy_prop): Revert the previous change: do not call
1153 rewrite_into_loop_closed_ssa.
1154
11552010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1156 Richard Guenther <rguenther@suse.de>
1157
1158 PR middle-end/43464
1159 * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1160 contain more than one argument.
1161 (execute_copy_prop): Revert the previous change: do not call
1162 rewrite_into_loop_closed_ssa.
1163
1164 * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1165 * gcc.dg/graphite/id-pr43464-1.c: New.
1166
11672010-03-21 Sebastian Pop <sebastian.pop@amd.com>
1168
1169 PR middle-end/43464
1170 * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1171 and verify_loop_closed_ssa when copy prop is executed in the LNO.
1172
1173 * gcc.dg/graphite/id-pr43464.c: New.
1174
0207206d 11752010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1176
1177 * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1178 in loop->header.
1179 * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1180 * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1181 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1182 to switch between adding the IV bump in loop->latch or in loop->header.
1183
a751953f 11842010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1185
1186 * passes.c (init_optimization_passes): Add pass_copy_prop
1187 after Graphite.
1188
5dc5fe13 11892010-03-16 Sebastian Pop <sebastian.pop@amd.com>
1190
1191 * graphite-poly.c (print_scattering_function): Pretty print following
1192 the scoplib format.
1193 (print_pdr): Same.
1194 (print_pbb_domain): Same.
1195 (dump_gbb_cases): Same.
1196 (dump_gbb_conditions): Same.
1197 (print_pdrs): Same.
1198 (print_pbb): Same.
1199 (print_scop_params): Same.
1200 (print_scop_context): Same.
1201 (print_scop): Same.
1202 (print_pbb_body): New.
1203 (lst_indent_to): New.
1204 (print_lst): Start new lines with a #.
1205 * graphite-poly.h (pbb_bb): New.
1206 (pbb_index): Use pbb_bb.
1207 * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1208 disjuncts.
1209 * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1210
9251755b 12112010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1212
1213 PR middle-end/43351
1214 * gcc.dg/graphite/id-pr43351.c
1215
5a644317 12162010-03-13 Sebastian Pop <sebastian.pop@amd.com>
1217
1218 PR middle-end/43354
1219 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1220 call insert_out_of_ssa_copy for default definitions.
1221 * gfortran.dg/graphite/id-pr43354.f: New.
1222
12232010-03-13 Sebastian Pop <sebastian.pop@amd.com>
197de505 1224
1225 PR middle-end/43349
1226 * gfortran.dg/graphite/pr43349.f: New.
1227
119adb56 12282010-03-11 Sebastian Pop <sebastian.pop@amd.com>
1229
1230 * graphite-clast-to-gimple.c (my_long_long): Defined.
1231 (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1232 * graphite-sese-to-poly.c (my_long_long): Defined.
1233 (scop_ivs_can_be_represented): Use it.
1234
578e3456 12352010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1236
1237 * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1238 graphite-max-bbs-per-function, and loop-block-tile-size.
1239 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1240 with "maximum".
1241 (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1242
5d92ac74 12432010-03-10 Sebastian Pop <sebastian.pop@amd.com>
1244
1245 * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1246 forward declaration.
1247 * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1248 (add_upper_bounds_from_estimated_nit): New.
1249 (build_loop_iteration_domains): Use it.
1250
89466e43 12512010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1252
1253 * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1254
c4ccbe87 12552010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1256
1257 PR middle-end/43306
1258 * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1259 should be an INTEGER_CST. Also handle CASE_CONVERT.
1260 * gcc.dg/graphite/pr43306.c: New.
1261
94ba21de 12622010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1263
1264 * graphite.c (graphite_initialize): To bound the number of bbs per
1265 function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1266 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1267 * doc/invoke.texi: Document it.
1268
f49215ce 12692010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1270
1271 * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1272 * graphite-sese-to-poly.h (build_poly_scop): Same.
1273
c2e502a5 12742010-03-09 Sebastian Pop <sebastian.pop@amd.com>
1275
1276 * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1277 the number of parameters in the scop. Use as an upper bound
1278 PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1279 * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1280 * doc/invoke.texi: Document it.
1281
8424df5f 12822010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1283
1284 * graphite-sese-to-poly.c (add_param_constraints): Use
1285 lower_bound_in_type and upper_bound_in_type.
1286
d6ad5c2f 12872010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1288
1289 * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1290 instead of unsigned_type_node.
1291
88a62e9b 12922010-03-05 Sebastian Pop <sebastian.pop@amd.com>
1293 Reza Yazdani <reza.yazdani@amd.com>
1294
1295 PR middle-end/43065
1296 * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1297 on pointer type parameters.
1298
1299 * gcc.dg/graphite/run-id-4.c: New.
1300
13012010-03-05 Sebastian Pop <sebastian.pop@amd.com>
bc1b5a1d 1302
1303 PR middle-end/43065
1304 * gcc.dg/graphite/run-id-3.c: New.
1305
f6fb4255 13062010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
1307 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1308
1309 * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1310 handle conversions from pointer to integers.
1311 (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1312 induction variable, to be able to work with code generated by CLooG.
1313 * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1314 (build_poly_scop): Bail out if we cannot codegen a loop.
1315
2d0a2aaa 13162010-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
1317
1318 * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1319 code generation with gloog_error.
1320
2996b712 13212010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1322
1323 * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1324 Call fold_convert on all the returned values.
1325 (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1326 the type of the resulting expression.
1327
c817e987 13282010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1329
1330 * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1331 ppl_min_for_le_pointset. Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1332 * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1333
5f2e51eb 13342010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1335
1336 * graphite-dependences.c (map_into_dep_poly): Removed.
1337 (dependence_polyhedron_1): Use combine_context_id_scat.
1338
7453bc3b 13392010-03-04 Sebastian Pop <sebastian.pop@amd.com>
1340
1341 * graphite-poly.h (struct poly_scattering): Add layout documentation.
1342 (struct poly_bb): Same.
1343 (combine_context_id_scat): New.
1344
13dca219 13452010-03-02 Sebastian Pop <sebastian.pop@amd.com>
1346
1347 PR middle-end/42326
1348 * sese.c (name_defined_in_loop_p): Return false for default
1349 definitions.
1350
1351 * gcc.dg/graphite/pr42326.c: New.
1352
fc830e2d 13532010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1354
1355 * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1356 and clean up the logic.
1357
bde82a01 13582010-02-23 Sebastian Pop <sebastian.pop@amd.com>
1359
1360 * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1361 early return.
1362
bbf92068 13632010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1364
1365 PR middle-end/43083
1366 * graphite-scop-detection.c (create_single_exit_edge): Move
1367 the call to find_single_exit_edge to....
1368 (create_sese_edges): ...here. Don't handle multiple edges
1369 exiting the function.
1370 (build_graphite_scops): Don't handle multiple edges
1371 exiting the function.
1372
1373 * gcc.dg/graphite/pr43083.c: New.
1374
27f9c4ff 13752010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1376
66bb96d4 1377 PR middle-end/43097
27f9c4ff 1378 * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1379 (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1380
1381 * gfortran.dg/graphite/pr43097.f: New.
1382
c3eecfcf 13832010-02-22 Sebastian Pop <sebastian.pop@amd.com>
1384 Manuel López-Ibáñez <manu@gcc.gnu.org>
1385
1386 PR middle-end/43140
1387 * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1388
13892010-02-22 Sebastian Pop <sebastian.pop@amd.com>
550c39c3 1390
1391 PR middle-end/43026
1392 * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1393
1394 * g++.dg/graphite/pr43026.C: New.
1395
3dc0020f 13962010-02-13 Tobias Grosser <grosser@fim.uni-passau.de>
1397
1398 * Merge from mainline (154736:156693).
1399
5b3c8b56 14002010-02-11 Sebastian Pop <sebastian.pop@amd.com>
1401
1402 PR middle-end/43012
1403 * gcc.dg/graphite/pr43012.c: New.
65084500 1404
5b3c8b56 14052010-02-10 Sebastian Pop <sebastian.pop@amd.com>
65084500 1406
5b3c8b56 1407 * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
65084500 14082010-02-10 Sebastian Pop <sebastian.pop@amd.com>
1409
1410 * g++.dg/graphite/pr42930.C: New.
1411
5dcbb45f 14122010-02-10 Sebastian Pop <sebastian.pop@amd.com>
ce0ae3b6 1413
1414 PR middle-end/42930
1415 * graphite-scop-detection.c (graphite_can_represent_scev): Call
1416 graphite_can_represent_init for MULT_EXPR.
1417
5dcbb45f 14182010-02-10 Sebastian Pop <sebastian.pop@amd.com>
eae8f2a1 1419
1420 PR middle-end/42914
1421 PR middle-end/42530
1422 * graphite-sese-to-poly.c (remove_phi): New.
1423 (translate_scalar_reduction_to_array): Call remove_phi.
1424
1425 * gcc.dg/graphite/pr42530.c: New.
1426 * gcc.dg/graphite/pr42914.c: New.
1427
5dcbb45f 14282010-02-10 Sebastian Pop <sebastian.pop@amd.com>
94bdcd77 1429
1430 PR middle-end/42771
1431 * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1432 * graphite-clast-to-gimple.h (gloog): Update declaration.
1433 * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1434 * graphite-poly.h (struct poly_bb): Add missing comments.
1435 (struct scop): Add poly_scop_p field.
1436 (POLY_SCOP_P): New.
1437 * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1438 * graphite.c (graphite_transform_loops): Build the polyhedral
1439 representation for each scop before code generation.
1440 * sese.c (rename_variables_in_operand): Removed.
1441 (rename_variables_in_expr): Return the renamed expression.
1442 (rename_sese_parameters): New.
1443 * sese.h (rename_sese_parameters): Declared.
1444
1445 * gcc.dg/graphite/pr42771.c: New.
1446
9fe3fe75 14472010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1448
1449 * gcc.dg/graphite/block-0.c: Call abort for runtime test. Always
1450 return 0 from main.
1451 * gcc.dg/graphite/block-1.c: Same.
1452 * gcc.dg/graphite/block-3.c: Same.
1453 * gcc.dg/graphite/block-4.c: Same.
1454 * gcc.dg/graphite/block-5.c: Same.
1455 * gcc.dg/graphite/block-6.c: Same.
1456 * gcc.dg/graphite/block-7.c: Same.
1457 * gcc.dg/graphite/interchange-0.c: Same.
1458 * gcc.dg/graphite/interchange-1.c: Same.
1459 * gcc.dg/graphite/interchange-10.c: Same.
1460 * gcc.dg/graphite/interchange-11.c: Same.
1461 * gcc.dg/graphite/interchange-12.c: Same.
1462 * gcc.dg/graphite/interchange-2.c: Same.
1463 * gcc.dg/graphite/interchange-3.c: Same.
1464 * gcc.dg/graphite/interchange-4.c: Same.
1465 * gcc.dg/graphite/interchange-5.c: Same.
1466 * gcc.dg/graphite/interchange-6.c: Same.
1467 * gcc.dg/graphite/interchange-7.c: Same.
1468 * gcc.dg/graphite/interchange-8.c: Same.
1469 * gcc.dg/graphite/interchange-9.c: Same.
1470 * gcc.dg/graphite/interchange-mvt.c: Same.
1471
422538b1 14722010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1473
1474 * gfortran.dg/graphite/id-19.f: New.
1475 * gfortran.dg/graphite/pr14741.f90: New.
1476 * gfortran.dg/graphite/pr41924.f90: New.
1477 * gfortran.dg/graphite/run-id-2.f90: New.
1478
8fe76250 14792010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1480
1481 PR middle-end/42988
1482 * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1483 to unknown_dependence.
1484 (graphite_legal_transform_dr): Handle the unknown_dependence.
1485 (graphite_carried_dependence_level_k): Same.
1486
6c9df8cb 14872010-02-07 Sebastian Pop <sebastian.pop@amd.com>
1488
1489 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1490
b7ac929d 14912010-02-05 Sebastian Pop <sebastian.pop@amd.com>
1492 Konrad Trifunovic <konrad.trifunovic@inria.fr>
1493
1494 PR middle-end/42637
1495 * graphite-dependences.c (build_lexicographical_constraint): Return
1496 a union of dependence polyhedra.
1497 (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1498
6c9df8cb 1499 * gcc.dg/graphite/block-0.c: Enable runtime check. XFAILed.
1500 * gcc.dg/graphite/block-4.c: Same.
1501 * gcc.dg/graphite/block-7.c: Same.
1502 * gcc.dg/graphite/interchange-12.c: Same.
1503 * gcc.dg/graphite/interchange-mvt.c: Same.
1504 * gfortran.dg/graphite/interchange-1.f: XFAILed.
1505 * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1506 * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
b7ac929d 1507
015d0b5c 15082010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1509
6c9df8cb 1510 * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
015d0b5c 1511 the execution check to FAIL. This testcase is miscompiled by Graphite
1512 and the check should be re-enabled.
6c9df8cb 1513 * gcc.dg/graphite/interchange-mvt.c: Same.
1514 * gcc.dg/graphite/block-0.c: Same.
1515 * gcc.dg/graphite/block-4.c: Same.
1516 * gcc.dg/graphite/block-7.c: Same.
015d0b5c 1517
a5414f1f 15182010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1519
6c9df8cb 1520 * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1521 * gcc.dg/graphite/scop-0.c: Fix spaces.
1522 * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1523 * gfortran.dg/graphite/block-2.f: Same.
1524 * gfortran.dg/graphite/block-3.f90: Same.
1525 * gfortran.dg/graphite/block-4.f90: Same.
1526 * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1527 * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
a5414f1f 1528
a071b80b 15292010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1530
1531 * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1532 PDDR_ORIGINAL_SCATTERING_P.
1533 (pddr_is_empty): Rewritten.
1534 (print_dependence_polyhedron_layout): New.
1535 (print_pddr): New.
1536 (debug_pddr): New.
1537 (build_alias_set_powerset): Moved up.
1538 (poly_drs_may_alias_p): Moved up.
1539 (lexicographically_gt_p): Removed.
1540 (build_lexicographically_gt_constraint): Renamed
1541 build_lexicographical_constraint, reimplemented.
1542 (dependence_polyhedron_1): Simplified parameters.
1543 (dependence_polyhedron): Same. Keep along empty PDDRs
1544 to make efficient use of the cache.
1545 (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1546 (graphite_legal_transform_dr): Rewritten.
1547 (graphite_legal_transform_bb): Pass fewer arguments to
1548 graphite_legal_transform_dr.
1549 (graphite_carried_dependence_level_k): Simplified implementation.
1550 (dot_original_deps_stmt_1): Call dependence_polyhedron.
1551 (dot_transformed_deps_stmt_1): Same.
1552 (dot_original_deps): Same.
1553 (dot_transformed_deps): Same.
1554 * graphite-dependences.h (struct poly_ddr): Added a new field
1555 original_scattering_p.
1556 (PDDR_ORIGINAL_SCATTERING_P): New.
1557 (print_pddr): Declared.
1558 (debug_pddr): Declared.
1559 * graphite-ppl.c: Clarify comment.
1560 * sese.h (print_gimple_bb): Removed unused declaration.
1561 (debug_gbb): Same.
1562
d0546b2e 15632010-02-03 Sebastian Pop <sebastian.pop@amd.com>
1564
6c9df8cb 1565 * g++.dg/graphite/graphite.exp: Rewritten.
1566 * gcc.dg/graphite/graphite.exp: Rewritten.
1567 * gfortran.dg/graphite/graphite.exp: Rewritten.
1568 * gcc.dg/graphite/block-0.c: Added runtime test.
1569 * gcc.dg/graphite/block-1.c: Same.
1570 * gcc.dg/graphite/block-3.c: Same.
1571 * gcc.dg/graphite/block-4.c: Same.
1572 * gcc.dg/graphite/block-5.c: Same.
1573 * gcc.dg/graphite/block-6.c: Same.
1574 * gcc.dg/graphite/block-7.c: Same.
1575 * gcc.dg/graphite/interchange-0.c: Same.
1576 * gcc.dg/graphite/interchange-1.c: Same.
1577 * gcc.dg/graphite/interchange-10.c: Same.
1578 * gcc.dg/graphite/interchange-11.c: Same.
1579 * gcc.dg/graphite/interchange-12.c: Same.
1580 * gcc.dg/graphite/interchange-2.c: Same.
1581 * gcc.dg/graphite/interchange-3.c: Same.
1582 * gcc.dg/graphite/interchange-4.c: Same.
1583 * gcc.dg/graphite/interchange-5.c: Same.
1584 * gcc.dg/graphite/interchange-6.c: Same.
1585 * gcc.dg/graphite/interchange-7.c: Same.
1586 * gcc.dg/graphite/interchange-8.c: Same.
1587 * gcc.dg/graphite/interchange-9.c: Same.
1588 * gcc.dg/graphite/interchange-mvt.c: Same.
1589 * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
d0546b2e 1590
ce363cd5 15912010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1592
1593 * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1594 background.
1595
15962010-01-22 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1597
1598 * common.opt: Add -fgraphite-cloog-opts.
1599 * graphite-clast-to-gimple.c (set_cloog_options): Same.
1600 * opts.c (decode_options): Same.
1601
7bcf2a47 16022010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1603
6c9df8cb 1604 * gcc.dg/graphite/id-17.c: New.
1605 * gcc.dg/graphite/pr41888.c: New.
1606 * gcc.dg/graphite/scop-22.c: New.
1607 * gfortran.dg/graphite/pr40982.f90: New.
7bcf2a47 1608
f21ef1e7 16092010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1610
1611 * graphite-dependences.c: Clarify comments.
1612 (build_pddr): Add an extra parameter direction.
1613 (graphite_legal_transform_dr): Use build_pddr.
1614 (dot_original_deps_stmt_1): Update use of build_pddr.
1615 (dot_transformed_deps_stmt_1): Same.
1616 (dot_original_deps): Same.
1617 (dot_transformed_deps): Same.
1618
6c9df8cb 1619 * gcc.dg/graphite/interchange-12.c: New.
1620 * gcc.dg/graphite/block-7.c: New.
f21ef1e7 1621
4f19d858 16222010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1623
1624 * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1625 (pddr_transformed_scattering): Removed.
1626 (graphite_legal_transform_dr): Use build_pddr.
1627 (dot_original_deps_stmt_1): Same.
1628 (dot_transformed_deps_stmt_1): Same.
1629 (dot_original_deps): Same.
1630 (dot_transformed_deps): Same.
1631
4fe30658 16322010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1633
1634 * graphite-dependences.c (lexicographically_gt_p): Add comments.
1635 (build_lexicographically_gt_constraint): Same.
1636 (dependence_polyhedron_1): Same.
1637 (dependence_polyhedron): Same.
1638
abc97125 16392010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1640
1641 * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1642 (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1643 (lexicographically_gt_p): Change type of direction to int.
1644 (build_lexicographically_gt_constraint): Same.
1645 (dependence_polyhedron_1): Same.
1646 (dependence_polyhedron): Same.
1647 (pddr_original_scattering): Use integers for direction.
1648 (pddr_transformed_scattering): Same.
1649 (graphite_legal_transform_dr): Same.
1650 (graphite_carried_dependence_level_k): Same.
1651
b57cb73e 16522010-01-20 Sebastian Pop <sebastian.pop@amd.com>
1653
1654 * graphite-dependences.c (build_pairwise_constraint): Renamed
1655 ppl_build_relation. Moved...
1656 (dr_equality_constraints): Use ppl_build_relation.
1657 (build_pairwise_scheduling_equality): Same.
1658 (build_pairwise_scheduling_inequality): Same.
1659 * graphite-ppl.c (ppl_build_relation): ...here.
1660 * graphite-ppl.h (ppl_build_relation): Declared.
1661
2487de19 16622010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1663
1664 PR middle-end/42681
1665 * graphite-clast-to-gimple.c (gloog_error): New static variable.
1666 (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1667 Set gloog_error when such an expression failed to be built.
1668 (translate_clast): Early return when gloog_error is set.
1669 (gloog): Clear gloog_error. When gloog_error is set, call
1670 set_ifsese_condition to enable the original code. Return the status
1671 of the code generation based on gloog_error.
1672 * sese.c (set_ifsese_condition): New.
1673 * sese.h (set_ifsese_condition): Declared.
1674
6c9df8cb 1675 * g++.dg/graphite/pr42681.C: New.
2487de19 1676
efe339e3 16772010-01-14 Sebastian Pop <sebastian.pop@amd.com>
1678
1679 PR middle-end/42732
1680 * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1681 rename_nb_iterations.
1682 * sese.c (rename_variables_in_operand): New.
1683 (rename_variables_in_expr): New.
1684 (rename_nb_iterations): New.
1685 (sese_adjust_liveout_phis): Update the rename_map.
1686 * sese.h (rename_nb_iterations): Declared.
1687 * tree-scalar-evolution.c (scev_reset_htab): New.
1688 (scev_reset): Call scev_reset_htab.
1689 * tree-scalar-evolution.h (scev_reset_htab): Declared.
1690
6c9df8cb 1691 * gfortran.dg/graphite/pr42732.f: New.
efe339e3 1692
a77f6f84 16932010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1694
1695 PR middle-end/42393
1696 * graphite-clast-to-gimple.c: Fix formatting.
1697 * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1698 (expr_defined_in_loop_p): New.
1699 (add_loop_exit_phis): Also handle full expressions: remove from
1700 the rename_map the expressions defined in the loop that we're closing.
1701
6c9df8cb 1702 * gfortran.dg/graphite/pr42393-1.f90: New.
1703 * gfortran.dg/graphite/pr42393.f90: Add new flags
a77f6f84 1704 -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1705 make this testcase useful in the Graphite branch.
1706
01e31b4b 17072010-01-08 Sebastian Pop <sebastian.pop@amd.com>
1708
1709 * graphite-scop-detection.c (exclude_component_ref): Removed.
1710 (is_simple_operand): Removed.
1711 (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1712
2379556f 17132010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1714
1715 PR middle-end/42221
1716 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1717 the array indexing of ADDR_EXPRs.
1718
6c9df8cb 1719 * gcc.dg/graphite/pr42221.c: New.
2379556f 1720
d9458edc 17212010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1722
1723 PR middle-end/42521
1724 * graphite.c (graphite_finalize): Call scev_reset.
1725 (graphite_transform_loops): Do not call scev_reset between the code
1726 generation of scops.
1727
6c9df8cb 1728 * gcc.dg/graphite/pr42521.c: New.
d9458edc 1729
b33d4eb4 17302010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1731
1732 * graphite-interchange.c (memory_stride_in_loop): Renamed
1733 pdr_stride_in_loop.
1734 (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1735 (memory_strides_in_loop): Memoize the memory strides per loop.
1736 (lst_interchange_profitable_p): Do not initialize to zero the memory
1737 strides.
1738 * graphite-poly.h (struct lst): Add a field memory_strides.
1739 (LST_LOOP_MEMORY_STRIDES): New.
1740 (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1741 (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1742
a16e8346 17432010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1744
1745 * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1746 memory_strides_in_loop. Gather memory strides on a whole loop.
1747 (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1748 (lst_interchange_profitable_p): Removed.
1749 (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1750
2edfa860 17512010-01-07 Sebastian Pop <sebastian.pop@amd.com>
1752
1753 Revert patch 2009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1754 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1755 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1756 Remove context_loop and level.
1757
3f12432d 17582010-01-07 Richard Guenther <rguenther@suse.de>
1759
1760 PR tree-optimization/42641
1761 * sese.c (rename_map_elt_info): Use the SSA name version, do
1762 not hash pointers.
1763
17642010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1765
1766 * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1767 blocked" only when both the strip mine and the interchange have
1768 been applied.
1769
6c9df8cb 1770 * gcc.dg/graphite/block-2.c: Removed.
1771 * gcc.dg/graphite/block-3.c: Add scan pattern.
1772 * gcc.dg/graphite/block-4.c: Same.
1773 * gcc.dg/graphite/block-5.c: Same.
1774 * gcc.dg/graphite/block-6.c: Same.
3f12432d 1775
cfd3faac 17762010-01-06 Sebastian Pop <sebastian.pop@amd.com>
1777
1778 * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1779 before allocating a new one.
1780 (copy_renames): Check that slot is not NULL.
1781 (mark_bb_with_pbb): Same.
1782 (compute_cloog_iv_types_1): Same.
1783 * graphite-interchange.c (lst_perfect_nestify): Free the before,
1784 nest, and after LSTs.
1785 (lst_try_interchange_loops): Same.
1786
a1a6700b 17872010-01-05 Sebastian Pop <sebastian.pop@amd.com>
1788
1789 PR middle-end/42178
1790 * graphite-interchange.c (lst_try_interchange_loops): Do not return
1791 the before, nest, and after LSTs.
1792 (lst_try_interchange): Removed.
1793 (lst_interchange_select_inner): Do not iterate over the LSTs if they
1794 were modified.
1795 (lst_interchange_select_outer): Apply interchange on the outer loop
1796 until there are no more changes in the inner loops.
1797
7f60ea7e 17982009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1799
1800 Revert patch fixing PR middle-end/42221.
1801
18022009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1803
1804 PR middle-end/42180
1805 * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1806 GIMPLE_CALL.
1807
6c9df8cb 1808 * gfortran.dg/graphite/pr42180.f90: Add compile flags.
7f60ea7e 1809
c668dee5 18102009-12-18 Sebastian Pop <sebastian.pop@amd.com>
1811
1812 PR middle-end/42180
1813 * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1814 that contain only one statement.
1815
6c9df8cb 1816 * gfortran.dg/graphite/pr42180.f90: New.
7f60ea7e 1817
a190b734 18182009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1819
1820 PR middle-end/42393
6c9df8cb 1821 * gfortran.dg/graphite/pr42393.f90: New.
a190b734 1822
1747b6ef 18232009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1824
1825 PR middle-end/42186
6c9df8cb 1826 * gfortran.dg/graphite/pr42186.f90: New.
1747b6ef 1827
36f22aa0 18282009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1829
1830 PR middle-end/42205
1831 * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1832 Insert the reduction copy in the same block as the phi node.
1833 (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1834
6c9df8cb 1835 * gcc.dg/graphite/pr42205-1.c: New.
1836 * gcc.dg/graphite/pr42205-2.c: New.
36f22aa0 1837
18382009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1839
1840 PR middle-end/42221
1841 * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1842 the array indexing of ADDR_EXPRs.
1843
6c9df8cb 1844 * gcc.dg/graphite/pr42221.c: New.
36f22aa0 1845
673c512e 18462009-12-17 Sebastian Pop <sebastian.pop@amd.com>
1847
1848 PR middle-end/42178
1849 PR middle-end/42334
1850 * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1851 index. Call lst_interchange_select_inner only once.
1852 (lst_interchange_select_inner): Update use of lst_try_interchange.
1853 (lst_interchange_select_outer): Update.
1854
18552009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1856
1857 PR middle-end/42178
1858 PR middle-end/42334
1859 * graphite-interchange.c (lst_try_interchange): Do not increment the
1860 the OUTER index when there is no AFTER kernel. Do not increment the
1861 OUTER index for after processing the AFTER kernel.
1862 (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1863 (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1864 index. Do not pass to lst_interchange_select_inner the OUTER index.
1865 (scop_do_interchange): Update use of lst_interchange_select_outer.
1866
6c9df8cb 1867 * gfortran.dg/graphite/graphite.exp
673c512e 1868 (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
6c9df8cb 1869 * gfortran.dg/graphite/interchange-1.f: Add comment. Clean
673c512e 1870 the graphite dump file.
6c9df8cb 1871 * gfortran.dg/graphite/interchange-2.f: Same.
1872 * gfortran.dg/graphite/pr42334-1.f: New.
673c512e 1873
18742009-12-15 Sebastian Pop <sebastian.pop@amd.com>
1875
1876 PR middle-end/42178
1877 PR middle-end/42334
1878 * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
1879 that are empty.
1880 (lst_do_interchange_1): Renamed lst_interchange_select_inner.
1881 (lst_try_interchange): Reimplemented.
1882 (lst_interchange_select_inner): Same.
1883 (lst_do_interchange): Renamed lst_interchange_select_outer.
1884 Reimplemented.
1885 (scop_do_interchange): Update use of lst_interchange_select_outer.
1886
6c9df8cb 1887 * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
1888 * gcc.dg/graphite/block-0.c: Un-XFAILed.
1889 * gcc.dg/graphite/pr42211.c: New.
1890 * gfortran.dg/graphite/pr42334.f90: New.
673c512e 1891
99c136a5 18922009-12-14 Sebastian Pop <sebastian.pop@amd.com>
1893
1894 PR middle-end/42181
1895 * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
1896 carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
1897
6c9df8cb 1898 * gfortran.dg/graphite/pr42181.f90: New.
99c136a5 1899
5184a05f 19002009-12-12 Sebastian Pop <sebpop@gmail.com>
1901
1902 PR middle-end/42284
1903 * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
1904 insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
1905 (detect_commutative_reduction_arg): Simplified.
1906 (detect_commutative_reduction): Early return when the argument of
1907 the close phi is not of an SSA_NAME.
1908
6c9df8cb 1909 * gcc.dg/graphite/pr42284.c: New.
5184a05f 1910
19112009-12-11 Alexander Monakov <amonakov@ispras.ru>
1912
1913 * dbgcnt.def (graphite_scop): New counter.
1914 * graphite.c: Include dbgcnt.h
1915 (graphite_transform_loops): Use new counter to limit transformations.
1916
7464e753 19172009-12-08 Sebastian Pop <sebpop@gmail.com>
1918
1919 PR middle-end/42285
1920 * graphite-scop-detection.c (graphite_can_represent_init): Also
1921 handle more complex MULT_EXPRs containing parameters by recursion
1922 on the structure.
1923
6c9df8cb 1924 * gfortran.dg/graphite/pr42285.f90: New.
7464e753 1925
19262009-12-01 Tobias Grosser <grosser@fim.uni-passau.de>
1927
6c9df8cb 1928 * g++.dg/graphite/pr42130.C: Fix type.
7464e753 1929
f96db528 19302009-11-29 Alexander Monakov <amonakov@gcc.gnu.org>
1931
6c9df8cb 1932 * g++.dg/graphite/pr42130.C: Correct testcase.
1933
19342009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1935
1936 * Merge from mainline (154493:154734).
1937
19382009-11-28 Tobias Grosser <grosser@fim.uni-passau.de>
1939
1940 * Merge from mainline (151362:154491).
f96db528 1941
b7bde372 19422009-11-24 Tobias Grosser <grosser@fim.uni-passau.de>
1943
1944 * graphite-clast-to-gimple.c (try_mark_loop_parallel,
1945 graphite_create_new_loop_guard, translate_clast_for): Fix comments.
1946
32e78944 19472009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1948
1949 PR middle-end/42130
1950 * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
1951 translate_clast_for_loop): New.
1952 (translate_clast_for): Add a condition around the loop, to do not
1953 execute loops with zero iterations.
6c9df8cb 1954 * g++.dg/graphite/pr42130.C: New.
1955 * gcc.dg/graphite/pr35356-2.c: Adapt.
32e78944 1956
bafaa7f6 19572009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1958
1959 * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1960 (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1961 Remove context_loop and level.
1962
0f5b569a 19632009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1964
1965 * graphite-clast-to-gimple.c (translate_clast_user,
1966 translate_clast_for, translate_clast_guard): Simplify and move common
1967 elements to translate_clast().
1968 (translate_clast): Simplify and get common elements.
1969
9a75e57c 19702009-11-23 Tobias Grosser <grosser@fim.uni-passau.de>
1971
1972 * graphite-clast-to-gimple.c (translate_clast_user,
1973 translate_clast_for, translate_clast_guard): Split out of
1974 translate_clast.
1975
c9ef6b0e 19762009-11-21 Tobias Grosser <grosser@fim.uni-passau.de>
1977
1978 * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
1979 clast_name_to_index, save_clast_name_index, debug_clast_name_index,
1980 debug_clast_name_indexes_1, debug_clast_name_indexes,
1981 clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
1982 (clast_name_to_gcc, clast_to_gcc_expression,
1983 clast_to_gcc_expression_red, gcc_type_for_clast_expr,
1984 gcc_type_for_clast_eq, graphite_translate_clast_equation,
1985 graphite_create_guard_cond_expr, graphite_create_new_loop,
1986 translate_clast): Add params_index.
1987 (initialize_cloog_names): Create parameter strings from scratch, do
1988 not reference other strings.
1989 (create_params_index): New.
1990 (gloog): Initialize params_index.
1991 * graphite-scop-detection (free_scops_1): Removed.
1992 (limit_scops): Use normal free_scops.
1993 * graphite-sese-to-poly.c (save_var_names): Removed.
1994 (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
1995 and SESE_PARAMS_INDEX.
1996 * sese.c (new_sese, free_sese): Dito.
1997 * sese.h (struct sese): Remove params_index, params_names.
1998 (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
1999
a2a00920 20002009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2001
2002 Revert the following patch from 2009-09-14:
2003 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2004 tree-scalar-evolution.h, and then tree-data-ref.h.
2005 * graphite-clast-to-gimple.c: Same.
2006 * graphite-dependences.c: Same.
2007 * graphite-interchange.c: Same.
2008 * graphite-poly.c: Same.
2009 * graphite-scop-detection.c: Same.
2010 * graphite-sese-to-poly.c: Same.
2011 * graphite.c: Same.
2012 * lambda-code.c: Same.
2013 * matrix-reorg.c: Same.
2014 * tree-data-ref.c: Same.
2015 * tree-if-conv.c: Same.
2016 * tree-loop-distribu: Same.: Same.
2017 * tree-loop-linear.c: Same.
2018 * tree-parloops.c: Same.
2019 * tree-predcom.c: Same.
2020 * tree-vect-patterns.c: Same.
2021
2bc59caa 20222009-11-20 Sebastian Pop <sebastian.pop@amd.com>
2023
2024 Revert patch from 2009-09-14.
2025 * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2026 passes at -O1 and below.
2027
1d4dd1ed 20282009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2029
2030 PR middle-end/40281
6c9df8cb 2031 * gcc.dg/graphite/pr40281.c: New.
1d4dd1ed 2032
2033 * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2034 evolutions should not variate in inner loops.
2035
efe7b64c 20362009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2037
2038 PR middle-end/42050
6c9df8cb 2039 * gfortran.dg/graphite/pr42050.f90: New.
efe7b64c 2040
acba5819 20412009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2042
2043 * graphite-interchange.c (memory_strides_in_loop_depth): New.
2044 (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2045
64d8f27a 20462009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2047
2048 * graphite-blocking.c (scop_do_block): New.
2049 * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2050 * graphite-poly.h (scop_do_block): Declared.
2051
9a0158f5 20522009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2053
2054 * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2055 depth is the loop nesting depth in the LST. Call psct_dynamic_dim
2056 to transform depth into the time_depth before calling
2057 pbb_number_of_iterations_at_time.
2058 (lst_do_strip_mine): Use a scalar variable instead of recomputing
2059 lst_depth.
2060
9d274e75 20612009-11-18 Sebastian Pop <sebastian.pop@amd.com>
2062
2063 Reverted the patch for "scattering permutations" from 2009-10-28.
2064
2065 * graphite-poly.c (print_permutation): New.
2066 (debug_permutation): New.
2067 (new_poly_bb): Initialize PBB_PERMUTATION.
2068 (free_poly_bb): Free PBB_PERMUTATION.
2069 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2070 (struct pbb_permutation_elt): New.
2071 (PBB_PERMUTATION_ELT_STRIDE): New.
2072 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2073 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2074 (new_pbb_permutation_elt): New.
2075 (pbb_permutation_elt_free): New.
2076 (struct poly_bb): Add field permutation.
2077 (PBB_PERMUTATION): New.
2078 (print_permutation): Declared.
2079 (debug_permutation): Declared.
2080
3bcc3204 20812009-11-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
2082
2083 * graphite-interchange.c (build_partial_difference): New.
2084 (memory_stride_in_loop): Refactored the computation of
2085 equality constraints into build_partial_difference function.
2086 Added support for debugging stride computations.
2087
d996851c 20882009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2089
2090 * graphite-clast-to-gimple.c (gloog): Free if_region,
2091 if_region->true_region, and if_region->region.
2092 * sese.c (if_region_set_false_region): Free if_region->false_region.
2093 (create_if_region_on_edge): Do not use GGC_NEW.
2094 (move_sese_in_condition): Remove useless initialization.
2095
87d25ca7 20962009-11-03 Sebastian Pop <sebastian.pop@amd.com>
2097
2098 * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2099 for the loops created by the loop distribution. Do not modify the
2100 input LSTs.
2101 (lst_try_interchange_loops): Same. Use a temporary LST for the
2102 transformed schedule. Call lst_update_scattering before data
2103 dependence analysis.
2104 (lst_try_interchange): Pass an extra parameter INDEX.
2105 (lst_do_interchange_1): New.
2106 (lst_do_interchange): Call lst_do_interchange_1.
2107 (scop_do_interchange): Call lst_update_scattering.
2108 * graphite-poly.c (apply_poly_transforms): Do not call
2109 lst_update_scattering.
2110 * graphite-poly.h (lst_pred): New.
2111 (lst_succ): New.
2112 (lst_find_first_pbb): Return NULL when not found.
2113 (lst_empty_p): New.
2114 (lst_insert_in_sequence): Allow LST1 to be NULL.
2115 (lst_replace): New.
2116 (lst_substitute_3): New.
2117 * gcc.dg/graphite/interchange-1.c: XFail.
2118 * gcc.dg/graphite/interchange-8.c: XFail.
2119 * gcc.dg/graphite/interchange-11.c: XFail.
2120
06ced013 21212009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2122
2123 * graphite-interchange.c (lst_perfectly_nested_p): New.
2124 (lst_perfect_nestify): New.
2125 (lst_try_interchange_loops): Call store_lst_schedule,
2126 lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2127 (scop_do_interchange): Avoid redundant legality test.
2128 Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2129 * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2130 * graphite-poly.h (psct_static_dim): New.
2131 (lst_dewey_number_at_depth): New.
2132 (lst_find_pbb): Restructured.
2133 (lst_find_first_pbb): Restructured.
2134 (lst_find_last_pbb): New.
2135 (lst_contains_p): New.
2136 (lst_contains_pbb): New.
2137 (lst_create_nest): New.
2138 (lst_remove_from_sequence): New.
2139 (pbb_update_scattering): New.
2140 (lst_update_scattering_under): New.
2141 (lst_update_scattering_seq): New.
2142 (lst_update_scattering): New.
2143 (lst_insert_in_sequence): New.
2144 (lst_distribute_lst): New.
2145 (lst_remove_all_before_including_pbb): New.
2146 (lst_remove_all_before_excluding_pbb): New.
2147
bf3aab8f 21482009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2149
2150 * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2151 get_loop_exit_edges.
2152
06b1d38c 21532009-10-30 Sebastian Pop <sebastian.pop@amd.com>
2154
2155 * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2156
22467ffb 21572009-10-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2158
2159 * graphite-poly.c (print_permutation): New.
2160 (debug_permutation): New.
2161 (new_poly_bb): Initialize PBB_PERMUTATION.
2162 (free_poly_bb): Free PBB_PERMUTATION.
2163 * graphite-poly.h (pbb_permutation_elt_p): Declared.
2164 (struct pbb_permutation_elt): New.
2165 (PBB_PERMUTATION_ELT_STRIDE): New.
2166 (PBB_PERMUTATION_ELT_STRIDED_P): New.
2167 (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2168 (new_pbb_permutation_elt): New.
2169 (pbb_permutation_elt_free): New.
2170 (struct poly_bb): Add field permutation.
2171 (PBB_PERMUTATION): New.
2172 (print_permutation): Declared.
2173 (debug_permutation): Declared.
2174
628eaf60 21752009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2176
2177 * graphite-clast-to-gimple.c (gloog): Do not call
2178 sese_reset_aux_in_loops.
2179 * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2180 extra argument for domains. Do not use loop->aux.
2181 (build_scop_iteration_domain): Initialize and free domains, pass it
2182 to build_loop_iteration_domains and extract the information from
2183 domains. Do not use loop->aux.
2184 * sese.c (sese_reset_aux_in_loops): Removed.
2185 * sese.h (sese_reset_aux_in_loops): Removed.
2186
2eb8c11d 21872009-10-26 Sebastian Pop <sebastian.pop@amd.com>
2188
2189 * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2190 (dependency_in_loop_p): Same.
2191 (translate_clast): Do not use loop->aux. Initialize
2192 loop->can_be_parallel.
2193 (mark_loops_parallel): Removed.
2194 * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2195 * graphite.c (free_aux_in_new_loops): Removed.
2196 (graphite_finalize): Do not call free_aux_in_new_loops.
2197 (graphite_transform_loops): Do not call mark_loops_parallel.
2198
21992009-10-26 Li Feng <nemokingdom@gmail.com>
86cbf617 2200
2201 * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2202 (translate_clast): Pass an extra parameter LEVEL.
2203 Call get_scattering_level.
2204 * graphite-clast-to-gimple.h (get_scattering_level): New.
2205
314c9614 22062009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2207
2208 * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2209 * cfgloop.h (struct loop): New field single_iv.
2210
2211 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2212 loop->aux anymore: use loop->single_iv.
2213 (graphite_loop_normal_form): Moved...
2214 (build_graphite_loop_normal_form): Removed.
2215 (gloog): Do not call build_graphite_loop_normal_form.
2216 (free_aux_in_new_loops): Moved...
2217 (mark_loops_parallel): Restructure.
2218 * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2219 * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2220 (scop_canonicalize_loops): New.
2221 (build_poly_scop): Call scop_canonicalize_loops.
2222 * graphite.c (free_aux_in_new_loops): ...here.
2223
71bc7526 22242009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2225
2226 * g++.dg/graphite/graphite.exp: Add the same rules as in
2227 gcc.dg/graphite/graphite.exp.
2228
24af1ef8 22292009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2230
2231 * g++.dg/graphite/id-1.C: New.
2232
03c1327b 22332009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2234
2235 * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2236 argument base_name.
2237 (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2238 (rewrite_phi_out_of_ssa): Same.
2239 (rewrite_cross_bb_scalar_deps): Same.
2240 (translate_scalar_reduction_to_array): Same.
2241
8f9b64ca 22422009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2243
2244 * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2245 dump_alias_graphs.
2246
aa16918e 22472009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2248
2249 * graphite-sese-to-poly.c (dump_alias_graphs): New.
2250 (build_scop_drs): Call dump_alias_graphs.
2251
7e7ffe19 22522009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2253
2254 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2255 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2256 (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2257 SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2258 * graphite-poly.h (free_lst): New.
2259 (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2260 (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2261
e2622b4f 22622009-10-22 Sebastian Pop <sebastian.pop@amd.com>
2263
2264 * graphite-poly.h (struct scop): Add a field saved_schedule.
2265 (SCOP_SAVED_SCHEDULE): New.
2266 (store_lst_schedule): New.
2267 (restore_lst_schedule): New.
2268 (store_scattering): Call store_lst_schedule.
2269 (restore_scattering): Call restore_lst_schedule.
2270
1a95516e 22712009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2272
2273 * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2274 (pdr_add_alias_set): Same.
2275 (build_poly_dr): Same.
2276 (build_alias_set_optimal_p): Same.
2277 (build_base_obj_set_for_drs): Same. Do not store the result of
2278 graphds_dfs.
2279
f289f81b 22802009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2281
2282 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2283 all_components_are_cliques to 1.
2284
e9a3f95f 22852009-10-20 Li Feng <nemokingdom@gmail.com>
2286
2287 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2288 the new structure.
2289 (pdr_add_alias_set): Update retrieving alias_set_num.
2290 (build_poly_dr): Update retrieving dr_base_object_set.
2291 (partition_drs_to_sets): Remove.
2292 (build_alias_set_optimal_p): New.
2293 (build_alias_set_for_drs): Rename.
2294 (build_scop_drs): Update.
2295 * graphite-sese-to-poly.h (struct base_alias_pair): New.
2296 (ALIAS_SET_INDEX): Remove.
2297 (BASE_OBJECT_SET_INDEX): Remove.
2298
a6457fb8 22992009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2300
2301 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2302
3354e72e 23032009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2304
2305 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2306 loop upper bounds for 1-element arrays at end of structures.
2307 * tree-flow.h (array_at_struct_end_p): Declared.
2308 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2309
917c8e43 23102009-10-20 Sebastian Pop <sebastian.pop@amd.com>
2311
2312 * g++.dg/graphite/pr41305.C: New.
2313
b6410506 23142009-10-20 Alexander Monakov <amonakov@ispras.ru>
2315
2316 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2317 construction of parameter constraints from loop iteration analysis.
2318 * gcc.dg/graphite/run-id-2.c: New test.
2319
a66257d5 23202009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2321
2322 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2323 and new_cstr.
2324
38e3217b 23252009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2326
2327 * graphite-dependences.c (dependence_polyhedron_1): Remove
2328 unused gdim dimensions from the DDR polyhedron.
2329
de38f9c0 23302009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2331
2332 * graphite-dependences.c (pddr_transformed_scattering): New.
2333 (dot_original_deps_stmt_1): New.
2334 (dot_transformed_deps_stmt_1): New.
2335 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2336 dot_transformed_deps_stmt_1.
2337 (dot_original_deps): New.
2338 (dot_transformed_deps): New.
2339 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2340
ba01d66f 23412009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2342
2343 * graphite-dependences.c (reduction_dr_1): Remove wrong
2344 assert: reduction BBs can have multiple reduction writes
de38f9c0 2345 to memory. interchange-3.f90 is an example.
ba01d66f 2346
9050e62f 23472009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2348
2349 * gfortran.dg/graphite/interchange-3.f90: New.
2350
d26b2d30 23512009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2352
2353 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2354
bff9278d 23552009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2356
2357 * graphite-dependences.c (dependence_polyhedron_1): Add the
2358 context to the dependence polyhedron.
2359
13d0cae2 23602009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2361
2362 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2363 PBB_PDR_DUPLICATES_REMOVED.
2364 (new_poly_bb): Same.
2365
acb3969f 23662009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2367
2368 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2369 SCOP_CONTEXT.
2370 (build_loop_iteration_domains): Extract bounds on parameters
2371 based on the data size.
2372 (build_scop_context): Do not initialize SCOP_CONTEXT;
2373 add new constraints.
2374
e6d78739 23752009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2376
2377 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2378 * graphite-ppl.h (graphite-ppl.h): Declared.
2379
409f96c1 23802009-10-17 Sebastian Pop <sebastian.pop@amd.com>
2381
2382 * graphite-ppl.c (ppl_print_linear_expr): New.
2383 (debug_ppl_linear_expr): New.
2384 * graphite-ppl.h (ppl_print_linear_expr): Declared.
2385 (debug_ppl_linear_expr): Declared.
2386
3d695986 23872009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2388
2389 * graphite-interchange.c: Fix comments.
2390 * gcc.dg/graphite/block-1.c: Fix comments.
2391
ecab863e 23922009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2393
2394 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2395 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2396
3dfb9fc0 23972009-10-16 Sebastian Pop <sebastian.pop@amd.com>
2398
2399 Reapply the patch from Alexander Monakov that disappeared during
2400 the last merges from trunk.
2401
2402 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
2403
2404 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2405 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2406
a1190c1b 24072009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2408
2409 * graphite-interchange.c (memory_stride_in_loop): The depth
2410 argument corresponds to a dynamic time dimension, so use
2411 psct_dynamic_dim to refer to the transformed scattering dimension.
2412
dd3d3fae 24132009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2414
2415 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2416
43217ce9 24172009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2418
2419 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2420 root of the LST.
2421 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2422 the root of the LST.
2423 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2424 fake loop.
2425 (print_lst): Print the root of LST in a different format.
2426 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2427
9b6c835c 24282009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2429
2430 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2431
1e2a9aa7 24322009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2433
2434 * doc/passes.texi: Document the Graphite infrastructure.
2435
ff010926 24362009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2437
2438 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2439 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2440 and check the SSA representation.
2441
2442 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2443
fa846ea9 24442009-10-15 Sebastian Pop <sebastian.pop@amd.com>
2445
2446 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2447
fe45c436 24482009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2449
2450 * gcc.dg/graphite/interchange-11.c: New.
2451
2e3e5ac8 24522009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2453
2454 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2455
93a95718 24562009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2457
2458 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2459 Add -fno-loop-strip-mine and -fno-loop-interchange.
2460 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2461 -fno-loop-strip-mine.
2462 * gfortran.dg/graphite/graphite.exp: Same.
2463
196689e3 24642009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2465
2466 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2467 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2468 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2469 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2470 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2471 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2472 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2473 DEFAULT_FLAGS_GRAPHITE_SCOP.
2474 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2475 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2476
d9e94834 24772009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2478
2479 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2480
5e18ab2b 24812009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2482 Sebastian Pop <sebastian.pop@amd.com>
2483
2484 * graphite-interchange.c (build_linearized_memory_access): Pass an
2485 offset as parameter.
2486 (memory_stride_in_loop): Include transform scattering in the
2487 access functions to be able to querry the strides in the
2488 transformed loops.
2489 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2490 not the psct_iterator_dim.
2491
0befefcc 24922009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2493
2494 * graphite-blocking.c (pbb_do_strip_mine): Removed.
2495 (lst_do_strip_mine_loop): New.
2496 (lst_do_strip_mine): New.
2497 (scop_do_strip_mine): Call lst_do_strip_mine.
2498 * graphite-poly.h (lst_add_loop_under_loop): New.
2499 (lst_find_first_pbb): New.
2500
71b90bc3 25012009-10-14 Sebastian Pop <sebastian.pop@amd.com>
2502
2503 * graphite-poly.c (loop_to_lst): Fix LST creation.
2504
4d6599d0 25052009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2506
6c9df8cb 2507 * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
4d6599d0 2508 sizeof(unsigned long) to make it run on 32bit systems.
2509
25102009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
2511
6c9df8cb 2512 * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
4d6599d0 2513 SEGFAULT on 32bit.
2514
96233858 25152009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2516
4d6599d0 2517 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2518 Comment.
96233858 2519 (write_alias_graph_to_ascii_dot): New.
2520 (write_alias_graph_to_ascii_ecc): Ditto.
4d6599d0 2521 (partition_drs_to_sets): Add testing of optimality of current method
2522 which assigns alias numbers according to DFS Comopnent number. used
2523 as heuristic for the upcoming ECC algorithm.
96233858 2524 (build_scop_drs): Write to file also with the ecc and dot format.
2525
8eedbd74 25262009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2527
2528 * gfortran.dg/graphite/interchange-1.f: XFail.
2529
ef98ee10 25302009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2531
2532 * graphite.c (graphite_initialize): Do not handle functions with
2533 more than 100 basic blocks.
2534
b8ad26cc 25352009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2536
2537 * graphite-blocking.c (pbb_do_strip_mine): Use
2538 PARAM_LOOP_BLOCK_TILE_SIZE.
2539
4938b827 25402009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2541
2542 * graphite-poly.c (dot_lst_1): New.
2543 (dot_lst): New.
2544 * graphite-poly.h (dot_lst): Declared.
2545
a7d089ac 25462009-10-13 Sebastian Pop <sebastian.pop@amd.com>
2547
2548 * graphite-dependences.c (dot_deps_stmt_1): New.
2549 (dot_deps_stmt): New.
2550 * graphite-dependences.h (dot_deps_stmt): Declared.
2551
dd27e8aa 25522009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2553
2554 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2555 not replace cross BB scalar dependences ending on PHI nodes.
2556 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2557
dbe2e816 25582009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2559
2560 * graphite-poly.c (apply_poly_transforms): Implement the high
2561 level driver for flag_loop_block.
6c9df8cb 2562 * opts.c (decode_options): Enable flag_loop_block at -O2.
dbe2e816 2563 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2564 flag_loop_block.
2565
2566 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2567 -floop-block.
2568 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2569 Add -floop-block.
2570
89d077e8 25712009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2572
2573 * graphite-poly.h (lst_find_pbb): New.
2574 (find_lst_loop): New.
2575
220b380e 25762009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2577
2578 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2579 * graphite-poly.h (struct scop): Remove dep_graph field.
2580 (SCOP_DEP_GRAPH): Removed.
2581
554eeadb 25822009-10-09 Sebastian Pop <sebastian.pop@amd.com>
2583
2584 * graphite-poly.h (copy_lst): Do full copy of LST.
2585
30105622 25862009-10-07 Sebastian Pop <sebastian.pop@amd.com>
2587
2588 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2589 when the loop stride is zero.
2590
2591 * gcc.dg/graphite/id-16.c: New.
2592
f007fe97 25932009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2594
2595 * graphite-dependences.c (reduction_dr_1): New.
2596 (reduction_dr_p): New.
2597 (graphite_legal_transform_dr): Call reduction_dr_p.
2598 (reduction_ddr): Renamed reduction_ddr_p.
2599 * graphite-poly.h (same_pdr_p): New.
2600 (number_of_write_pdrs): New.
2601 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2602 (split_reduction_stmt): Do not split reduction statements
2603 when there are no writes to memory.
2604 (translate_scalar_reduction_to_array_for_stmt): Insert the
2605 memory reduction statement just after the scalar reduction statement.
2606
2607 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2608 Un-XFAIL-ed.
2609 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2610 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2611
4d0382bc 26122009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2613
2614 * graphite-interchange.c (lst_apply_interchange): New.
2615 (lst_interchange_profitable_p): New.
2616 (lst_try_interchange_loops): New.
2617 (lst_try_interchange): New.
2618 (lst_do_interchange): New.
2619 (pbb_do_interchange): Removed.
2620 (scop_do_interchange): Call lst_do_interchange.
2621
f77385d3 26222009-10-06 Sebastian Pop <sebastian.pop@amd.com>
2623
2624 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2625 SCOP_TRANSFORMED_SCHEDULE.
2626 (loop_to_lst): New.
2627 (scop_to_lst): New.
2628 (print_lst): New.
2629 (debug_lst): New.
2630 * graphite-poly.h (lst_p): New.
2631 (struct lst): New.
2632 (LST_LOOP_P): New.
2633 (LST_LOOP_FATHER): New.
2634 (LST_PBB): New.
2635 (LST_SEQ): New.
2636 (scop_to_lst): Declared.
2637 (print_lst): Declared.
2638 (debug_lst): Declared.
2639 (new_lst_loop): New.
2640 (new_lst_stmt): New.
2641 (copy_lst): New.
2642 (lst_depth): New.
2643 (lst_dewey_number): New.
2644 (struct scop): Add original_schedule and transformed_schedule fields.
2645 (SCOP_ORIGINAL_SCHEDULE): New.
2646 (SCOP_TRANSFORMED_SCHEDULE): New.
2647 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2648
30f4f4a6 26492009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2650
2651 * graphite-dependences.c (reduction_ddr): New.
2652 (graphite_legal_transform_bb): Call reduction_ddr.
2653 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2654 Initialize PBB_IS_REDUCTION.
2655 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2656 (PBB_IS_REDUCTION): New.
2657 (new_poly_bb): Update declaration.
2658 * graphite-scop-detection.h (build_scop_bbs): Removed.
2659 (nb_reductions_in_loop): Removed.
2660 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2661 parameter for reductions.
2662 (try_generate_gimple_bb): Update call to new_poly_bb.
2663 (build_scop_bbs_1): Same.
2664 (build_scop_bbs): Same.
2665 (gsi_for_phi_node): New.
2666 (scalar_close_phi_node_p): Remove gcc_assert.
2667 (split_reduction_stmt): New.
2668 (is_reduction_operation_p): New.
2669 (phi_contains_arg): New.
2670 (follow_ssa_with_commutative_ops): New.
2671 (detect_commutative_reduction_arg): New.
2672 (detect_commutative_reduction_assign): New.
2673 (follow_inital_value_to_phi): New.
2674 (edge_initial_value_for_loop_phi): New.
2675 (initial_value_for_loop_phi): New.
2676 (detect_commutative_reduction): New.
2677 (translate_scalar_reduction_to_array_for_stmt): New.
2678 (insert_copyout): New.
2679 (insert_copyin): New.
2680 (translate_scalar_reduction_to_array): New.
2681 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2682 (rewrite_commutative_reductions_out_of_ssa_loop): New.
2683 (rewrite_commutative_reductions_out_of_ssa): New.
2684 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2685 * sese.h (split_region_for_bb): New.
2686
2687 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2688 * gcc.dg/graphite/interchange-1.c: Fix format.
2689 * gcc.dg/graphite/interchange-10.c: New.
2690
dcdff5dc 26912009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2692
2693 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2694 buggy assert.
2695
5061777c 26962009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2697
2698 * graphite-sese-to-poly.c (scev_analyzable_p): New.
2699 (rewrite_cross_bb_scalar_dependence): New.
2700 (rewrite_cross_bb_scalar_deps): New.
2701 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2702 Call rewrite_cross_bb_scalar_deps.
2703
52123e43 27042009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2705
2706 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2707 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2708 gsi_for_stmt.
2709
ef43e998 27102009-10-05 Sebastian Pop <sebastian.pop@amd.com>
2711
2712 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2713 * graphite-interchange.c (pbb_do_interchange): Same.
2714 * graphite-poly.c (print_scattering_function): Same.
2715 (debug_pdrs): Same.
2716 * graphite-poly.h (pbb_loop): New.
2717 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2718
7bf7d520 27192009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2720
2721 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2722
9c48819a 27232009-09-27 Sebastian Pop <sebastian.pop@amd.com>
2724
2725 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2726 so don't pass a pointer to it.
2727 (build_alias_set_for_drs): Same.
2728 (build_base_obj_set_for_drs): Same.
2729 (build_scop_drs): Same.
2730
af3b89d1 27312009-09-26 Li Feng <nemokingdom@gmail.com>
2732
2733 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2734 the alias graph of data references.
2735
8dee37ec 27362009-09-25 Li Feng <nemokingdom@gmail.com>
2737
2738 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2739 (build_scop_drs): When debugging, write the alias graph to file,
2740 otherwise, should be disabled.
2741
6c9df8cb 27422009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2743
2744 * Merge from mainline (151310:151361).
2745
27462009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2747
2748 * Merge from mainline (151171:151310).
2749
27502009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2751
2752 * Merge from mainline (151171:151806).
2753
27542009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2755
2756 * Revert the last commit.
2757
27582009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2759
2760 * Merge from mainline (151171:151819).
2761
3cc56eaf 27622009-09-17 Sebastian Pop <sebastian.pop@amd.com>
2763
2764 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2765 (is_simple_operand): Remove call to stmt_simple_memref_p.
2766 (stmt_simple_for_scop_p): Update call to is_simple_operand.
2767
4d62cf0c 27682009-09-17 David Edelsohn <edelsohn@gnu.org>
2769
6c9df8cb 2770 * gcc.dg/graphite/interchange-mvt.c: New File.
2771 * gcc.dg/graphite/scop-dsyrk.c: New File.
2772 * gcc.dg/graphite/scop-dsyr2k.c: New File.
2773 * gcc.dg/graphite/scop-mvt.c: New File.
2774 * gcc.dg/graphite/scop-sor.c: New File.
4d62cf0c 2775
ae11f03b 27762009-09-17 Li Feng <nemokingdom@gmail.com>
2777
ae11f03b 2778 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2779 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2780 (graphite_carried_dependence_level_k): Ditto.
2781 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2782 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2783 (new_poly_dr): Adjust declaration.
2784 * graphite-sese-to-poly.c (free_data_refs_aux): New.
2785 (free_gimple_bb): Added free_data_refs_aux.
2786 (build_poly_dr): Add dr_base_object_set.
2787 (partition_drs_to_sets): New.
2788 (dr_same_base_object_p): New.
2789 (build_alias_set_for_drs): New.
2790 (build_base_object_set_for_drs): New.
2791 (build_scop_drs): Add build_base_obj_set_for_drs.
2792 * graphite-sese-to-poly.h: Added #define for alias set number index and
2793 base object set index.
2794 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2795 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2796
e5d72697 27972009-09-16 Alexander Monakov <amonakov@ispras.ru>
2798
2799 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2800 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
2801
db899978 28022009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2803
2804 * graphite-sese-to-poly.c (struct irp_data): Removed.
2805 (idx_record_params): Removed.
2806 (find_params_in_bb): Scan for parameters the access functions; don't
2807 parse the tree representation.
2808
e5b6be5e 28092009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2810
2811 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2812 passes at -O1 and below.
2813
f631009f 28142009-09-14 Sebastian Pop <sebastian.pop@amd.com>
2815
2816 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2817 tree-scalar-evolution.h, and then tree-data-ref.h.
2818 * graphite-clast-to-gimple.c: Same.
2819 * graphite-dependences.c: Same.
2820 * graphite-interchange.c: Same.
2821 * graphite-poly.c: Same.
2822 * graphite-scop-detection.c: Same.
2823 * graphite-sese-to-poly.c: Same.
2824 * graphite.c: Same.
2825 * lambda-code.c: Same.
2826 * matrix-reorg.c: Same.
2827 * tree-data-ref.c: Same.
2828 * tree-if-conv.c: Same.
2829 * tree-loop-distribu: Same.: Same.
2830 * tree-loop-linear.c: Same.
2831 * tree-parloops.c: Same.
2832 * tree-predcom.c: Same.
2833 * tree-vect-patterns.c: Same.
2834
5e803fbe 28352009-09-02 Sebastian Pop <sebastian.pop@amd.com>
2836
2837 Partially revert the previous patch, except the following.
2838 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2839 as parameters the operands of the not expression.
2840
c43f1e90 28412009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2842
2843 * tree-scalar-evolution.c (instantiate_scev_assign): New.
2844 Do not call analyze_scalar_evolution on assignments.
2845 (instantiate_scev_phi): Call analyze_scalar_evolution.
2846 (instantiate_scev_name): Call instantiate_scev_assign and
2847 instantiate_scev_phi.
2848 (instantiate_scev_not): Adapted to pass as parameters the operands
2849 of the not expression.
2850
9e9aa0c6 28512009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2852
2853 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2854 to pass as parameters the operands of the binary expression.
2855
9d206f16 28562009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2857
2858 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2859 instantiate_scev_not. Handle NEGATE_EXPR.
2860 (instantiate_scev_r): Handle NEGATE_EXPR.
2861
d91a99f1 28622009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2863
2864 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2865 instantiate_scev_r.
2866 (instantiate_scev_r): Move code in instantiate_scev_2
2867 and instantiate_scev_1.
2868
378a6626 28692009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2870
2871 * tree-scalar-evolution.c (instantiate_scev_3): New.
2872 (instantiate_scev_1): Move code in instantiate_scev_3.
2873
a819f845 28742009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2875
2876 * tree-scalar-evolution.c (instantiate_scev_poly): New.
2877 (instantiate_scev_1): Move code in instantiate_scev_poly.
2878
39251a91 28792009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2880
2881 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
2882 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
2883
7723692a 28842009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2885
2886 * tree-scalar-evolution.c (instantiate_scev_convert): New.
2887 (instantiate_scev_1): Move code in instantiate_scev_convert.
2888
5a10dfba 28892009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2890
2891 * tree-scalar-evolution.c (instantiate_scev_binary): New.
2892 (instantiate_scev_1): Move code in instantiate_scev_binary.
2893
0731d869 28942009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2895
2896 * tree-scalar-evolution.c (instantiate_scev_name): New.
2897 (instantiate_scev_1): Move code in instantiate_scev_name.
2898
28992009-08-28 Sebastian Pop <sebastian.pop@amd.com>
2900
2901 * Merge from mainline (150992:151171).
2902
6c9df8cb 29032009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2904
2905 * opts.c (decode_options): Enable flag_loop_interchange at -O2.
2906
9e3531b5 29072009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2908
2909 * graphite-dependences.c (graphite_legal_transform_bb): Call
2910 pbb_remove_duplicate_pdrs.
2911 * graphite-poly.c (can_collapse_pdr): Removed.
2912 (pdr_find_duplicate): Removed.
2913 (can_collapse_pdrs): New.
2914 (pbb_remove_duplicate_pdrs): New.
2915 (new_poly_dr): Do not look for duplicates.
2916 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
2917 (PBB_PDR_DUPLICATES_REMOVED): New.
2918 (pbb_remove_duplicate_pdrs): Declared.
2919
11b2102e 29202009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2921
2922 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
2923 the strides by multiplying by PDR_NB_REFS.
2924 * graphite-poly.c (can_collapse_pdr): New.
2925 (pdr_find_duplicate): New.
2926 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
2927 Initialize PDR_NB_REFS.
2928 * graphite-poly.h (struct poly_dr): Add field nb_refs.
2929 (PDR_NB_REFS): New.
2930 (new_poly_dr): Number of subscripts is a graphite_dim_t.
2931
29322009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2933
2934 Revert one of the previous commits:
2935 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
2936 the computation of symmetric data dependence relations.
2937 (dependency_between_pbbs_p): Same.
2938
d0aaf399 29392009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2940
2941 PR middle-end/40965
2942 * graphite-poly.c (apply_poly_transforms): Remove legality test before
2943 any transform.
2944
79698ff3 29452009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2946
2947 * graphite-dependences.c (pddr_original_scattering): Return NULL
2948 for read-read dependence relations.
2949 * graphite-poly.h (enum poly_dr_type): Fix comment.
2950 (pdr_read_p): New.
2951 (pdr_write_p): New.
2952 (pdr_may_write_p): New.
2953
c04f2da7 29542009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2955
2956 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
2957 (struct poly_dr): Same.
2958 (new_poly_dr): Same.
2959 * graphite-poly.c (new_poly_dr): Same.
2960
ee0d08ad 29612009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2962 Sebastian Pop <sebastian.pop@amd.com>
2963
2964 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
2965 pbb_strip_mine_time_depth. Changed the implementation so that
2966 transformation is expressed as a transformation on
2967 time (scatttering) dimensions. Also, ensures that the 2d+1
2968 scheduling format is preserved.
2969 (pbb_strip_mine_profitable_p): Profitability is based on the
2970 iteration number of a given time (scattering) dimension,
2971 and not on a original loop depth dimension.
2972 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
2973 (pbb_do_strip_mine): Call psct_dynamic_dim.
2974 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
2975 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
2976 (pbb_nb_dynamic_scattering_transform): New.
2977 (psct_dynamic_dim): New.
2978
55c54afb 29792009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
2980
2981 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2982 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
2983 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
2984 * graphite-interchange.c (build_linearized_memory_access): Same.
2985 (memory_stride_in_loop): Same.
2986
96b6d5d7 29872009-08-25 Sebastian Pop <sebastian.pop@amd.com>
2988
2989 * graphite-dependences.c (pddr_original_scattering): New.
2990 (graphite_legal_transform_dr): Call pddr_original_scattering.
2991 (dot_deps_1): New.
2992 (dot_deps): New.
2993 * graphite-dependences.h (dot_deps): Declared.
2994 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
2995 (print_pdr): Print PDR_ID.
2996 * graphite-poly.h (struct poly_dr): Add field id.
2997 (PDR_ID): New.
2998 (pbb_index): New.
2999 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3000
2b3a572c 30012009-08-22 Sebastian Pop <sebastian.pop@amd.com>
3002
3003 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3004 not delete the original dependence relation.
3005
30062009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3007
3008 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3009 the computation of symmetric data dependence relations.
3010 (dependency_between_pbbs_p): Same.
3011
0d6b5db2 30122009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3013
3014 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3015 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3016 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3017 (free_poly_ddr): New.
3018 (pddr_is_empty): New.
3019 (dependence_polyhedron_1): Now returns a poly_ddr_p.
3020 (dependence_polyhedron): Same. Remove useless gcc_assert.
3021 Remove fprintfs.
3022 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3023 (graphite_carried_dependence_level_k): Call pddr_is_empty.
3024 * graphite-dependences.h (enum poly_dependence_kind): New.
3025 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
3026 (PDRP_SOURCE): Renamed PDDR_SOURCE.
3027 (PDRP_SINK): Renamed PDDR_SINK.
3028 (PDRP_DDP): Renamed PDDR_DDP.
3029 (PDDR_KIND): New.
3030 (free_poly_ddr): Declared.
3031 * graphite-poly.c (new_scop): Use the new hash function names.
3032 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3033 into original_pddrs.
3034 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3035
30362009-08-21 Sebastian Pop <sebastian.pop@amd.com>
3037
3038 * Merge from mainline (150764:150992).
3039
02df46c6 30402009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3041
3042 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3043 bounds with LT_EXPR to make niter analysis more precise on code
3044 generated by Graphite.
3045
70a1a7a2 30462009-08-18 Sebastian Pop <sebastian.pop@amd.com>
3047
3048 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3049 (graphite_legal_transform_bb): Same.
3050 (poly_drs_may_alias_p): Same.
3051
19eec579 30522009-08-15 Sebastian Pop <sebastian.pop@amd.com>
3053
3054 PR middle-end/40981
3055 * graphite-ppl.c (ppl_max_for_le): Correct the use of
3056 ppl_Pointset_Powerset_C_Polyhedron_maximize.
3057
30582009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3059
3060 * graphite-poly.c (print_pbb): Print PBB index.
3061
30622009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3063
3064 * Merge from mainline (r150672:150764).
3065
30662009-08-13 Sebastian Pop <sebastian.pop@amd.com>
3067
3068 * graphite-interchange.c (ppl_max_for_le): Moved...
3069 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3070 * graphite-ppl.c (ppl_max_for_le): ... here.
3071 * graphite-ppl.h (ppl_max_for_le): Declared.
3072
30732009-08-12 Sebastian Pop <sebastian.pop@amd.com>
3074
3075 * Merge from mainline (r150372:150672).
3076
43f8b6ab 30772009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3078
3079 PR middle-end/40980
3080 * sese.c (convert_for_phi_arg): New.
3081 (add_guard_exit_phis): Use convert_for_phi_arg.
3082
6c9df8cb 3083 * gfortran.dg/graphite/id-17.f: New.
43f8b6ab 3084
96da1999 30852009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3086
3087 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3088 unknown subscript upper bounds.
3089
6c9df8cb 3090 * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
96da1999 3091
80020e9d 30922009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3093 Pranav Garg <pranav.garg2107@gmail.com>
3094
3095 * graphite-interchange.c (gather_access_strides): Removed.
3096 (ppl_max_for_le): New.
3097 (build_linearized_memory_access): New.
3098 (memory_stride_in_loop): New.
3099 (pbb_interchange_profitable_p): Reimplemented.
3100 * graphite-ppl.h (ppl_new_id_map): New.
3101 (ppl_interchange): New.
3102
6c9df8cb 3103 * gcc.dg/graphite/interchange-6.c: XFAILed.
80020e9d 3104
c9fce634 31052009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3106
3107 * graphite-interchange.c (compute_subscript): Removed.
3108 (compute_array_size_cstr): Removed.
3109 (compute_array_size_poly): Removed.
3110 (compute_array_size): Removed.
3111 (gather_access_strides_poly): Removed.
3112 (gather_access_strides): Empty.
3113
85f74b79 31142009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3115
3116 * graphite-dependences.c (dependence_polyhedron_1): Replace
3117 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3118 (graphite_legal_transform_dr): Same.
3119 (graphite_carried_dependence_level_k): Same.
3120 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3121 Initialize PDR_NB_SUBSCRIPTS.
3122 (print_pdr_access_layout): Replace pdr_nb_subscripts with
3123 PDR_NB_SUBSCRIPTS.
3124 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3125 (PDR_NB_SUBSCRIPTS): New.
3126 (pdr_nb_subscripts): Removed.
3127 (pdr_dim): Simplified.
3128 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3129 with PDR_NB_SUBSCRIPTS.
3130
19b42529 31312009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3132
3133 * graphite-interchange.c (compute_array_size): Remove use of
3134 PDR_DATA_CONTAINER.
3135 * graphite-poly.c (new_poly_dr): Remove argument data_container.
3136 Do not initialize PDR_DATA_CONTAINER.
3137 (print_pdr): Do not print PDR_DATA_CONTAINER.
3138 * graphite-poly.h (struct poly_dr): Remove data_container field.
3139 (PDR_DATA_CONTAINER): Removed.
3140 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3141 PDR_DATA_CONTAINER.
3142 (build_poly_dr): Same.
3143
9daa8810 31442009-08-11 Sebastian Pop <sebastian.pop@amd.com>
3145
6c9df8cb 3146 * gcc.dg/graphite/interchange-9.c: New.
9daa8810 3147
0835eab6 31482009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3149 Sebastian Pop <sebastian.pop@amd.com>
3150
3151 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3152 copy of the dependence polyhedron. Free the temporary objects.
3153 (graphite_carried_dependence_level_k): Free unused objects before
3154 returning.
3155
6c9df8cb 3156 * gcc.dg/graphite/interchange-1.c: XFAILed.
3157 * gcc.dg/graphite/interchange-2.c: XFAILed.
3158 * gcc.dg/graphite/interchange-3.c: XFAILed.
3159 * gcc.dg/graphite/interchange-4.c: XFAILed.
3160 * gcc.dg/graphite/interchange-7.c: XFAILed.
0835eab6 3161
a741358d 31622009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3163
3164 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3165 Early return without analyzing the data dependences if no
3166 transform has been done. Call restore_scattering if the transform
3167 is not legal.
3168 (graphite-interchange.c): Same.
3169 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3170 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3171 (apply_poly_transforms): Do not gcc_assert that
3172 the transform is legal.
3173 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3174 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3175 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3176 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3177 * graphite-poly.h (struct poly_scattering): New.
3178 (struct poly_bb): Add original, transformed, and saved fields.
3179 Remove transformed_scattering, original_scattering, nb_local_variables,
3180 and nb_scattering_transform fields.
3181 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3182 (poly_scattering_new): New.
3183 (poly_scattering_free): New.
3184 (poly_scattering_copy): New.
3185 (store_scattering_pbb): New.
3186 (store_scattering): New.
3187 (restore_scattering_pbb): New.
3188 (restore_scattering): New.
3189 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3190 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
9daa8810 3191
95b2e0d3 31922009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3193
3194 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3195 (print_scop): Same.
3196
675d86b2 31972009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3198
3199 * Makefile.in (graphite.o): Depends on PREDICT_H.
3200 * graphite.c: Include predict.h.
3201 (graphite_finalize): Call tree_estimate_probability.
3202 * predict.c (predict_loops): Do not call scev_initialize and
3203 scev_finalize.
3204 (tree_estimate_probability_bb): New.
3205 (tree_estimate_probability): Do not initialize loops: move that
3206 code to the driver. Call tree_estimate_probability_bb.
3207 (tree_estimate_probability_driver): New.
3208 (pass_profile): Use tree_estimate_probability_driver.
3209 * predict.h (tree_estimate_probability): Declared.
3210
525c22c4 32112009-08-05 Sebastian Pop <sebastian.pop@amd.com>
3212
3213 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3214 * graphite-dependences.c (graphite_legal_transform): Add time to
3215 TV_GRAPHITE_DATA_DEPS.
3216 (dependency_between_pbbs_p): Same.
3217 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3218
32192009-08-03 Sebastian Pop <sebastian.pop@amd.com>
3220
3221 * Merge from mainline (r149952:150372).
3222
c6bb733d 32232009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3224
3225 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3226 * graphite-blocking.c: Same.
3227 * graphite-clast-to-gimple.c: Same.
3228 * graphite-dependences.c: Same.
3229 * graphite-poly.c: Same.
3230 * graphite-poly.h: Same.
3231 * graphite-ppl.c: Same.
3232 * graphite-scop-detection.c: Same.
3233 * graphite-sese-to-poly.c: Same.
3234 * graphite.c: Same.
3235
32362009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3237
3238 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3239 (remove_simple_copy_phi): New.
3240 (remove_invariant_phi): New.
3241 (simple_copy_phi_p): New.
3242 (reduction_phi_p): New.
3243 (gsi_for_ssa_name_def): New.
3244 (insert_out_of_ssa_copy): New.
3245 (insert_out_of_ssa_copy_on_edge): New.
3246 (create_zero_dim_array): New.
3247 (scalar_close_phi_node_p): New.
3248 (rewrite_close_phi_out_of_ssa): New.
3249 (rewrite_phi_out_of_ssa): New.
3250 (rewrite_reductions_out_of_ssa): New.
3251 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3252
6c9df8cb 3253 * gcc.dg/graphite/id-11.c: New.
3254 * gcc.dg/graphite/id-15.c: New.
3255 * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3256 * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3257 * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3258 * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3259 * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3260 * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3261 * gfortran.dg/graphite/id-13.f: New.
3262 * gfortran.dg/graphite/id-5.f: New.
c6bb733d 3263
32642009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3265
3266 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3267 check that nb_reductions_in_loop is zero.
3268 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3269 reduction phi nodes.
3270 (nb_reductions_in_loop): Removed.
3271 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3272 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3273 (bb_contains_non_iv_scalar_phi_nodes): Removed.
3274 (scop_contains_non_iv_scalar_phi_nodes): Removed.
3275 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3276
32772009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3278
3279 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3280 statements that have an empty iteration domain.
6c9df8cb 3281 * gfortran.dg/graphite/id-16.f: New.
c6bb733d 3282
32832009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3284
3285 * tree-scalar-evolution.c (instantiate_scev_1): Return
3286 chrec_dont_know when the result is not above instantiate_below.
3287 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3288 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3289 the tree has a known scalar evolution.
6c9df8cb 3290 * gfortran.dg/graphite/id-14.f: New.
3291 * gfortran.dg/graphite/id-15.f: New.
c6bb733d 3292
32932009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3294
3295 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3296 insert_gsi.
3297 (rename_variables): Keep inserting renames after the ones already
3298 inserted.
3299
33002009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3301
3302 * graphite-sese-to-poly.c (compare_bb_depths): New.
3303 (graphite_sort_dominated_info): New.
3304 (build_scop_bbs_1): Call graphite_sort_dominated_info.
3305 (build_scop_scattering): Fix comment.
3306
33072009-07-28 Sebastian Pop <sebastian.pop@amd.com>
3308
3309 * graphite.c (graphite_finalize): Call print_loops instead of
3310 dump_function_to_file.
6c9df8cb 3311 * gcc.dg/graphite/graphite.exp: Fix formatting.
3312 * gcc.dg/graphite/pr35356-1.c: New. Look for the number of
c6bb733d 3313 loops generated in the graphite output file.
6c9df8cb 3314 * gcc.dg/graphite/pr35356-2.c: New.
3315 * gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
3316 * gfortran.dg/graphite/id-12.f: New.
c6bb733d 3317
33182009-07-24 Li Feng <nemokingdom@gmail.com>
3319
6c9df8cb 3320 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
c6bb733d 3321 Remove 2 XFAIL.
3322
33232009-07-24 Li Feng <nemokingdom@gmail.com>
3324 Tobias Grosser <grosser@fim.uni-passau.de>
3325
3326 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3327 alias set number build alias in ACCESSES polyhedron.
3328 (build_alias_set_for_drs): New.
3329 (build_pbb_drs): Added build_alias_set_for_drs.
3330 * graphite-dependences.c (poly_drs_may_alias_p): New.
3331 (graphite_carried_dependence_level_k): Check alias information
3332 before building polyhedron.
3333
33342009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3335
3336 * Makefile.in (lambda-code.o): Fix formatting.
3337
33382009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
3339
3340 * Merge from mainline (r149350-149952)
3341
33422009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3343
3344 * graphite-poly.c (apply_poly_transforms): Move strip_mine
3345 before interchange to prepare for loop blocking.
3346
33472009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
3348
3349 * graphite-poly.c (apply_poly_transforms): Add checks after every
3350 transformation.
3351 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3352 done in apply_poly_transforms.
3353
33542009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3355
3356 * graphite-dependences.c (build_lexicographically_gt_constraint):
3357 Replace RES parameter with *RES.
3358 (dependence_polyhedron_1): Pass an address of the parameter RES
3359 instead of value of RES.
3360
33612009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3362
3363 * graphite.c (graphite_finalize): Fix comment.
3364 (graphite_transform_loops): Reset scev info after code generation
3365 of each scop.
3366
33672009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3368
3369 * graphite.c (graphite_finalize): Call scev_reset.
3370
33712009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3372
3373 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3374 GBB_CLOOG_IV_TYPES hash table twice.
3375 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3376 (add_condition_to_domain): Clear GMP values.
3377
33782009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3379
3380 * graphite-dependences.c: Fix formatting.
3381 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3382 (pbb_number_of_iterations): Free ppl_Linear_Expression.
3383 * graphite-sese-to-poly.c: Fix formatting.
3384 * graphite.c (graphite_transform_loops): Create the hash table
3385 after the early return.
3386
33872009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3388
6c9df8cb 3389 * gcc.dg/graphite/id-14.c: New.
3390 * gcc.dg/graphite/pr40157.c: New.
3391 * gfortran.dg/graphite/id-11.f: New.
c6bb733d 3392
33932009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3394
3395 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3396 (build_poly_scop): Return false when there are no pbbs within
3397 loops to avoid to pass to cloog scops with no loops.
3398
33992009-07-16 Sebastian Pop <sebastian.pop@amd.com>
3400
3401 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3402 useless test "i % 2".
3403 (build_pbb_scattering_polyhedrons): Fix formatting.
3404 (build_poly_dr): Same.
3405 * graphite.c (graphite_transform_loops): Restructure.
3406
34072009-07-14 Razya Ladelsky <razya@il.ibm.com>
3408
3409 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3410 reduction_list parameter.
3411 (rewrite_all_phi_nodes_with_iv): Same.
3412 (canonicalize_loop_ivs): Same.
3413 * tree-parloops.c (struct brli): Removed.
3414 (build_reduction_list_info): Removed.
3415 (build_new_reduction): New.
3416 (analyze_reduction_list): Removed.
3417 (gather_scalar_reductions): Find reductions instead of phi
3418 nodes that can't be canonicalized.
3419 (try_create_reduction_list): Remove reduction_list parameter.
3420 (gen_parallel_loop): Same.
3421 (parallelize_loops): Remove analyze_reductions variable,
3422 initialization and free.
3423 Change reduction_list htab initialization to reduction_info
3424 elements instead of ssa names.
3425 Call try_create_reduction_list and gen_parallel_loop without
3426 analyzed_reduction argument.
3427 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3428 canonicalize_loop_ivs with one less argument.
3429 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3430
34312009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3432
3433 * graphite-dependences.c (new_poly_dr_pair): New.
3434 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3435 (new_poly_dr_pair): New.
3436 (eq_poly_dr_pair_p): New.
3437 (hash_poly_dr_pair_p): New.
3438 * graphite-dependences.h (struct poly_dr_pair): New.
3439 (eq_poly_dr_pair_p): Declared.
3440 (hash_poly_dr_pair_p): Declared.
3441 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3442 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3443 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3444 * Makefile.in (graphite-poly.o): Add dependence on
3445 graphite-dependences.h.
3446
34472009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3448
3449 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3450 polynomials of degree > 1 pass to Graphite.
3451 * tree-chrec.c (scev_is_linear_expression): Call
3452 evolution_function_is_affine_multivariate_p.
6c9df8cb 3453 * gfortran.dg/graphite/id-10.f90: New.
c6bb733d 3454
34552009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3456
3457 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3458 Instantiate scevs varying in outer loops.
6c9df8cb 3459 * gfortran.dg/graphite/id-9.f: Correct testcase.
c6bb733d 3460
34612009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3462
3463 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3464 redundant constraint.
3465
34662009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3467
6c9df8cb 3468 * gcc.dg/graphite/graphite.exp: Fix comments.
3469 * gfortran.dg/graphite/graphite.exp: Trigger actions
c6bb733d 3470 based on the file names as in the C testsuite.
6c9df8cb 3471 * gfortran.dg/graphite/block-1.f90: Fix patterns.
3472 * gfortran.dg/graphite/block-2.f: Same.
3473 * gfortran.dg/graphite/block-3.f90: Same.
3474 * gfortran.dg/graphite/block-4.f90: Same.
3475 * gfortran.dg/graphite/id-1.f90: Same.
3476 * gfortran.dg/graphite/id-2.f90: Same.
3477 * gfortran.dg/graphite/id-3.f90: Same.
3478 * gfortran.dg/graphite/id-4.f90: Same.
3479 * gfortran.dg/graphite/id-6.f: Same.
3480 * gfortran.dg/graphite/id-9.f: Same.
3481 * gfortran.dg/graphite/interchange-1.f: Same.
3482 * gfortran.dg/graphite/interchange-2.f: Same.
3483 * gfortran.dg/graphite/scop-1.f: Same.
c6bb733d 3484
34852009-07-14 Sebastian Pop <sebastian.pop@amd.com>
3486
3487 * sese.c (expand_scalar_variables_call): New.
3488 (expand_scalar_variables_ssa_name): Handle calls in expander.
3489
34902009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3491
6c9df8cb 3492 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
c6bb733d 3493 Expect to see the pattern twice.
6c9df8cb 3494 * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3495 * gcc.dg/graphite/interchange-5.c: Same.
3496 * gcc.dg/graphite/interchange-6.c: Same.
c6bb733d 3497
34982009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3499
6c9df8cb 3500 * gcc.dg/graphite/id-10.c: New.
3501 * gcc.dg/graphite/id-12.c: New.
3502 * gfortran.dg/graphite/id-7.f: New.
3503 * gfortran.dg/graphite/id-8.f: New.
c6bb733d 3504
35052009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3506
3507 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3508 zero.
3509
35102009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3511
3512 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3513
35142009-07-13 Sebastian Pop <sebastian.pop@amd.com>
3515
3516 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3517
35182009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3519
3520 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3521 building PDR subscripts.
3522
35232009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3524
3525 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3526 computation of array sizes.
3527
35282009-07-10 Sebastian Pop <sebastian.pop@amd.com>
3529
3530 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3531
35322009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
3533
3534 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3535 build_pairwise_constraint, dr_equality_constraints,
3536 build_pairwise_scheduling_equality,
3537 build_pairwise_scheduling_inequality, lexicographically_gt_p,
3538 build_lexicographically_gt_constraint, dependence_polyhedron,
3539 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3540 Move from NNC_Polyhedron to C_Polyhedron.
3541 * graphite-interchange.c (compute_array_size_poly,
3542 gather_access_strides): Dito.
3543 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3544 free_scop, pbb_number_of_iterations): Dito.
3545 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3546 pbb_dim_iter_domain, struct scop): Dito.
3547 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3548 new_Cloog_Domain_from_ppl_Polyhedron,
3549 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3550 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3551 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3552 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3553 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3554 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3555 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3556 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3557 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3558 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3559 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3560 build_scop_iteration_domain, build_poly_dr): Dito
3561
35622009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3563
6c9df8cb 3564 * gcc.dg/graphite/graphite.exp: Added a rule to execute
c6bb733d 3565 run-id-*.c files.
6c9df8cb 3566 * gcc.dg/graphite/run-id-1.c: New.
c6bb733d 3567
35682009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3569
3570 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3571 positivity constraint on the symbolic number of iterations.
3572
35732009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3574
3575 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3576
35772009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3578 Tobias Grosser <grosser@fim.uni-passau.de>
3579
3580 * graphite-clast-to-gimple.c (build_scop_context): Removed.
3581 (build_cloog_prog): Directly use SCOP_CONTEXT.
3582 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3583 (free_scop): Free SCOP_CONTEXT.
3584 (print_scop_context): New.
3585 (print_scop): Call print_scop_context.
3586 (debug_scop_context): New.
3587 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3588 (struct scop): Added field context.
3589 (SCOP_CONTEXT): New.
3590 * graphite-sese-to-poly.c (add_param_constraints): New.
3591 (build_scop_context): New.
3592 (build_poly_scop): Call build_scop_context.
3593
35942009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3595
3596 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3597 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3598 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3599 * graphite-ppl.h: Include double-int.h and tree.h.
3600 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3601 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3602 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
3603 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3604
36052009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3606
3607 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3608 POINTER_PLUS_EXPR for pointer types.
3609 (clast_to_gcc_expression): Same.
3610
36112009-07-09 Sebastian Pop <sebastian.pop@amd.com>
3612
3613 * graphite-poly.c (print_scattering_function): Early return when
3614 PBB_TRANSFORMED_SCATTERING is not initialized.
3615 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3616
36172009-07-08 Sebastian Pop <sebastian.pop@amd.com>
3618
3619 * tree-parloops.c (analyze_reduction_list): Remove unused variable
3620 to fix bootstrap.
3621
36222009-07-08 Razya Ladelsky <razya@il.ibm.com>
3623
3624 * tree-parloops.c (analyze_reduction_list): Change return
3625 value to void.
3626 (try_create_reduction_list): Move the call to
3627 analyze_reduction_list to the beginining.
3628 Call reduction_phi with analyzed_reductions as argument
3629 instead of reduction_list.
3630
36312009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
3632
3633 * Merge from mainline (r148296:149346)
3634
36352009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3636
3637 * graphite-scop-detection.c (graphite_can_represent_init): New.
3638 (graphite_can_represent_scev): Call graphite_can_represent_init:
3639 check that the initial value does not contain multiplications of
3640 parameters.
3641 (stmt_has_simple_data_refs_p): New.
3642 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3643 (is_simple_operand): Fix formatting.
3644 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3645
36462009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3647
6c9df8cb 3648 * gcc.dg/graphite/id-13.c: New.
c6bb733d 3649 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3650 analyze_scalar_evolution, use scalar_evolution_in_region.
3651 (scan_tree_for_params_right_scev): Add extra assert.
3652 (parameter_index_in_region_1): Split from parameter_index_in_region.
3653 (idx_record_params): Use scalar_evolution_in_region.
3654 (find_params_in_bb): Same.
3655 (find_scop_parameters): Same.
3656 (build_loop_iteration_domains): Same.
3657 (create_linear_expr_from_tree): Same.
3658 * sese.c (scalar_evolution_in_region): New.
3659 * sese.h (scalar_evolution_in_region): Declared.
3660 (defined_in_sese_p): New.
3661 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3662 static anymore.
3663 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3664 Declared.
3665
36662009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3667
3668 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3669 TREE_DATA_REF_H also implies SCEV_H.
3670
36712009-07-07 Sebastian Pop <sebastian.pop@amd.com>
3672
3673 * graphite-poly.c (print_scop_params): New.
3674 (print_scop): Call print_scop_params.
3675 (debug_scop_params): New.
3676 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3677
36782009-07-07 Li Feng <nemokingdom@gmail.com>
3679
6c9df8cb 3680 * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3681 * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3682 * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3683 * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3684 * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3685 * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
c6bb733d 3686
36872009-07-07 Li Feng <nemokingdom@gmail.com>
3688
3689 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3690 for dependency checking part.
6c9df8cb 3691 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
c6bb733d 3692 tests for dependency checking.
6c9df8cb 3693 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3694 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3695 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
c6bb733d 3696 flag -fdump-tree-graphite-all for autopar testsuites.
3697
36982009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3699
3700 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3701 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3702 canonicalize_loop_ivs): Moved...
3703 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
3704
37052009-07-06 Sebastian Pop <sebastian.pop@amd.com>
3706
3707 * tree-parloops.c (try_create_reduction_list): Pass an extra
3708 argument analyzed_reductions. Call analyze_reduction_list.
3709 (gen_parallel_loop): Do not call analyze_reduction_list.
3710 (parallelize_loops): Init and finalize analyzed_reductions.
3711
37122009-07-06 Li Feng <nemokingdom@gmail.com>
3713
6c9df8cb 3714 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 3715 Added flag -fno-loop-strip-mine for autopar testcase.
3716
37172009-07-04 Li Feng <nemokingdom@gmail.com>
3718
3719 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3720 transformed scattering dimension instead of unmatch orignal when
3721 calling dependence_polyhedron.
3722
37232009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3724
3725 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3726
37272009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3728
3729 * graphite-poly.c (pbb_number_of_iterations): Check for returned
3730 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3731
37322009-06-30 Sebastian Pop <sebastian.pop@amd.com>
3733
3734 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3735 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3736 * graphite-poly.c (pbb_number_of_iterations): New.
3737 * graphite-poly.h (pbb_number_of_iterations): Declared.
3738 (pbb_iterator_dim, pbb_parameter_dim): New.
3739
37402009-06-29 Sebastian Pop <sebastian.pop@amd.com>
3741
3742 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3743 last commit on type of lower and upper bound of loops.
3744
37452009-06-29 Li Feng <nemokingdom@gmail.com>
3746
3747 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3748 graphite-dependences.h.
3749 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3750 (mark_bb_with_pbb): New.
3751 (get_stmtfor_depth): New.
3752 (find_pbb_via_hash): New.
3753 (dependency_in_loop_p): New.
3754 (mark_loops_parallel): New.
3755 (free_aux_in_new_loops): New.
3756 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
3757 bb with it's relevant pbb. Mark newly created loops. Remove mark
3758 innermost loop parallel without checking.
3759 (gloog): Add parameter BB_PBB_MAPPING.
3760 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3761 (gloog): Change declaration.
3762 (mark_loop_parallel): Make extern.
3763 (free_aux_in_new_loops): Declare.
3764 (bb_pbb_map_hash): New.
3765 (eq_bb_pbb_map): New.
3766 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3767 auto parallelization when flag_graphite_force_parallel is set.
3768 (graphite_finalize): Added free_aux_in_new_loops.
3769 * tree-parloops.c (parallelize_loops): Only generate parallel code for
3770 the innermost loop that marked parallel. Use
3771 flag_graphite_force_parallel instead of loop->can_be_parallel.
3772 (loop_parallel_p): Move inner most checking out of function.
3773
37742009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3775
3776 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3777 type of lower and upper bound of loops signed long int.
3778
37792009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3780
3781 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3782 expression outside the loop.
3783
37842009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3785
3786 * gcc.dg/graphite/interchange-8.c: New.
3787
37882009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3789
3790 * gcc.dg/graphite/interchange-0.c: XFailed.
3791 * gcc.dg/graphite/interchange-5.c: XFailed.
3792 * gcc.dg/graphite/interchange-6.c: XFailed.
3793
37942009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3795
3796 * graphite-interchange.c (compute_array_size_poly): The end of the
3797 recursion should return 1.
3798
37992009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3800
3801 * graphite-interchange.c (compute_array_size_cstr): Allow the
3802 subscript multiplier to be -1.
3803 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3804 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3805 data_container. Initializes PDR_DATA_CONTAINER.
3806 (print_pdr_access_layout): New.
3807 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
3808 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
3809 data_container.
3810 (PDR_DATA_CONTAINER): New.
3811 (new_poly_dr): Update declaration.
3812 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3813 (build_poly_dr): Call pdr_add_data_dimensions.
3814
38152009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3816
3817 * graphite-poly.h (struct poly_dr): Fix comment.
3818 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3819 (pdr_add_memory_accesses): New.
3820 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3821
38222009-06-26 Sebastian Pop <sebastian.pop@amd.com>
3823
3824 * graphite-poly.c (print_pdrs, debug_pdrs): New.
3825 (print_pbb): Add call to print_pdrs.
3826 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3827
38282009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
3829 Li Feng <nemokingdom@gmail.com>
3830
3831 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3832 (dependency_between_pbbs_p): New.
3833 (lexicographically_gt_p): Assure !empty_p before polyhedron
3834 intersection assign.
3835 (build_lexicographically_gt_constraint): Correct lexicographically
3836 judging.
3837 * graphite-dependences.h: New.
3838 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3839
38402009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3841
3842 * graphite-clast-to-gimple.c (print_clast_stmt): New.
3843 (gloog): Print to dump_file the generated clast.
3844 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3845 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3846
38472009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3848
3849 * graphite-poly.c (extend_scattering): Increment
3850 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3851
38522009-06-24 Sebastian Pop <sebastian.pop@amd.com>
3853
3854 * graphite-interchange.c (compute_array_size_poly): Added exit of
3855 recursion condition. Continue iterating even after the first equality.
3856 (compute_array_size): Same.
3857
38582009-06-24 Li Feng <nemokingdom@gmail.com>
3859
6c9df8cb 3860 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
c6bb733d 3861 -fdump-tree-final_cleanup to -fdump-tree-optimized.
6c9df8cb 3862 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3863 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3864 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
c6bb733d 3865
38662009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3867
3868 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3869 only when the use verifies is_gimple_reg.
3870
38712009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3872
3873 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3874 Allocate scaldims after call to unify_scattering_dimensions.
3875
38762009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3877
3878 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
3879
38802009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3881 Albert Cohen <albert.cohen@inria.fr>
3882
3883 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
3884 variables for the strip mining.
3885
38862009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3887 Pranav Garg <pranav.garg2107@gmail.com>
3888
3889 * Makefile.in (OBJS-common): Added graphite-blocking.o.
3890 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
3891 (graphite-blocking.o): New rule.
3892 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
3893 * graphite-blocking.c: New.
3894 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
3895 flag_loop_strip_mine.
3896 (psct_scattering_dim_for_loop_depth): New.
3897 * graphite-poly.h (scop_do_strip_mine): Declared.
3898 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
3899 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
3900 flag_loop_strip_mine.
3901
39022009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3903
3904 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
3905 a GMP value and a PPL coefficient at each iteration of a loop.
3906
39072009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3908
3909 * graphite-dependences.c (dependence_polyhedron): Do not use
3910 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
3911 pbb_nb_scattering_transform.
3912 (graphite_legal_transform_dr): Same.
3913 * graphite-poly.c (extend_scattering): Same.
3914 (unify_scattering_dimensions): Same.
3915 (print_scattering_function): Same.
3916 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
3917 PBB_NB_LOCAL_VARIABLES.
3918 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
3919 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
3920 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
3921 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
3922 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
3923 (pbb_nb_scattering_transform): New.
3924 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
3925 (psco_scattering_dim): Add assert on parameters.
3926 (psct_scattering_dim): Same.
3927 (psct_scattering_dim_for_loop_depth): Declared.
3928 (psct_local_var_dim): New.
3929 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
3930 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
3931 correct layout, call pbb_nb_local_vars.
3932 (psct_add_local_variable, psct_add_scattering_dimension): New.
3933 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3934 Initialize PBB_NB_SCATTERING_TRANSFORM.
3935
39362009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3937
3938 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
3939 (set_coef): Renamed ppl_set_coef.
3940 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
3941
39422009-06-23 Sebastian Pop <sebastian.pop@amd.com>
3943
3944 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
3945 test a boolean against 1.
3946 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
3947 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
3948 (pbb_do_interchange): Returns true when a transform has been performed.
3949 (scop_do_interchange): Same.
3950 * graphite-poly.c (apply_poly_transforms): Use the return value of
3951 scop_do_interchange.
3952 * graphite-poly.h (scop_do_interchange): Update declaration.
3953
39542009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
3955
3956 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
3957 after last use.
3958 * sese.c (sese_reset_aux_in_loops): New.
3959 * sese.h (sese_reset_aux_in_loops): New.
3960
39612009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3962
3963 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
3964 multiplier and multiply the constant by the multiplier.
3965 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
3966 (build_poly_dr): Do not use the multiplier to define the subscript.
3967
39682009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3969
3970 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
3971 compiler's data reference. Initialize PDR_CDR.
3972 (print_pdr): Call dump_data_reference.
3973 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
3974 Add compiler_dr field.
3975 (PDR_BB): Renamed PDR_PBB.
3976 (PDR_CDR): New.
3977 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
3978 GCC's data reference representation.
3979 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
3980 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
3981
39822009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3983
3984 * graphite-poly.c (print_scattering_function): Also print the layout.
3985 * graphite-poly.h (pbb_nb_local_vars): New.
3986
39872009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3988
3989 * graphite-poly.c (print_pbb_domain): Also print the layout names.
3990
39912009-06-19 Sebastian Pop <sebastian.pop@amd.com>
3992
3993 * graphite-poly.c (print_pdr, debug_pdr): New.
3994 * graphite-poly.h (print_pdr, debug_pdr): Declared.
3995 (PDR_BASE): Removed.
3996
39972009-06-18 Sebastian Pop <sebastian.pop@amd.com>
3998
6c9df8cb 3999 * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
c6bb733d 4000 ltrans-{1..6,8}.c.
4001
40022009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4003
4004 * graphite-interchange.c (compute_subscript): Allow also -1 in the
4005 subscript identification column.
4006 (pbb_do_interchange): Print to dump_file that some loops "will be
4007 interchanged". Rely on that chain of characters in the testcases.
4008 * gcc.dg/graphite/interchange-0.c: New.
4009 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4010 interchange-*.c files and compile them with -floop-interchange.
4011
40122009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
4013
4014 * graphite-interchange.c (interchange_profitable_p): Renamed
4015 pbb_interchange_profitable_p.
4016
40172009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4018 Harsha Jagasia <harsha.jagasia@amd.com>
4019 Pranav Garg <pranav.garg2107@gmail.com>
4020
4021 * graphite-interchange.c (interchange_profitable_p): Make static.
4022 (pbb_interchange_loop_depths, pbb_do_interchange,
4023 scop_do_interchange): New.
4024 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4025 for flag_loop_interchange.
4026 * graphite-poly.h (scop_do_interchange): Declared.
4027 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4028 flag_loop_interchange is used.
4029
40302009-06-18 Sebastian Pop <sebastian.pop@amd.com>
4031
4032 * graphite-dependences.c (dependence_polyhedron): Update use of
4033 pbb_nb_scattering_dims.
4034 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4035 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4036 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4037 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4038
40392009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4040
4041 * graphite.c: Cleanup foo.
4042
40432009-06-16 Sebastian Pop <sebastian.pop@amd.com>
4044
4045 * Merge from mainline (r143684:148293).
4046 * Disabled libpcp until it gets fixed.
4047
40482009-06-05 Sebastian Pop <sebastian.pop@amd.com>
4049 Harsha Jagasia <harsha.jagasia@amd.com>
4050
4051 * graphite-interchange.c: New.
4052 * Makefile.in (graphite-interchange.o): New.
4053 * graphite-poly.h (interchange_profitable_p): Declared.
4054 * graphite-ppl.h (value_max): New.
4055
40562009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4057
4058 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4059 * graphite-poly.h: Fix some comments.
4060 (pdr_dim): New.
4061 (pdr_scop): New.
4062
40632009-06-04 Sebastian Pop <sebastian.pop@amd.com>
4064
4065 * graphite-poly.h
4066 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4067 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4068 (pdr_accessp_nb_params): Renamed pdr_nb_params.
4069 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4070 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4071 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4072 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4073 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4074 * graphite-clast-to-gimple.c: Same.
4075 * graphite-dependences.c: Same.
4076 * graphite-poly.c: Same.
4077 * graphite-sese-to-poly.c: Same.
4078
40792009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4080
4081 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4082 expressions for an IV rename, as returned by clast_to_gcc_expression.
4083 (copy_renames): Rename new_name to expr.
4084 * sese.c (debug_rename_elt): Same.
4085 (get_rename): Same.
4086 (set_rename): Same.
4087 (sese_adjust_liveout_phis): Call force_gimple_operand before using
4088 the information from the rename map.
4089 (rename_variables_in_stmt): Same.
4090 (add_loop_exit_phis): Rename new_name to expr.
4091 (insert_loop_close_phis): Same.
4092 (add_guard_exit_phis): Same. Call force_gimple_operand.
4093 * sese.h (struct rename_map_elt): Rename new_name to expr.
4094 (new_rename_map_elt): Same.
4095
40962009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4097
4098 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4099 * sese.c (set_rename): Make it extern.
4100 * sese.h (set_rename): Declared.
4101
41022009-06-03 Sebastian Pop <sebastian.pop@amd.com>
4103
4104 * graphite-poly.c (extend_scattering): Free values.
4105 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4106 Free iterators.
4107 (ppl_print_powerset_matrix): Same.
4108 * graphite-scop-detection.c (free_scops_1): New.
4109 (limit_scops): Call free_scops_1.
4110 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4111 (build_poly_dr): Free PPL coefficients.
4112 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4113
41142009-06-02 Sebastian Pop <sebastian.pop@amd.com>
4115
4116 * graphite-dependences.c: New.
4117 * graphite-data-ref.c: Removed.
4118 * graphite-data-ref.h: Removed.
4119 * Makefile.in (graphite-data-ref.o): Removed.
4120 (graphite-dependences.o): Added.
4121 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4122 * graphite-poly.c: Same.
4123 Move the data dependence testing to graphite-dependences.c.
4124
41252009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
4126
4127 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4128 from graphite_cannot_represent_loop. Code refactored.
4129 (scopdet_basic_block_info): Call graphite_can_represent_loop.
4130
41312009-05-17 Li Feng <nemokingdom@gmail.com>
4132
6c9df8cb 4133 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
c6bb733d 4134 Cover all the testcases (not only the filtered ones).
4135
41362009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
4137
4138 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4139 unnecessary check. Update comments. Move check for REAL_TYPE here.
4140 (harmful_stmt_in_bb): Remove checks for conditions. This is already
4141 done in (stmt_simple_for_scop_p).
4142
41432009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
4144
4145 * graphite.c (print_global_statistics): New.
4146 (print_graphite_scop_statistic): New.
4147 (print_graphite_statistics): New.
4148 (graphite_initialize, graphite_transform_loops): Print statistics.
4149 * graphite-scop-detection (build_scops): Print statistics.
4150 (print_graphite_scop_statistics): New.
4151 (print_graphite_statistics): New.
4152
41532009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4154
4155 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4156 (debug_clast_name_index): Removed.
4157 (debug_clast_name_indexes_1): Removed.
4158 (debug_clast_name_indexes): Removed.
4159 (clast_name_index_elt_info): Removed.
4160 (eq_clast_name_indexes): Removed.
4161 (clast_name_to_index): Removed.
4162 (new_clast_name_index): Removed.
4163 (save_clast_name_index): Removed.
4164 (save_var_name): Moved...
4165 (init_sese_params_index): Removed.
4166 (clast_name_to_gcc): Remove use of name_tree.
4167 (initialize_cloog_names): Same.
4168 (gloog): Do not call init_sese_params_index.
4169 * graphite-sese-to-poly.c (save_var_name): ...here.
4170 (parameter_index_in_region): New.
4171 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4172 (parameter_index_in_region): Removed.
4173 (is_parameter): Remove use of name_tree.
4174 * sese.h (struct name_tree): Removed.
4175 (struct sese): Remove use of name_tree. New field params_names.
4176 (SESE_PARAMS_NAMES): New.
4177 (SESE_PARAMS): Remove duplicate.
4178 (parameter_index_in_region): Removed.
4179 (sese_nb_params): Remove use of name_tree.
4180 (struct clast_name_index): New.
4181 (new_clast_name_index): New.
4182 (clast_name_to_index): New.
4183 (save_clast_name_index): New.
4184 (debug_clast_name_index): New.
4185 (debug_clast_name_indexes_1): New.
4186 (debug_clast_name_indexes): New.
4187 (clast_name_index_elt_info): New.
4188 (eq_clast_name_indexes): New.
4189
41902009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4191
4192 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4193 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
4194 (graphite_loop_normal_form): Do not pass region. Do not
4195 initialize SESE_OLDIVS.
4196 (build_graphite_loop_normal_form): Update call to
4197 graphite_loop_normal_form.
4198 * sese.c (debug_oldivs): Removed.
4199 (new_sese): Do not initialize SESE_OLDIVS.
4200 (free_sese): Do not free SESE_OLDIVS.
4201 (oldiv_for_loop): Removed.
4202 * sese.h (struct sese): Remove old_ivs.
4203 (SESE_OLDIVS): Removed.
4204 (oldiv_for_loop): Removed.
4205
42062009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4207
4208 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4209 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
4210 replaced by a call to newivs_to_depth_to_newiv.
4211 (clast_to_gcc_expression): Pass newivs, remove ivstack.
4212 (clast_to_gcc_expression_red): Same.
4213 (gcc_type_for_clast_expr): Same.
4214 (gcc_type_for_clast_eq): Same.
4215 (graphite_translate_clast_equation): Same.
4216 (graphite_create_guard_cond_expr): Same.
4217 (graphite_create_new_guard): Same.
4218 (graphite_create_new_loop): Same.
4219 (build_iv_mapping): Same.
4220 (translate_clast): Same.
4221 (gloog): Same.
4222 (loop_iv_stack_patch_for_consts): Removed. *
4223 sese.c (iv_stack_entry_is_constant): Removed.
4224 (iv_stack_entry_is_iv): Removed.
4225 (loop_iv_stack_push_iv): Removed.
4226 (loop_iv_stack_insert_constant): Removed.
4227 (loop_iv_stack_pop): Removed.
4228 (loop_iv_stack_get_iv): Removed.
4229 (loop_iv_stack_get_iv_from_name): Removed.
4230 (debug_loop_iv_stack): Removed.
4231 (free_loop_iv_stack): Removed.
4232 (loop_iv_stack_remove_constants): Removed. *
4233 sese.h (iv_stack_entry_kind): Removed.
4234 (iv_stack_entry_data_union): Removed.
4235 (iv_stack_entry_struct): Removed.
4236 (iv_stack_entry_p): Removed.
4237 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4238 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4239 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4240 loop_iv_stack_pop, free_loop_iv_stack): Removed.
4241 (gbb_loop_at_index): Fix indenting.
4242 (gbb_loop_index): Removed.
4243
42442009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4245
4246 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4247 Call clast_name_to_index.
4248
42492009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4250
4251 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4252 do not pass params. Get params from SESE_PARAMS.
4253 (clast_to_gcc_expression): Same.
4254 (clast_to_gcc_expression_red): Same.
4255 (gcc_type_for_clast_eq): Same.
4256 (graphite_translate_clast_equation): Same.
4257 (graphite_create_new_loop): Same.
4258 * sese.c (rename_variables_in_stmt): Fix comment.
4259
42602009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4261
4262 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4263 newivs_index.
4264 Call save_clast_name_index.
4265 (translate_clast): Pass newivs_index.
4266 (gloog): Create and free newivs_index.
4267
42682009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4269
4270 * graphite-clast-to-gimple.c (clast_name_index): New structure.
4271 (clast_name_index_p): New type.
4272 (debug_clast_name_index): New.
4273 (debug_clast_name_indexes_1): New.
4274 (debug_clast_name_indexes): New.
4275 (clast_name_index_elt_info): New.
4276 (eq_clast_name_indexes): New.
4277 (clast_name_to_index): New.
4278 (new_clast_name_index): New.
4279 (save_clast_name_index): New.
4280 (init_sese_params_index): New.
4281 (gloog): Call init_sese_params_index.
4282 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4283 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4284 (free_sese): Free SESE_PARAMS_INDEX.
4285 * sese.h (struct sese): Add params_index.
4286 (SESE_PARAMS_INDEX): New.
4287
42882009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4289
4290 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4291 (graphite_create_new_loop): Pass the newivs vector. Push the
4292 newly created IV to newivs.
4293 (translate_clast): Pass the newivs vector.
4294 (gloog): Create and destroy the newivs vector.
4295
42962009-05-13 Sebastian Pop <sebastian.pop@amd.com>
4297
4298 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4299 (graphite_loop_normal_form): Initialize loop->aux with the unique
4300 IV that has been created.
4301
43022009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
4303
4304 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4305 scev with parameters in the base part. They where forbidden
4306 exidently.
4307
43082009-05-11 Li Feng <nemokingdom@gmail.com>
4309
6c9df8cb 4310 * gcc.dg/graphite/graphite.exp: Set different default
c6bb733d 4311 compile options by file names.
6c9df8cb 4312 * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4313 * gcc.dg/graphite/id-{1-9}.c: Ditto.
4314 * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4315 * gcc.dg/graphite/scop-matmult.c: Ditto.
c6bb733d 4316
43172009-05-08 Li Feng <nemokingdom@gmail.com>
4318
6c9df8cb 4319 * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4320 * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4321 * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4322 * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
c6bb733d 4323
43242009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4325
4326 * graphite-scop-detection (build_scops_1): Fix little bug introduced
4327 by final cleanup.
4328
43292009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
4330
4331 * graphite-scop-detection.c (graphite_can_represent_scev): Only
4332 allow integer constant strides.
4333 (graphite_can_represent_expr): Depend on outermost_loop.
4334 (stmt_simple_memref_p, graphite_cannot_represent_loop,
4335 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4336 build_scops_1): Same.
4337 (scopdet_basic_block_info): Same and insert layered SCoP
4338 detection.
4339 (try_generate_gimple_bb): Cleanup.
4340 (build_scops): Enable data references.
4341
6c9df8cb 4342 * gcc.dg/graphite/id-5.c: New.
4343 * gcc.dg/graphite/id-9.c: New.
c6bb733d 4344 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4345 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4346
43472009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4348
4349 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4350 that we have not yet built for this SCoP.
4351
43522009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4353
4354 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4355 for complex numbers.
4356
43572009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4358
4359 * graphite-ppl.c: Fix build if cloog is not available.
4360
43612009-05-04 Li Feng <nemokingdom@gmail.com>
4362
4363 * tree-parloops.c (loop_parallel_p): Remove construction of
4364 NITER and REDUCTION_LIST.
4365 (try_get_loop_niter): New.
4366 (try_create_reduction_list): New.
4367 (parallelize_loops): Bypass the failed checkings in autopar
4368 when can_be_parallel in loop structure is set to true.
4369
43702009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4371
6c9df8cb 4372 * gcc.dg/graphite/id-6.c: Update testcase.
4373 * gcc.dg/graphite/scop-3.c: Dito.
c6bb733d 4374
43752009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
4376
4377 * graphite-scop-detection.c (stmt_simple_for_scop_p):
4378 Enable EQ_EXPR and NE_EXPR again.
4379
43802009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4381
4382 * graphite-scop-detection.c (graphite_can_represent_scev):
4383 Add check if scev is affine multivariate.
4384 (harmful_stmt_in_bb): Check if we can represent the conditions.
4385 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4386 harmful_stmt_in_bb.
6c9df8cb 4387 * gcc.dg/graphite/id-7.c: New.
c6bb733d 4388
43892009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
4390
4391 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4392 Check all bbs in region, not only the bbs that are represented in
4393 GRAPHITE.
4394 (build_poly_scop): Add newline.
6c9df8cb 4395 * gcc.dg/graphite/id-8.c: New.
c6bb733d 4396
43972009-04-30 Li Feng <nemokingdom@gmail.com>
4398
4399 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4400 when loop initialize.
4401 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4402 * common.opt: Declare flag_graphite_force_parallel.
4403 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4404 loop parallel.
4405 * graphite-poly.c (apply_poly_transforms): Introduce
4406 flag_graphite_force_parallel.
4407 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4408 * toplev.c (process_options): ditto and replace a not correctly
4409 encoded space.
4410
44112009-04-30 Li Feng <nemokingdom@gmail.com>
4412
4413 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4414 Change the call of gbb_loop_at_index and/or gbb_loop_index due
4415 to the redefinition.
4416 (compute_cloog_iv_types_1): ditto.
4417 (build_iv_mapping): ditto.
4418 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4419 initialization.
4420 (free_gimple_bb): Removed GBB_LOOPS related free part.
4421 (build_bb_loops): Removed.
4422 * sese.h (struct gimple_bb): Removed loops.
4423 (GBB_LOOPS): Removed.
4424 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4425 (gbb_loop_index): ditto.
4426
44272009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4428
4429 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4430 allow non constant strides.
6c9df8cb 4431 * gcc.dg/graphite/scop-20.c: New.
c6bb733d 4432
44332009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4434
4435 * graphite-scop-detection.c (dot_all_scops): Fix system call
4436 return value warning.
4437 (dot_scop): Same.
4438
44392009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4440
6c9df8cb 4441 * gcc.dg/graphite/id-6.c: Fix pattern.
4442 * gcc.dg/graphite/scop-3.c: Same.
c6bb733d 4443
44442009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4445
4446 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4447 build_pairwise_constraint, dr_equality_constraints,
4448 build_pairwise_scheduling_equality,
4449 build_pairwise_scheduling_inequality, lexicographically_gt_p,
4450 build_lexicographically_gt_constraint, dependence_polyhedron,
4451 graphite_legal_transform_dr, graphite_legal_transform_bb,
4452 graphite_legal_transform): New.
4453 * graphite-poly.h (graphite_legal_transform): Declared.
4454 * graphite-sese-to-poly.c (build_poly_scop): Call to
4455 graphite_legal_transform is disabled for the moment.
4456
44572009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4458
4459 * graphite-poly.h (pbb_nb_scattering_dims): New.
4460 (pbb_nb_scattering): Use it.
4461
44622009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4463
4464 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4465 Pointset_Powerset version of ppl_insert_dimensions.
4466 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4467
44682009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4469
4470 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4471
44722009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4473
4474 * graphite-poly.h: Fix comment.
4475
44762009-04-24 Sebastian Pop <sebastian.pop@amd.com>
4477
4478 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4479
44802009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4481
4482 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4483 statements.
4484
44852009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
4486
4487 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4488 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4489 conditions.
4490
44912009-04-20 Sebastian Pop <sebastian.pop@amd.com>
4492
4493 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4494 handle EQ_EXPR and NE_EXPR.
4495
44962009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
4497
4498 * graphite-poly.h (poly_dr): Fix comment.
4499
45002009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4501 Tobias Grosser <grosser@fim.uni-passau.de>
4502
4503 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4504 with a zero dimension polyhedron.
4505 (find_scop_parameters): Move the call to scop_set_nb_params here.
4506 (build_loop_iteration_domains): Store in loop->aux the iteration
4507 domain polyhedron.
4508 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4509 by any loop in scop.
4510 (build_poly_scop): Do not call scop_set_nb_params.
4511
45122009-04-09 Sebastian Pop <sebastian.pop@amd.com>
4513 Tobias Grosser <grosser@fim.uni-passau.de>
4514
4515 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4516 add_condition_to_domain not GT_EXPR.
4517
45182009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4519
4520 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4521 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4522 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4523 upper_bound_assign to calculate unions.
6c9df8cb 4524 * gcc.dg/graphite/id-6.c: New.
c6bb733d 4525
45262009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4527
4528 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4529 handle abnormal edges.
4530
45312009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
4532
4533 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4534 (free_poly_bb): Also free poly_drs.
4535 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4536 (poly_dr): Polyhedron to Pointset_Powerset.
4537 (pdr_accessp_nb_subscripts): Same.
4538 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4539 poly_drs.
4540
45412009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4542
4543 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4544 names into more meaningful names.
4545
45462009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4547
6c9df8cb 4548 * gfortran.dg/graphite/interchange-1.c: New.
4549 * gfortran.dg/graphite/interchange-2.c: New.
c6bb733d 4550
45512009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4552
4553 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4554 the reduction_list.
4555 * tree-parloops.c (rewrite_phi_with_iv): New.
4556 (rewrite_all_phi_nodes_with_iv): New.
4557 (canonicalize_loop_ivs): Call them.
4558
45592009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4560
4561 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4562 graphite_find_data_references_in_stmt.
4563 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4564 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4565
45662009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4567
4568 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4569
45702009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4571
4572 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4573 instead of bb_in_region.
4574 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
4575 (build_sese_conditions): Use flag_bb_in_sese.
4576 * sese.c (register_bb_in_sese): Removed.
4577 (new_sese): Remove initialization of SESE_REGION_BBS.
4578 (free_sese): Do not free SESE_REGION_BBS.
4579 * sese.h (struct sese): Remove field region_basic_blocks.
4580 (SESE_REGION_BBS): Removed.
4581 (bb_in_sese_p): Implement in function of bb_in_region.
4582
45832009-04-08 Sebastian Pop <sebastian.pop@amd.com>
4584
4585 * graphite-scop-detection.c (limit_scops): Deal only with single exit
4586 loops.
4587
45882009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4589
4590 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4591 and EQ_EXPR.
4592 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4593 (add_condition_to_domain): New.
4594 (add_condition_to_pbb): New.
4595 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
6c9df8cb 4596 * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
c6bb733d 4597
45982009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
4599
4600 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4601 ppl_Pointset_Powerset.
4602 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4603 * graphite-poly.h (poly_bb): poly_bb.domain Same.
4604 (pbb_nb_loops): Same.
4605 * graphite-sese-to-poly.c (build_loop_iteration_domains,
4606 add_conditions_to_domain): Same.
4607 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4608 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4609 ppl_const_Polyhedron_t.
4610 (ppl_print_powerset_matrix): New.
4611 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4612 ppl_print_powerset_matrix): New.
4613 (ppl_print_polyhedron_matrix): Updated.
4614
46152009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4616
4617 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4618
46192009-04-07 Sebastian Pop <sebastian.pop@amd.com>
4620
4621 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
4622 (print_iteration_domains, debug_iteration_domain,
4623 debug_iteration_domains): New.
4624 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4625 debug_iteration_domains): Declared.
4626 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4627 indenting.
4628
46292009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
4630 Sebastian Pop <sebastian.pop@amd.com>
4631
4632 * graphite-poly.h (print_iteration_domain): New.
4633 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4634 (build_sese_conditions_1, build_sese_conditions_after,
4635 build_sese_conditions_before): New.
4636 (build_sese_conditions): Rewritten.
4637
46382009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4639 Tobias Grosser <grosser@fim.uni-passau.de>
4640
4641 Cleanup of code generation liveouts.
4642 * graphite-clast-to-gimple.c (translate_clast): Use a single
4643 rename_map instead of one per translated statement.
4644 Do not use SESE_LIVEOUT_RENAMES.
4645 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4646 (gloog): Do not use SESE_LIVEOUT_RENAMES.
4647 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4648 phi node of a reduction: when a loop contains a reduction used outside
4649 the loop, there should be a scalar close phi node on the exit block.
4650 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4651 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4652 (free_sese): Do not free them.
4653 (sese_build_liveouts_use): Do not use them.
4654 (sese_build_liveouts_bb): Same.
4655 (sese_build_liveouts): Same.
4656 (sese_insert_phis_for_liveouts): Same.
4657 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
4658 (defined_in_loop_p): New.
4659 (alive_after_loop): New.
4660 (close_phi_not_yet_inserted_p): New.
4661 (struct alep, alep_p): New.
4662 (add_loop_exit_phis): Remove from the rename_map all the names defined
4663 in the code generated loop.
4664 (insert_loop_close_phis): Traverse the rename_map passed to it.
4665 Don't use SESE_LIVEOUT_RENAMES.
4666 (default_liveout_before_guard): Renamed default_before_guard.
4667 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4668 (graphite_copy_stmts_from_block): Do not directly call set_rename.
4669 (register_sese_liveout_renames): Removed.
4670 (copy_bb_and_scalar_dependences): Do not call it.
4671 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4672 reduction_list.
4673 (SESE_LIVEOUT): Removed.
4674 (SESE_LIVEOUT_RENAMES): Removed.
4675 (SESE_REDUCTION_LIST): Removed.
4676 (sese_build_liveouts): Removed.
4677 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4678 (insert_loop_close_phis): Pass a htab_t instead of a sese.
4679 (insert_guard_phis): Same.
4680 (rename_map_elt): Declare a VEC of them.
4681 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4682 trees not pointers to trees.
4683
4684 Rewrite in canonical close SSA form:
4685 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4686 (limit_scops): Close the scop after the block containing the close phi
4687 nodes.
4688 (canonicalize_loop_closed_ssa): New.
4689 (canonicalize_loop_closed_ssa_form): New.
4690 (build_scops): Call canonicalize_loop_closed_ssa_form.
4691
4692 * graphite-sese-to-poly.c: Fix typos.
4693
46942009-04-03 Sebastian Pop <sebastian.pop@amd.com>
4695
4696 * graphite-poly.c (print_scattering_function, print_pbb_domain):
4697 Extended.
4698 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4699 (print_pbb): Add conditions.
4700
47012009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
4702 Sebastian Pop <sebastian.pop@amd.com>
4703
4704 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4705 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4706 (build_scop_bbs_1): New.
4707 (build_scop_bbs): Rewrite.
4708 * sese.h (bb_in_region): New.
4709
47102009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4711
4712 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4713 poly_drs vector.
4714 (print_scop): Style.
4715 * graphite-poly.h (poly_bb): Add drs vector.
4716 (PBB_DRS): Add accessor.
4717 * graphite-sese-to-poly.c (build_poly_dr): New.
4718 (build_pbb_drs, build_scop_drs): New.
4719 (build_poly_scop): call build_scop_drs (Disabled at the moment).
4720
47212009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4722
4723 * tree-ssa-loop.c: Include forgotten toplev.h
4724
47252009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
4726
4727 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
6c9df8cb 4728 * gcc.dg/graphite/pr37883.c: Remove -floop-*
4729 * gcc.dg/graphite/pr37928.c: Same
4730 * gcc.dg/graphite/pr38409.c: Same
4731 * gcc.dg/graphite/pr38498.c: Same
4732 * gcc.dg/graphite/pr38559.c: Same
4733 * gcc.dg/graphite/pr39335.c: Same
4734 * gcc.dg/graphite/pr39335_1.c: Same
4735 * gfortran.dg/graphite/block-2.f: Same
c6bb733d 4736 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4737 with -floop-*.
4738
47392009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
4740
4741 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4742 build_access_matrix, build_scop_data_accesses): Remove access function
4743 building. (We get a new version soon).
4744 (build_bb_loops, scan_tree_for_params_right_scev): Update.
4745 * sese.h (nb_loops_around_loop_in_sese): Remove.
4746 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4747
47482009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
4749 Sebastian Pop <sebastian.pop@amd.com>
4750
4751 * graphite-scop-detection.c (struct scopdet_info): Rename last
4752 field to exit.
4753 (scopdet_basic_block_info, build_scops_1): Don't use
4754 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
4755
47562009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
4757 Sebastian Pop <sebastian.pop@amd.com>
4758
4759 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4760 * sese.c (sese_build_liveouts_use): Renamed from
4761 sese_build_livein_liveouts_use. Remove liveins.
4762 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4763 Call sese_build_liveouts_use.
4764 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4765 Call sese_build_liveouts_bb.
4766 (new_sese, free_sese): Remove liveins.
4767 (sese_add_exit_phis_var): Deleted.
4768 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4769 directly.
4770 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4771
4772 * sese.h (sese): Remove num_ver and livein.
4773 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4774
47752009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4776
4777 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4778
47792009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
4780
4781 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4782 (build_scop_scattering): Do not use compare_prefix_loops any more.
4783 (nb_common_loops): New.
4784
47852009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4786
4787 * sese.c (get_new_name_from_old_name): Renamed get_rename.
4788 (register_old_and_new_names): Renamed set_rename.
4789
47902009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4791
4792 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4793 of the decl from the previous commit.
4794
47952009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4796
4797 * graphite-scop-detection.c (dot_scop): New.
4798 * graphite-scop-detection.h (dot_scop): Declared.
4799
48002009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4801
4802 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4803
48042009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4805
4806 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4807 condition at the end of the loop.
4808 * graphite.c (graphite_initialize, graphite_finalize): Print to
4809 dump_file the compiled function.
4810 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4811 of create_empty_loop_on_edge.
4812 (translate_clast): Update the code generation of loops for the new
4813 shape of loops.
4814 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4815
48162009-03-24 Sebastian Pop <sebastian.pop@amd.com>
4817
4818 Reverted the patch from 2009-03-19.
4819
48202009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
4821
4822 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4823 poly_drs vector.
4824 (print_scop): Style.
4825 * graphite-poly.h (poly_bb): Add drs vector.
4826 (PBB_DRS): Add accessor.
4827 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4828 (build_access_matrix_with_af, build_access_matrix,
4829 build_scop_data_accesses): Delete.
4830 (build_poly_dr): New.
4831 (build_pbb_drs, build_scop_drs): New.
4832 (build_poly_scop): call build_scop_drs.
4833
48342009-03-13 Sebastian Pop <sebastian.pop@amd.com>
4835
4836 * graphite-scop-detection.c (dot_all_scops_1): Close the table
4837 once per basic block.
4838
48392009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4840
4841 * graphite-scop-detection.c (graphite_can_represent_scev): New.
4842 (graphite_can_represent_expr): Renamed from loop_affine_expr
4843 and enhanced.
4844 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4845 (graphite_cannot_represent_loop): Add scop_entry to parameters.
4846 (scopdet_basic_block_info): Actually define entry_block.
4847 (stmt_simple_memref_p): Moved here from ...
4848
4849 * tree-data-ref.c (stmt_simple_memref_p): here.
4850 * tree-data-ref.h (stmt_simple_memref_p): Removed.
4851
48522009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
4853
6c9df8cb 4854 * gcc.dg/graphite/id-4.c: New.
c6bb733d 4855
48562009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4857
4858 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4859 (register_old_and_new_names): Update the content of the map.
4860 When there was already a rename_map_elt in the map at that
4861 location, free it.
4862 (copy_bb_and_scalar_dependences): Do rename_variables after
4863 expand_scalar_variables.
4864 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4865 of the map. When there was already a rename_map_elt in the
4866 map at that location, free it.
4867 (translate_clast): Pass the rename_map. Do not initialize and free
4868 a rename_map per stmt_user.
4869 (gloog): Initialize and free one rename_map and pass it to
4870 translate_clast.
4871
48722009-03-12 Sebastian Pop <sebastian.pop@amd.com>
4873
4874 * sese.c (expand_scalar_variables_stmt,
4875 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
4876 parameter.
4877 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
4878 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
4879 the gimple_stmt_iterator of the statement to be expanded.
4880 * graphite-scop-detection.c (is_simple_operand): Do handle
4881 REALPART_EXPR.
4882
48832009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4884
4885 * graphite-scop-detection.c (is_simple_operand): Do not handle
4886 REALPART_EXPR.
6c9df8cb 4887 * gcc.dg/graphite/id-2.c: New.
c6bb733d 4888
4889 * graphite-sese-to-poly.c (build_bb_loops,
4890 add_value_to_dim, scan_tree_for_params_right_scev,
4891 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
4892 find_params_in_bb, build_loop_iteration_domains,
4893 add_conditions_to_domain): Remove subtract.
4894
48952009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4896
4897 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
4898 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
4899 pbb_loop_at_index -> gbb_loop_at_index.
4900 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
4901 (debug_loop_vec): Delete.
4902 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
4903 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
4904 (PBB_LOOPS): Removed.
4905 (PBB_BLACK_BOX): Insert cast.
4906 (pbb_set_black_box): New setter.
4907 (pbb_loop_at_index, pbb_loop_index): Removed.
4908 (scop_set_region, scop_set_nb_params): New.
4909 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
4910 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
4911 (build_poly_scop): Use scop_set_nb_params.
4912 * sese.h (gimple_bb): Add LOOPS.
4913 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
4914
49152009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4916
4917 Revert previous commit.
4918
49192009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4920
4921 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4922 (register_old_and_new_names): Update the content of the map.
4923 When there was already a rename_map_elt in the map at that
4924 location, free it.
4925 (copy_bb_and_scalar_dependences): Do rename_variables after
4926 expand_scalar_variables.
4927 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4928 of the map. When there was already a rename_map_elt in the
4929 map at that location, free it.
4930 (translate_clast): Pass the rename_map. Do not initialize and free
4931 a rename_map per stmt_user.
4932 (gloog): Initialize and free one rename_map and pass it to
4933 translate_clast.
4934
49352009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
4936
4937 Remove forgotten line in revert.
4938
49392009-03-11 Sebastian Pop <sebastian.pop@amd.com>
4940
4941 Revert previous commit.
4942
49432009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4944
4945 * sese.c (register_old_and_new_names): Update the content
4946 of the map. When there was already a rename_map_elt in the
4947 map at that location, free it.
4948 (copy_bb_and_scalar_dependences): Do rename_variables after
4949 expand_scalar_variables.
4950 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4951 of the map. When there was already a rename_map_elt in the
4952 map at that location, free it.
4953 (translate_clast): Pass the rename_map. Do not initialize and free
4954 a rename_map per stmt_user.
4955 (gloog): Initialize and free one rename_map and pass it to
4956 translate_clast.
4957
49582009-03-10 Sebastian Pop <sebastian.pop@amd.com>
4959
4960 * graphite-clast-to-gimple.c (translate_clast): context_loop
4961 is never NULL.
4962
49632009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4964 Sebastian Pop <sebastian.pop@amd.com>
4965
4966 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
4967 of the use of ppl_Polyhedron_map_space_dimensions.
4968
49692009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
4970 Sebastian Pop <sebastian.pop@amd.com>
4971
4972 * graphite-poly.c (unify_scattering_dimensions): Fix types.
4973 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
4974 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
4975 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
4976 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
4977 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
4978 pbb_nb_params): New.
4979 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
4980 nb_loops_around_pbb): Adapt return types.
4981
49822009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
4983
4984 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4985 graphite-clast-to-gimple.o, graphite-data-ref.o,
4986 graphite-scop-detection.o, graphite-poly.o): Add
4987 more headers.
4988
49892009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
4990
4991 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
4992 graphite-clast-to-gimple.o, graphite-data-ref.o,
4993 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
4994
49952009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
4996
6c9df8cb 4997 * gcc.dg/graphite/pr37485.c: Remove -floop-block
4998 * gcc.dg/graphite/pr37828.c: Same.
4999 * gcc.dg/graphite/pr37684.c: Same.
5000 * gcc.dg/graphite/block-0.c: Same.
5001 * gcc.dg/graphite/block-1.c: Same.
5002 * gcc.dg/graphite/block-2.c: Same.
5003 * gcc.dg/graphite/block-3.c: Same.
5004 * gcc.dg/graphite/block-4.c: Same.
5005 * gcc.dg/graphite/block-5.c: Same.
5006 * gcc.dg/graphite/block-6.c: Same.
5007 * gfortran.dg/graphite/pr38083.f90: Same.
5008 * gfortran.dg/graphite/block-1.f90: Same.
5009 * gfortran.dg/graphite/block-3.f90: Same.
5010 * gfortran.dg/graphite/pr37852.f90: Same.
5011 * gfortran.dg/graphite/block-4.f90: Same.
5012 * gfortran.dg/graphite/pr37980.f90: Same.
5013 * gfortran.dg/graphite/pr38953.f90: Same.
5014 * gfortran.dg/graphite/pr37857.f90: Same.
c6bb733d 5015 * opts.c: Remove -floop-block from -O2.
5016 * graphite-poly.c: Fail if -floop-block -floop-interchange or
5017 -floop-strip-mine are used.
5018
50192009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
5020 Sebastian Pop <sebastian.pop@amd.com>
5021
5022 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5023 dimensions.
5024 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5025 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5026 strip_mine_profitable_p, is_interchange_valid,
5027 graphite_trans_bb_block, graphite_trans_loop_block,
5028 graphite_trans_scop_block): Temporary removed.
5029 (extend_scattering, unify_scattering_dimensions): New.
5030 (print_scattering_function, graphite_read_transforms):
5031 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5032 (graphite_generate_scattering_fns): Removed.
5033 (apply_poly_transforms): Cleanup.
5034 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5035 (schedule_to_scattering): Moved.
5036 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5037 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5038 (pbb_nb_scattering): New.
5039 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5040 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5041 Removed.
5042 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5043 shift_poly.
5044 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5045 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
5046 -> PBB_TRANSFORMED_SCATTERING.
5047 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5048 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5049 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5050 (check_poly_representation): Do not return bool.
5051 (graphite_transform_loops): Reformat.
5052 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5053
50542009-03-04 Sebastian Pop <sebastian.pop@amd.com>
5055
5056 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5057 debug_pbb_domain, debug_pbb, debug_scop): New.
5058 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5059 debug_pbb_domain, debug_pbb, debug_scop): Declared.
5060
50612009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5062
5063 PR middle-end/39335
5064 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5065 when the type precision of the induction variable should be
5066 larger than the type precision of nit.
5067 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5068 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5069 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5070
6c9df8cb 5071 * gcc.dg/graphite/pr39335_1.c: New.
5072 * gcc.dg/graphite/pr39335.c: New.
c6bb733d 5073
50742009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5075
5076 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5077 SSA_NAMES not struct reduction_info.
5078
50792009-03-02 Sebastian Pop <sebastian.pop@amd.com>
5080
5081 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5082
50832009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5084 Tobias Grosser <grosser@fim.uni-passau.de>
5085
5086 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5087 (free_sese): Free SESE_REDUCTION_LIST.
5088 * sese.h (struct sese): Add field reduction_list.
5089 (SESE_REDUCTION_LIST): New.
5090 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5091 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5092
50932009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5094 Tobias Grosser <grosser@fim.uni-passau.de>
5095
5096 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5097 of loop_p.
5098
50992009-02-27 Sebastian Pop <sebastian.pop@amd.com>
5100 Tobias Grosser <grosser@fim.uni-passau.de>
5101
5102 * tree-parloops.c (struct brli, build_reduction_list_info,
5103 analyze_reduction_list, gather_scalar_reductions): New.
5104 (loop_parallel_p): Build a reduction list containing only
5105 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5106 (gen_parallel_loop): Call the analysis analyze_reduction_list.
5107 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5108 * tree-flow.h (gather_scalar_reductions): Declared.
5109
51102009-02-26 Sebastian Pop <sebastian.pop@amd.com>
5111
5112 PR middle-end/39308
5113 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5114 number_of_iterations_exit from a gcc_assert.
5115
51162009-02-25 Sebastian Pop <sebastian.pop@amd.com>
5117 Jan Sjodin <jan.sjodin@amd.com>
5118
5119 * output.h (graphite_out_file, graphite_in_file): Declared.
5120 * toplev.c (graphite_out_file, graphite_in_file): New.
5121 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5122 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5123 Don't call schedule_to_scattering.
5124 * common.opt (fgraphite-write, fgraphite-read): New.
5125 * graphite-poly.c: Include output.h.
5126 (print_scattering_function, print_scattering_functions,
5127 debug_scattering_function, debug_scattering_functions,
5128 graphite_write_transforms, graphite_read_transforms,
5129 graphite_generate_scattering_fns): New.
5130 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5131 Call graphite_generate_scattering_fns, graphite_write_transforms,
5132 graphite_read_transforms.
5133 (new_poly_bb): Initialize PBB_SCATTERING.
5134 (free_poly_bb): Free PBB_SCATTERING.
5135 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5136 * graphite-poly.h (struct poly_bb): Add field scattering.
5137 (PBB_SCATTERING): New.
5138 (print_scattering_function, print_scattering_functions,
5139 debug_scattering_function, debug_scattering_functions): Declared.
5140 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5141 GMP values, not integers!
5142 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5143 ppl_read_polyhedron_matrix): New.
5144 * graphite-ppl.h (ppl_print_polyhedron_matrix,
5145 debug_ppl_polyhedron_matrix,
5146 ppl_read_polyhedron_matrix): Declared.
5147 * Makefile.in (graphite-poly.o): Depends on output.h.
5148
51492009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5150 Tobias Grosser <grosser@fim.uni-passau.de>
5151
5152 Revert this change:
5153 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5154 scalar evolutions in the scop_entry->loop_father.
5155
51562009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5157 Tobias Grosser <grosser@fim.uni-passau.de>
5158
5159 * graphite.h (ref_nb_loops): Remove declaration.
5160 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5161 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5162 debug_gbb): Moved to sese.h.
5163 * sese.h: As said.
5164
51652009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5166 Tobias Grosser <grosser@fim.uni-passau.de>
5167
5168 * graphite-data-ref.[ch]: Disable.
5169
51702009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5171 Tobias Grosser <grosser@fim.uni-passau.de>
5172
5173 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5174 scalar evolutions in the scop_entry->loop_father.
5175
51762009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5177
5178 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5179 (graphite_cannot_represent_loop_niter): Renamed
5180 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
5181 (limit_scops): build_sese_loop_nests does not return a bool.
5182 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5183 * sese.c (nb_reductions_in_loop): ... from here.
5184 (graphite_loop_normal_form): ... from here.
5185 (sese_record_loop): Does not fail, so does not return a bool.
5186 (build_sese_loop_nests): Same.
5187 * sese.h (build_sese_loop_nests): Update declaration.
5188 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5189 (build_graphite_loop_normal_form): New.
5190 (gloog): Call build_graphite_loop_normal_form.
5191 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5192 build_sese_loop_nests.
5193
6c9df8cb 5194 * gcc.dg/graphite/id-1.c: New.
c6bb733d 5195
51962009-02-23 Sebastian Pop <sebastian.pop@amd.com>
5197 Tobias Grosser <grosser@fim.uni-passau.de>
5198
5199 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5200 The SCoP detection fix is sufficient.
5201
52022009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5203
5204 PR tree-optimization/39260
5205 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5206 the basic block contains a condition with a real type.
5207 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5208
5209 * gcc.dg/graphite/pr39260.c: New.
5210
52112009-02-21 Sebastian Pop <sebastian.pop@amd.com>
5212
5213 * graphite-poly.c: Inlcude params.h.
5214 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5215 the size of a tile.
5216 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5217 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5218
52192009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5220 Tobias Grosser <grosser@fim.uni-passau.de>
5221
5222 * graphite-scop-detection.c (dot_all_scops_1,
5223 dot_all_scops): Moved here.
5224 * graphite-scop-detection.h (dot_all_scops): Declared here.
5225 * graphite.c (graphite_initialize, graphite_finalize): New.
5226 (graphite_transform_loops): Cleaned up.
5227 * sese.c (debug_oldivs): Moved here.
5228 * graphite-poly.c (graphite_apply_transformations): Renamed
5229 apply_poly_transforms.
5230 (debug_loop_vec): Moved here.
5231 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5232 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5233 find_scop_parameters, build_scop_iteration_domain,
5234 add_conditions_to_constraints, build_scop_canonical_schedules,
5235 build_scop_data_accesses): Now static.
5236 (build_poly_scop, check_poly_representation): New.
5237
52382009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5239
5240 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5241 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5242 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5243 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5244 scan_tree_for_params_right_scev, scan_tree_for_params_int,
5245 scan_tree_for_params, struct irp_data, dx_record_params,
5246 find_params_in_bb, find_scop_parameters, gbb_from_bb,
5247 build_loop_iteration_domains, add_conditions_to_domain,
5248 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5249 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5250 build_sese_conditions, add_conditions_to_constraints,
5251 build_scop_iteration_domain, build_access_matrix_with_af,
5252 build_access_matrix,
5253 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5254
5255 * graphite-sese-to-poly.c: New.
5256 * graphite-sese-to-poly.h: New.
5257
5258 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5259
52602009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5261
5262 * graphite.c: Split graphite code generation to a new file.
5263 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5264 max_precision_type, clast_to_gcc_expression_red,
5265 clast_to_gcc_expression, gcc_type_for_clast_expr,
5266 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5267 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5268 graphite_create_new_guard, clast_get_body_of_loop,
5269 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5270 graphite_create_new_loop, build_iv_mapping, copy_renames,
5271 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5272 compute_cloog_iv_types, free_scattering, save_var_name,
5273 initialize_cloog_names, build_scop_context, build_cloog_prog,
5274 set_cloog_options, debug_clast_stmt, scop_to_clast,
5275 print_generated_program, debug_generated_program,
5276 gloog): Moved to graphite-clast-to-gimple.c.
5277
5278 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5279
5280 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5281 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5282 loop_iv_stack_pop, loop_iv_stack_get_iv,
5283 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5284 free_loop_iv_stack, loop_iv_stack_remove_constants,
5285 debug_rename_elt, debug_rename_map_1, debug_rename_map,
5286 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5287 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5288 eq_ivtype_map_elts, sese_add_exit_phis_edge,
5289 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5290 get_vdef_before_sese, sese_adjust_vphi,
5291 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5292 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5293 is_iv, expand_scalar_variables_ssa_name,
5294 expand_scalar_variables_expr, expand_scalar_variables_stmt,
5295 expand_scalar_variables, rename_variables, remove_condition,
5296 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5297 add_loop_exit_phis, insert_loop_close_phis, struct igp,
5298 default_liveout_before_guard, add_guard_exit_phis,
5299 insert_guard_phis, register_old_and_new_names,
5300 graphite_copy_stmts_from_block, register_sese_liveout_renames,
5301 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5302 if_region_set_false_region, create_if_region_on_edge,
5303 move_sese_in_condition): Moved to sese.c.
5304
5305 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5306 if_region_exit, if_region_get_condition_block,
5307 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5308 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5309 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5310 ivtype_map_elt, new_ivtype_map_elt,
5311 recompute_all_dominators): Moved to sese.h.
5312
5313 * graphite-clast-to-gimple.c: New.
5314 * graphite-clast-to-gimple.h: New.
5315 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5316 * sese.c: Modified as said above.
5317 * sese.h: Same.
5318
53192009-02-20 Sebastian Pop <sebastian.pop@amd.com>
5320
5321 * graphite.c: Split scop detection to a new file.
5322 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5323 move_sd_regions, loop_affine_expr, exclude_component_ref,
5324 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5325 graphite_cannot_represent_loop_niter, struct scopdet_info,
5326 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5327 find_single_entry_edge, find_single_exit_edge,
5328 create_single_entry_edge, sd_region_without_exit,
5329 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5330 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5331 Moved to graphite-scop-detection.c.
5332
5333 * graphite-scop-detection.c: New.
5334 * graphite-scop-detection.h: New.
5335 * Makefile.in: Add new rule for graphite-scop-detection.o.
5336
5337 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5338 tree-scalar-evolution.h.
5339 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5340 build_sese_loop_nests): Moved here from graphite.c.
5341 (param_index): Renamed parameter_index_in_region.
5342
53432009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5344 Sebastian Pop <sebastian.pop@amd.com>
5345
5346 * gcc.dg/graphite/block-0.c: Expected to fail now.
5347 * gcc.dg/graphite/block-1.c: Same.
5348 * gcc.dg/graphite/block-5.c: Same.
5349 * gcc.dg/graphite/block-6.c: Same.
5350
53512009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
5352 Sebastian Pop <sebastian.pop@amd.com>
5353
5354 * graphite.h: Separate from graphite_bb_p the polyhedral
5355 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5356 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5357 graphite-data-ref.h.
5358 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5359 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5360 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5361 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5362 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5363 scop_nb_params): Moved to graphite-poly.h.
5364 * graphite-data-ref.c: Same.
5365 * graphite-data-ref.h: New.
5366 * graphite.c: Same.
5367 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5368 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5369 is_interchange_valid, graphite_trans_bb_block,
5370 graphite_trans_loop_block, scop_max_loop_depth,
5371 graphite_trans_scop_block, graphite_apply_transformations,
5372 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5373 graphite-poly.c.
5374 * graphite-poly.h: New.
5375 * graphite-poly.c: New.
5376 * Makefile.in (OBJS-common): Add graphite-poly.o.
5377 (graphite-poly.o): New rule.
5378 * tree-data-ref.h (struct data_reference): Remove unused scop field.
5379 (DR_SCOP): Removed.
5380
53812009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5382 Tobias Grosser <grosser@fim.uni-passau.de>
5383
5384 * graphite.c: Replace gb -> gbb.
5385 * graphite.h: Same.
5386 * graphite-data-ref.c: Same.
5387
53882009-02-18 Sebastian Pop <sebastian.pop@amd.com>
5389 Tobias Grosser <grosser@fim.uni-passau.de>
5390
5391 * Makefile.in (OBJS-commmon): Add sese.o.
5392 (sese.o): New.
5393 (graphite.o): Add sese.h.
5394 * graphite.c (bb_in_ss_p, loop_in_sese_p,
5395 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5396 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5397 Move to sese.
5398 (block_before_scop): Add missing return.
5399 (new_scop, free_scop): Remove SESE data structures.
5400 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5401 find_scop_parameters, build_loop_iteration_domains,
5402 add_conditions_to_domain, register_scop_liveout_renames,
5403 copy_bb_and_scalar_dependences): Scop -> SESE.
5404
5405 (add_conditions_to_domain): SCoP -> SESE and remove check
5406 (scop_contains_non_iv_scalar_phi_nodes): New.
5407 (build_scop_conditions_1, build_scop_conditions): Remove check for
5408 non iv scalar phi nodes.
5409 (print_scop_statistics): New.
5410 (graphite_transform_loops): Cleanup.
5411
5412 * graphite.h: Move to sese & cleanup.
5413 * sese.c: New.
5414 * sese.h: New.
5415
54162009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5417 Tobias Grosser <grosser@fim.uni-passau.de>
5418
5419 * graphite.c (build_scop_conditions_1): Conditions are only
5420 at the end of a basic block.
5421
54222009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5423 Tobias Grosser <grosser@fim.uni-passau>
5424
5425 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5426 field.
5427 (GBB_ALPHA): Removed.
5428
54292009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5430 Tobias Grosser <grosser@fim.uni-passau.de>
5431
5432 * graphite-data-ref.c (graphite_test_dependence): Don't use
5433 GBB_DYNAMIC_SCHEDULE.
5434 * graphite.c (new_graphite_bb): Same.
5435 (free_graphite_bb): Same.
5436 (build_scop_dynamic_schedules): Removed.
5437 (graphite_transform_loops): Don't call it.
5438 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5439 (GBB_DYNAMIC_SCHEDULE): Removed.
5440
54412009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5442 Tobias Grosser <grosser@fim.uni-passau.de>
5443
5444 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5445 (print_graphite_bb): Same.
5446 (build_cloog_prog): Same.
5447
54482009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5449 Tobias Grosser <grosser@fim.uni-passau.de>
5450
5451 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5452
54532009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5454 Tobias Grosser <grosser@fim.uni-passau.de>
5455
5456 * graphite.c (build_scop_context): Don't use CloogMatrix.
5457 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5458 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5459
54602009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5461 Tobias Grosser <grosser@fim.uni-passau.de>
5462
5463 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5464 liveout_renames, add_params fields...
5465 (struct sese): ... here.
5466 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5467 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5468
54692009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5470 Tobias Grosser <grosser@fim.uni-passau.de>
5471
5472 * graphite.c (print_scop): Do not print the CLooG program.
5473 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5474 build_cloog_prog, gloog): Don't use SCOP_PROG.
5475 (find_transform): Renamed scop_to_clast.
5476 (print_generated_program, debug_generated_program): New.
5477 (graphite_transform_loops): Adapt to new interface.
5478 * graphite.h (struct scop): Remove program field.
5479 (SCOP_PROG): Removed.
5480 (print_generated_program, debug_generated_program): Declared.
5481
54822009-02-16 Sebastian Pop <sebastian.pop@amd.com>
5483
5484 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5485 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5486 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5487 free_graphite_bb, build_scop_canonical_schedules,
5488 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5489 schedules are now represented using a ppl_Linear_Expression_t.
5490 * graphite.h (struct graphite_bb): Same.
5491 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5492 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5493
54942009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5495
5496 * graphite.c: Free local memory.
5497 * graphite-ppl.c: Same.
5498
54992009-02-15 Sebastian Pop <sebastian.pop@amd.com>
5500
5501 * graphite.c (const_column_index, get_first_matching_sign_row_index,
5502 get_lower_bound_row, get_upper_bound_row, copy_constraint,
5503 swap_constraint_variables, scale_constraint_variable): Removed.
5504 (graphite_trans_bb_strip_mine): Remove pong.
5505 * graphite-ppl.c: Include missing header files.
5506 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5507 * graphite-ppl.h (ppl_strip_loop): Declared.
5508 * Makefile.in (graphite-ppl.o): Adjust dependences.
5509
55102009-02-14 Sebastian Pop <sebastian.pop@amd.com>
5511
5512 * graphite.c (build_loop_iteration_domains): Remove ping pong.
5513 (build_scop_iteration_domain): Same.
5514
55152009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5516
5517 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5518 ping pong.
5519 (add_value_to_dim, scan_tree_for_params_right_scev,
5520 scan_tree_for_params_int): New.
5521 * graphite-ppl.c (oppose_constraint): New.
5522 (insert_constraint_into_matrix): Implement missing cases.
5523 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5524
55252009-02-13 Sebastian Pop <sebastian.pop@amd.com>
5526
5527 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5528 use ppl_move_dimension.
5529
55302009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5531
5532 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5533 * graphite.c: Same.
5534 * graphite.h: Same.
5535 * graphite-ppl.c: Same.
5536 * graphite-ppl.h: Same.
5537
55382009-02-12 Sebastian Pop <sebastian.pop@amd.com>
5539
5540 Revert last 3 commits.
5541
55422009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5543
5544 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5545 ping pong.
5546 (add_value_to_dim, scan_tree_for_params_right_scev,
5547 scan_tree_for_params_int): New.
5548 * graphite-ppl.c (oppose_constraint): New.
5549 (insert_constraint_into_matrix): Implement missing cases.
5550 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5551
55522009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5553
5554 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5555
55562009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5557 Tobias Grosser <grosser@fim.uni-passau.de>
5558
5559 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5560 use ppl_move_dimension.
5561 * graphite-ppl.c (ppl_move_dimension): New.
5562 * graphite-ppl.h (ppl_move_dimension): Declared.
5563
55642009-02-10 Sebastian Pop <sebastian.pop@amd.com>
5565
5566 * graphite.c: Do not include cloog/cloog.h.
5567 (print_graphite_bb): Remove ping pong, call PPL print function.
5568
55692009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
5570
5571 * Makefile.in (OBJS-common): Add graphite-ppl.o.
5572 (graphite.o): Add dependence on graphite-ppl.h.
5573 (graphite-ppl.o): New.
5574 (graphite-data-ref.c): Ping pong between PPL data structures
5575 and matrices.
5576 * graphite-ppl.c: New.
5577 * graphite-ppl.h: New.
5578 * graphite.c: Include graphite-ppl.h.
5579 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5580 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5581 Ping pong between PPL data structures and matrices.
5582 (new_graphite_bb): Create a PPL constraint system.
5583 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5584 (build_loop_iteration_domains): Use PPL functions.
5585 * graphite.h: Include graphite-ppl.h. Fix comments.
5586 (graphite_bb): Use a ppl_Constraint_System_t instead of
5587 CloogMatrix for representing the domain.
5588 (scop): Remove static_schedule.
5589 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5590
55912009-02-06 Sebastian Pop <sebastian.pop@amd.com>
5592
5593 * graphite.c: Fix some comments.
5594
55952009-02-05 Sebastian Pop <sebastian.pop@amd.com>
5596
5597 PR middle-end/38953
5598 * graphite.c (if_region_set_false_region): After moving a region
5599 in the false branch of a condition, remove the empty dummy
5600 basic block.
5601 (gloog): Remove wrong fix for PR38953.
5602
56032009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5604
5605 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5606 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5607 register_bb_in_sese, new_sese, free_sese): Moved.
5608 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5609 outermost_loop_in_scop, build_scop_iteration_domain,
5610 expand_scalar_variables_ssa_name, get_vdef_before_scop,
5611 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5612 Use loop_in_sese_p instead of loop_in_scop_p.
5613 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5614 (free_scop): Do not free SCOP_BBS_B.
5615 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5616 ref_nb_loops): Moved here...
5617 * graphite.h (ref_nb_loops): ... from here.
5618 (struct scop): Remove bbs_b bitmap.
5619 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6c9df8cb 5620 * gcc.dg/graphite/scop-19.c: New
c6bb733d 5621
56222009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
5623
5624 * graphite.c (scopdet_basic_block_info): Fix bug in scop
5625 detection.
5626
56272009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5628
5629 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5630 eq_loop_to_cloog_loop): Remove.
5631 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5632 * graphite.h (struct scop): Remove loop2cloog_loop.
5633 (loop_domain_dim, loop_iteration_vector_dim): Remove.
5634
56352009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
5636
5637 * opts.c (decode_options): Only add graphite options to O2
5638 if we compile with graphite enabled.
5639
56402009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5641
5642 * Merge from mainline (r143163:143684).
5643
56442009-01-26 Sebastian Pop <sebastian.pop@amd.com>
5645
5646 * graphite.c (debug_value): Removed.
5647 * graphite.h (debug_value): Removed.
5648
56492009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5650
5651 * passes.c (init_optimization_passes): Do not call pass_copy_prop
5652 after graphite: pass_copy_prop does not maintain a proper loop closed
5653 SSA form. pass_copy_prop should be fixed.
5654
56552009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5656
5657 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5658
56592009-01-23 Sebastian Pop <sebastian.pop@amd.com>
5660
5661 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5662 (gloog): Split the exit of the scop when the scop exit is a loop exit.
5663 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5664 changed the CFG.
5665
56662009-01-20 Sebastian Pop <sebastian.pop@amd.com>
5667
5668 * graphite.c (gloog): Return true when code gen succeeded.
5669 (graphite_transform_loops): Do not call cleanup_tree_cfg if
5670 the code of the function did not changed. After cleanup_tree_cfg
5671 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5672 form.
5673
56742009-01-19 Sebastian Pop <sebastian.pop@amd.com>
5675
5676 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5677 gimple_call_lhs is NULL.
5678
56792009-01-16 Sebastian Pop <sebastian.pop@amd.com>
5680 Tobias Grosser <tobi.grosser@amd.com>
5681
5682 * graphite.c (graphite_trans_scop_block): Do not block single
5683 nested loops.
5684
56852009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5686 Tobias Grosser <tobi.grosser@amd.com>
5687
5688 * graphite.c (build_scop_canonical_schedules): Start schedules at
5689 zero.
5690
56912009-01-15 Sebastian Pop <sebastian.pop@amd.com>
5692 Tobias Grosser <tobi.grosser@amd.com>
5693
5694 * graphite.c (compare_prefix_loops): New.
5695 (build_scop_canonical_schedules): Rewritten.
5696 (graphite_transform_loops): Move build_scop_canonical_schedules
5697 after build_scop_iteration_domain.
5698
56992009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5700 Tobias Grosser <tobi.grosser@amd.com>
5701
5702 * graphite.c (add_conditions_to_domain): Add the loops to
5703 the dimension of the iteration domain. Do copy the domain
5704 only when it exists.
5705 (build_scop_conditions_1): Do not call add_conditions_to_domain.
5706 (add_conditions_to_constraints): New.
5707 (can_generate_code_stmt, can_generate_code): Removed.
5708 (gloog): Do not call can_generate_code.
5709 (graphite_transform_loops): Call add_conditions_to_constraints
5710 after building the iteration domain.
5711
57122009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5713 Tobias Grosser <tobi.grosser@amd.com>
5714 Jan Sjodin <jan.sjodin@amd.com>
5715
5716 * graphite.c (scan_tree_for_params): On substractions negate
5717 all the coefficients of the term.
5718 (clast_to_gcc_expression_red): New. Handle reduction expressions
5719 of more than two operands.
5720 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5721 (get_vdef_before_scop): Handle also the case of default definitions.
5722
57232009-01-14 Sebastian Pop <sebastian.pop@amd.com>
5724
5725 PR middle-end/38431
5726 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5727 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5728 (gloog): Do not call cleanup_tree_cfg.
5729 (graphite_transform_loops): Call cleanup_tree_cfg after all
5730 scops have been code generated.
5731
57322009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5733
5734 * passes.c (init_optimization_passes): Schedule after
5735 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5736
57372009-01-13 Sebastian Pop <sebastian.pop@amd.com>
5738
5739 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5740 Fix comment.
5741 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
5742 Set the type of an expression to the type of its assign statement.
5743 (expand_scalar_variables_expr): Do not pass loop_p.
5744 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
5745 (copy_bb_and_scalar_dependences): Do not pass loop_p.
5746 (translate_clast): Update call to copy_bb_and_scalar_dependences.
5747
57482009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5749
5750 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5751 an expression to the gimple_expr_type of its assign statement.
5752 (expand_scalar_variables_expr): Stop recursion on tcc_constant
5753 or tcc_declaration.
5754
57552009-01-11 Sebastian Pop <sebastian.pop@amd.com>
5756
5757 PR tree-optimization/38786
6c9df8cb 5758 * gcc.dg/graphite/pr38786.c: New.
c6bb733d 5759 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5760 the SSA_NAME case of expand_scalar_variables_expr.
5761 (expand_scalar_variables_expr): Also gather the scalar computation
5762 used to index the memory access.
5763 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5764 the gimple_stmt_iterator where it inserts new code.
5765
57662009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5767
6c9df8cb 5768 * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
c6bb733d 5769
57702009-01-10 Sebastian Pop <sebastian.pop@amd.com>
5771
5772 * opts.c (decode_options): Enable flag_graphite_identity and
5773 flag_loop_block in -O2 and above.
5774
57752009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5776
5777 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5778 Fix merge problem: replace with the file from trunk.
5779
57802009-01-08 Sebastian Pop <sebastian.pop@amd.com>
5781
5782 * Merge from mainline (r141727:143163).
5783
57842009-01-07 Sebastian Pop <sebastian.pop@amd.com>
5785 Jan Sjodin <jan.sjodin@amd.com>
5786
5787 PR tree-optimization/38559
6c9df8cb 5788 * gcc.dg/graphite/pr38559.c: New.
c6bb733d 5789
5790 * graphite.c (debug_value, copy_constraint,
5791 swap_constraint_variables, scale_constraint_variable, ): New.
5792 (get_lower_bound, get_upper_bound): Removed.
5793 (graphite_trans_bb_strip_mine): Clean up this code that works
5794 only for constant number of iterations. Fully copy upper and
5795 lower bound constraints, not only the constant part of them.
5796 * graphite.h (debug_value): Declared.
5797
57982009-01-06 Jan Sjodin <jan.sjodin@amd.com>
5799
5800 PR tree-optimization/38492
5801 PR tree-optimization/38498
5802 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5803 * tree-chrec.h (scev_is_linear_expression): Declared.
5804 * graphite.c (graphite_cannot_represent_loop_niter): New.
5805 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5806 (graphite_loop_normal_form): Use gcc_assert.
5807 (scan_tree_for_params): Use CASE_CONVERT.
5808 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5809 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5810 Use gcc_assert. Discard scops that contain unhandled cases.
5811 (build_scop_conditions): Return a boolean status for unhandled cases.
5812 (strip_mine_profitable_p): Print the loop number, not its depth.
5813 (is_interchange_valid): Pass the depth of the loop nest, don't
5814 recompute it wrongly.
5815 (graphite_trans_bb_block): Same.
5816 (graphite_trans_bb_block): Print tentative of loop blocking.
5817 (graphite_trans_scop_block): Do not print that the loop has been
5818 blocked.
5819 (graphite_transform_loops): Do not handle scops that contain condition
5820 scalar phi nodes.
5821
6c9df8cb 5822 * gcc.dg/graphite/pr38500.c: Fixed warning as committed
c6bb733d 5823 in trunk.
6c9df8cb 5824 * gcc.dg/graphite/block-0.c: Update test.
5825 * gcc.dg/graphite/block-1.c: Same.
5826 * gcc.dg/graphite/block-2.c: Remove xfail and test for
c6bb733d 5827 blocking.
6c9df8cb 5828 * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5829 * gcc.dg/graphite/block-3.c: New.
5830 * gcc.dg/graphite/pr38498.c: New.
c6bb733d 5831
58322008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
5833
5834 PR tree-optimization/38510
5835 * gcc.dg/graphite/pr38510.c: New.
5836 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5837 (translate_clast): Call recompute_all_dominators before
5838 graphite_verify.
5839 (gloog): Call recompute_all_dominators before graphite_verify.
5840
58412008-12-12 Sebastian Pop <sebastian.pop@amd.com>
5842
5843 PR tree-optimization/38492
5844 * graphite.c (rename_map_elt, debug_rename_elt,
5845 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5846 rename_map_elt_info, eq_rename_map_elts,
5847 get_new_name_from_old_name, bb_in_sese_p): Moved around.
5848 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5849 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5850 (sese_build_livein_liveouts): New.
5851 (new_sese, free_sese): New.
5852 (new_scop): Call new_sese.
5853 (free_scop): Call free_sese.
5854 (rename_variables_from_edge, rename_phis_end_scop): Removed.
5855 (register_old_new_names): Renamed register_old_and_new_names.
5856 (register_scop_liveout_renames, add_loop_exit_phis,
5857 insert_loop_close_phis, struct igp,
5858 default_liveout_before_guard, add_guard_exit_phis,
5859 insert_guard_phis, copy_renames): New.
5860 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5861 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5862 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5863 (scop_adjust_phis_for_liveouts): New.
5864 (gloog): Call scop_adjust_phis_for_liveouts.
5865
5866 * graphite.h (struct sese): Documented. Added fields liveout,
5867 num_ver and livein.
5868 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5869 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5870 (struct scop): Added field liveout_renames.
5871 (SCOP_LIVEOUT_RENAMES): New.
5872
58732008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5874
5875 PR tree-optimization/38409
5876 * gcc.dg/graphite/pr38409.c: New.
5877 * graphite.c (nb_reductions_in_loop): Use simple_iv.
5878
58792008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5880
5881 * graphite.c (gcc_type_for_cloog_iv): By default return
5882 integer_type_node.
5883 (graphite_create_new_loop): Don't fold_convert the already
5884 fold_convert-ed expression.
5885
58862008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
5887
5888 PR tree-optimization/38446
5889 * gcc.dg/graphite/pr38446.c: New.
5890 * graphite.c (register_bb_in_sese): New.
5891 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
5892 looking at the bbs in the region.
5893 * graphite.h (sese): Add region_basic_blocks pointer set to
5894 structure and initialize at the time of defining new scop.
5895
58962008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
5897
5898 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
5899 (find_params_in_bb): Do not free data refs.
5900 (free_graphite_bb): Add FIXME on disabled free_data_refs.
5901
59022008-12-11 Sebastian Pop <sebastian.pop@amd.com>
5903
6c9df8cb 5904 * gcc.dg/graphite/scop-16.c: Test only scop specific info.
5905 * gcc.dg/graphite/scop-17.c: Same.
5906 * gcc.dg/graphite/block-5.c: New.
5907 * gcc.dg/graphite/block-6.c: New.
5908 * gcc.dg/graphite/pr37485.c: Clean dump file after.
5909 * gcc.dg/graphite/pr37684.c: Same.
5910 * gcc.dg/graphite/block-2.c: Same.
c6bb733d 5911
5912 * graphite.c (struct ivtype_map_elt): New.
5913 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
5914 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
5915 gcc_type_for_cloog_iv): New.
5916 (loop_iv_stack_patch_for_consts): Use the type of the induction
5917 variable from the original loop, except for the automatically
5918 generated loops, i.e., in the case of a strip-mined loop, in
5919 which case there is no original loop: in that case just use
5920 integer_type_node.
5921 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
5922 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
5923 (clast_name_to_gcc): Accept params to be NULL.
5924 (clast_to_gcc_expression): Take an extra parameter for the type.
5925 Convert to that type all the expressions built by this function.
5926 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
5927 (graphite_translate_clast_equation): Compute the type of the
5928 clast_equation before translating its LHS and RHS.
5929 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
5930 (graphite_create_new_loop): Compute the type of the induction
5931 variable before translating the lower and upper bounds and before
5932 creating the induction variable.
5933 (rename_variables_from_edge, rename_phis_end_scop): New.
5934 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
5935 (sese_add_exit_phis_edge): Do not use integer_zero_node.
5936 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5937 compute_cloog_iv_types): New.
5938 (gloog): Call compute_cloog_iv_types before starting the
5939 translation of the clast.
5940
5941 * graphite.h (struct graphite_bb): New field cloog_iv_types.
5942 (GBB_CLOOG_IV_TYPES): New.
5943 (debug_ivtype_map): Declared.
5944 (oldiv_for_loop): New.
5945
59462008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
5947
5948 PR middle-end/38459
5949 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
5950 (param_index): Assert if parameter is not know after parameter
5951 detection.
5952 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
5953 (find_scop_parameters): Mark, that we have finished parameter
5954 detection.
5955 (graphite_transform_loops): Move condition detection before parameter
5956 detection.
5957 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6c9df8cb 5958 * gfortran.dg/graphite/pr38459.f90: New.
c6bb733d 5959
59602008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5961
5962 * graphite.c (graphite_transform_loops): Always call find_transform ()
5963 in ENABLE_CHECKING. So we test these code paths, even if we do not
5964 generate code.
5965
59662008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
5967
5968 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
5969 (print_scop): Ditto.
5970
59712008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
5972
5973 PR middle-end/38084
6c9df8cb 5974 Fix gfortran.dg/graphite/id-3.f90.
c6bb733d 5975 * graphite.c (scopdet_basic_block_info): Fix bug that found some
5976 regions more than once.
5977
59782008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5979
6c9df8cb 5980 Fix gfortran.dg/graphite/id-4.f90.
c6bb733d 5981 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
5982 when not needed.
5983
59842008-12-03 Sebastian Pop <sebastian.pop@amd.com>
5985
6c9df8cb 5986 Fix gfortran.dg/graphite/id-1.f90.
c6bb733d 5987 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
5988 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
5989 (max_precision_type): New.
5990 (value_clast): Removed.
5991 (clast_to_gcc_expression): Be more careful to types of expressions.
5992 Use max_precision_type and update use of gmp_cst_to_tree.
5993 (graphite_translate_clast_equation): Use max_precision_type.
5994 (graphite_create_guard_cond_expr): Do not use integer_type_node,
5995 use the type of the condition.
5996 (graphite_create_new_loop): Do not use integer_type_node, use the
5997 max_precision_type of lb and ub.
5998
59992008-12-03 Sebastian Pop <sebastian.pop@amd.com>
6000
6001 * graphite.c (build_scops_1): Initialize open_scop.exit
6002 and sinfo.last.
6003
60042008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6005
6c9df8cb 6006 * gcc.dg/graphite/pr38084.c: New.
6007 * gfortran.dg/graphite/id-1.f90: New.
6008 * gfortran.dg/graphite/id-2.f90: New.
6009 * gfortran.dg/graphite/id-3.f90: New.
6010 * gfortran.dg/graphite/id-4.f90: New.
6011 * gfortran.dg/graphite/pr37857.f90: New.
c6bb733d 6012
60132008-12-02 Sebastian Pop <sebastian.pop@amd.com>
6014 Jan Sjodin <jan.sjodin@amd.com>
6015 Harsha Jagasia <harsha.jagasia@amd.com>
6016
6017 PR middle-end/37852
6018 PR middle-end/37883
6019 PR middle-end/37928
6020 PR middle-end/37980
6021 PR middle-end/38038
6022 PR middle-end/38039
6023 PR middle-end/38073
6024 PR middle-end/38083
6025 PR middle-end/38125
6026
6c9df8cb 6027 * gcc.dg/graphite/pr38073.c: New.
6028 * gcc.dg/graphite/pr37928.c: New.
6029 * gcc.dg/graphite/pr37883.c: New.
6030 * gcc.dg/graphite/pr38125.c: New.
6031 * gfortran.dg/graphite/pr38083.f90: New.
6032 * gfortran.dg/graphite/pr37852.f90: New.
6033 * gfortran.dg/graphite/pr37980.f90: New.
c6bb733d 6034
6c9df8cb 6035 * gcc.dg/graphite/scop-18.c: Remove reduction, test for
c6bb733d 6036 the number of detected scops. Copy exact same test for loop
6037 blocking...
6c9df8cb 6038 * gcc.dg/graphite/block-1.c: Fix the number of expected
c6bb733d 6039 loops to be blocked as reductions are not handled.
6c9df8cb 6040 * gcc.dg/graphite/block-4.c: ...here. New.
c6bb733d 6041
6042 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6043 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6044 ...here.
6045 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6046 * Makefile.in (graphite.o): Depend on value-prof.h.
6047 (graphite.o-warn): Removed -Wno-error.
6048 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6049 to be a NULL pointer. Call update_stmt. Return the newly created
6050 cannonical induction variable.
6051
6052 * graphite.h (debug_rename_map): Declared. Fix some comments.
6053
6054 * graphite.c: Reimplement the code generation from graphite to gimple.
6055 Include value-prof.h.
6056 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6057 (get_old_iv_from_ssa_name): Removed.
6058 (graphite_stmt_p): New.
6059 (new_graphite_bb): Test for useful statements before building a
6060 graphite statement for the basic block.
6061 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6062 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6063 reason.
6064 (recompute_all_dominators, graphite_verify,
6065 nb_reductions_in_loop, graphite_loop_normal_form): New.
6066 (scop_record_loop): Call graphite_loop_normal_form.
6067 (build_scop_loop_nests): Iterate over all the blocks of the
6068 function instead of relying on the incomplete information from
6069 SCOP_BBS. Return the success of the operation.
6070 (find_params_in_bb): Use the data from GBB_DATA_REFS.
6071 (add_bb_domains): Removed.
6072 (build_loop_iteration_domains): Don't call add_bb_domains.
6073 Add the iteration domain only to the basic blocks that have been
6074 translated to graphite.
6075 (build_scop_conditions_1): Add constraints only if the basic
6076 block have been translated to graphite.
6077 (build_scop_data_accesses): Completely disabled until data
6078 dependence is correctly implemented.
6079 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6080 (remove_all_edges_1, remove_all_edges): Removed.
6081 (get_new_name_from_old_name): New.
6082 (graphite_rename_variables_in_stmt): Renamed
6083 rename_variables_in_stmt. Call get_new_name_from_old_name.
6084 Use replace_exp and update_stmt.
6085 (is_old_iv): Renamed is_iv.
6086 (expand_scalar_variables_stmt): Extra parameter for renaming map.
6087 Use replace_exp and update_stmt.
6088 (expand_scalar_variables_expr): Same. Use the map to get the
6089 new names for the renaming of induction variables and for the
6090 renaming of variables after a basic block has been copied.
6091 (expand_scalar_variables): Same.
6092 (graphite_rename_variables): Renamed rename_variables.
6093 (move_phi_nodes): Removed.
6094 (get_false_edge_from_guard_bb): New.
6095 (build_iv_mapping): Do not insert the induction variable of a
6096 loop in the renaming iv map if the basic block does not belong
6097 to that loop.
6098 (register_old_new_names, graphite_copy_stmts_from_block,
6099 copy_bb_and_scalar_dependences): New.
6100 (translate_clast): Heavily reimplemented: copy basic blocks,
6101 do not move them. Finally, in call cleanup_tree_cfg in gloog.
6102 At each translation step call graphite_verify ensuring the
6103 consistency of the SSA, loops and dominators information.
6104 (collect_virtual_phis, find_vdef_for_var_in_bb,
6105 find_vdef_for_var_1, find_vdef_for_var,
6106 patch_phis_for_virtual_defs): Removed huge hack.
6107 (mark_old_loops, remove_dead_loops, skip_phi_defs,
6108 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6109 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6110 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6111 if_region_get_condition_block, if_region_set_false_region,
6112 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6113 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6114 sese_add_exit_phis_edge, sese_add_exit_phis_var,
6115 rewrite_into_sese_closed_ssa): New.
6116 (gloog): Remove dead code. Early return if code cannot be
6117 generated. Call cleanup_tree_cfg once the scop has been code
6118 generated.
6119 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6120 block loops with less than two loops.
6121 (graphite_apply_transformations): Remove the call to
6122 scop_remove_ignoreable_gbbs.
6123 (limit_scops): When build_scop_loop_nests fails, continue on
6124 the next scop. Fix open_scop.entry.
6125 (graphite_transform_loops): Call recompute_all_dominators: force the
6126 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6127 Call initialize_original_copy_tables and free_original_copy_tables
6128 to be able to copy basic blocks during code generation.
6129 When build_scop_loop_nests fails, continue on next scop.
6130 (value_clast): New union.
6131 (clast_to_gcc_expression): Fix type cast warning.
6132
61332008-11-09 Sebastian Pop <sebastian.pop@amd.com>
6134
6135 * Merge from mainline (r140838:141727).
6136
61372008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6138
6139 PR middle-end/37833
6140
6141 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6142
61432008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
6144
6145 PR middle-end/37943
6146
6147 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6148 exits and conditions.
6c9df8cb 6149 * gcc.dg/graphite/pr37943.c: New.
c6bb733d 6150
61512008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6152
6153 PR middle-end/37886
6154 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6155
61562008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
6157
6158 * doc/invoke.texi: Fix spaces.
6159
61602008-10-22 Sebastian Pop <sebastian.pop@amd.com>
6161
6162 PR tree-optimization/37891
6163 Reverted last commit.
6164 * graphite.c (create_single_entry_edge): Set
6165 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6166
61672008-10-21 Sebastian Pop <sebastian.pop@amd.com>
6168 Mitul Thakkar <mitul.thakkar@amd.com>
6169
6170 * graphite.c (create_single_entry_edge): Set
6171 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6172
61732008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
6174
6175 * doc/invoke.texi: Add -fgraphite-identity.
6176 * graphite.c (graphite_apply_transformations): Check for
6177 -fgraphite-identity.
6178 * toplev.c (process_options): Add flag_graphite_identity.
6179 * tree-ssa-loop.c: Add flag_graphite_identity.
6180
61812008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6182
6183 Undo changes from 2008-10-02:
6184 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6185 operand type when copying the operand to a variable of different type.
6186 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6187 with the IV name after increment.
6188
61892008-10-14 Sebastian Pop <sebastian.pop@amd.com>
6190 Harsha Jagasia <harsha.jagasia@amd.com>
6191
6192 PR tree-optimization/37828
6c9df8cb 6193 * gcc.dg/graphite/pr37828.c: New.
c6bb733d 6194 * graphite.c (graphite_trans_loop_block): Do not loop block
6195 single nested loops.
6196
61972008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
6198 Sebastian Pop <sebastian.pop@amd.com>
6199
6200 * graphite.c (struct rename_map_elt, new_rename_map_elt,
6201 rename_map_elt_info, eq_rename_map_elts): New.
6202 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6203 (expand_scalar_variables_expr): Change parameters.
6204 (expand_scalar_variables_stmt): Same.
6205 (expand_scalar_variables): Same.
6206 (graphite_rename_ivs): Rename graphite_rename_variables.
6207 (build_iv_mapping): New.
6208 (translate_clast): Call build_iv_mapping.
6209 * graphite.h (gbb_p): New name.
6210
62112008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
6212
6213 PR tree-optimization/37684
6214 * gcc.dg/graphite/pr37684.c: New.
6215 * graphite.c (exclude_component_ref): New.
6216 (is_simple_operand): Call exclude_component_ref.
6217
62182008-10-02 Jan Sjodin <jan.sjodin@amd.com>
6219 Harsha Jagasia <harsha.jagasia@amd.com>
6220
6221 PR tree-optimization/37485
6222 * gcc.dg/graphite/block-2.c: New
6223 * graphite.c (gmp_cst_to_tree): Moved.
6224 (iv_stack_entry_is_constant): New.
6225 (iv_stack_entry_is_iv): New.
6226 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6227 (loop_iv_stack_insert_constant): New.
6228 (loop_iv_stack_pop): Use new datatpype.
6229 (loop_iv_stack_get_iv): Same.
6230 (loop_iv_stack_get_iv_from_name): Same.
6231 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6232 (loop_iv_stack_patch_for_consts): New.
6233 (loop_iv_stack_remove_constants): New.
6234 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6235 (translate_clast): Call loop_iv_stack_patch_for_consts and
6236 loop_iv_stack_remove_constants.
6237 (gloog): Use new datatype. Redirect construction edge to end
6238 block to avoid accidental deletion.
6239 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
6240 iv stack entry.
6241 (union iv_stack_entry_data): New. Data in iv stack entry.
6242 (struct iv_stack_entry): New. Datatype for iv stack entries.
6243
62442008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6245
6246 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6247 operand type when copying the operand to a variable of different type.
6248
62492008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6250
6251 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6252 with the IV name after increment.
6253
62542008-10-02 Sebastian Pop <sebastian.pop@amd.com>
6255
6256 * Merge from mainline (r140164:140838).
6257
62582008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
6259
6260 * graphite-data-ref.c: New.
6261 * graphite.c (print_scop): Also dump the dependence graph.
6262 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6263 (new_scop): Initialize SCOP_DEP_GRAPH.
6264 (build_scop_dynamic_schedules): New.
6265 (build_access_matrix_with_af): Fixed column numbering.
6266 (graphite_transform_loops): Call build_scop_dynamic_schedules.
6267 * graphite.h: Add ifndef/define guards against multiple inclusion.
6268 (struct scop): Add dep_graph field.
6269 (SCOP_DEP_GRAPH): Defined.
6270 (ref_nb_loops): Fixed and moved to other position.
6271 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6272 (nb_loops_around_loop_in_scop): New.
6273 (graphite_dump_dependence_graph): Declared.
6274 (graphite_build_rdg_all_levels): Declared.
6275 (graphite_test_dependence): Declared.
6276 * Makefile.in (graphite-data-ref.o): New target.
6277
62782008-09-09 Sebastian Pop <sebastian.pop@amd.com>
6279
6280 * Merge from mainline (139870:140164).
6281
62822008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6283
6284 * Merge from mainline (138275:139870).
6c9df8cb 6285 * gcc.dg/graphite/scop-matmult.c: XFailed as one of
c6bb733d 6286 the commits from trunk broke the niter detection.
6287
62882008-09-01 Sebastian Pop <sebastian.pop@amd.com>
6289
6290 * graphite.c: Add more documentation. Fix formatting.
6291 (debug_loop_vec, debug_oldivs, loop_iv_stack,
6292 loop_iv_stack_debug): Moved...
6293 (schedule_to_scattering): Move before use.
6294 (dot_all_scops): Include in "#if 0" the code for system
6295 call dotty.
6296
6297 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6298 loop_iv_stack_debug): ...here.
6299
63002008-08-29 Jan Sjodin <jan.sjodin@amd.com>
6301
6302 * tree-phinodes.c (make_phi_node): Extern.
6303 (add_phi_node_to_bb): New.
6304 (create_phi_node): Call add_phi_node_to_bb.
6305 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6306 (remove_statement): Handle case where stored phi was updated
6307 and is no longer the same.
6308 * graphite.c (is_parameter): New.
6309 (is_old_iv): New.
6310 (expand_scalar_variables_expr): New.
6311 (expand_scalar_variables_stmt): New.
6312 (expand_scalar_variables): New.
6313 (move_phi_nodes): Create new phi instead of moving old one.
6314 (translate_clast): Call expand_scalar_variables.
6315 (find_vdef_for_var_in_bb): Also scan regular definitions.
6316 (skip_phi_defs): New.
6317 (collect_scop_exit_phi_args): New.
6318 (patch_scop_exit_phi_args): New.
6319 (gloog): Patch phis after scop.
6320 * tree-flow.h: (add_phi_node_to_bb): Declared.
6321 (make_phi_node): Declared.
6322
63232008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6324
6325 * graphite.c (end_scop): Split the entry of the scop when it
6326 is the header of the loop in which the scop is ending.
6327 (build_scops_1, limit_scops): Update uses of end_scop.
6328
63292008-08-26 Sebastian Pop <sebastian.pop@amd.com>
6330
6331 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6332 SCOP_ENTRY or SCOP_EXIT.
6333
63342008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6335
6336 * graphite.c (get_construction_edge): Removed.
6337 (gloog): Construction edge is the scop entry edge.
6338
63392008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6340
6341 * graphite.c (can_generate_for_scop): Removed.
6342 (gloog): Do not call it.
6343
63442008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6345
6346 * graphite.c (new_scop): Entry of a scop is an edge.
6347 Initialize SESE region.
6348 (free_scop): Free SESE region.
6349 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6350 (split_difficult_bb): New, split from end_scop.
6351 (end_scop): Exit of a scop is an edge.
6352 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6353 not automatically updated and thus is always wrong.
6354 * graphite.h (struct sese): New.
6355 (SESE_ENTRY): New.
6356 (SESE_EXIT): New.
6357 (struct scop): New field for a SESE region. Remove entry, exit.
6358 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6359 semantics as before. Moved comment around.
6360
63612008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6362 Sebastian Pop <sebastian.pop@amd.com>
6363
6364 * graphite.c (graphite_transform_loops): Always enable gloog
6365 and find_transform when ENABLE_CHECKING.
6366
63672008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6368
6369 * graphite.c (graphite_transform_loops): Move pretty printer
6370 of SCOPs before doing any transform. Remove call to print_scops
6371 and dot_all_scops_1.
6372
63732008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6374
6375 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6376 (print_graphite_bb): Same.
6377
63782008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6379
6380 * graphite.c (dot_all_scops_1): Cleanup.
6381 (move_scops): Fix comment.
6382
63832008-08-25 Sebastian Pop <sebastian.pop@amd.com>
6384
6385 * graphite.c (build_scop_bbs): Revert commit 139355:
6386
6387 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6388 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6389
6390 * graphite.c (build_scop_bbs): Factor up code.
6391
63922008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6393
6394 * graphite.c (gloog): Update dominator info.
6395
63962008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
6397
6398 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6399
64002008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6401
6402 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6403 initialization.
6404 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6405 (translate_clast): Correct formatting.
6406 * graphite.h (struct num_map): Removed.
6407 (struct graphite_bb): Remove num_map field.
6408 (GBB_INDEX_TO_NUM_MAP): Removed.
6409
64102008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6411
6412 * graphite.c (build_access_matrix_with_af): Fix comments.
6413 (build_scop_data_accesses): Same.
6414
64152008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6416
6417 * graphite.c (build_scop_data_accesses): Don't construct
6418 access matrices. Add a FIXME and an assert condition that
6419 should pass when the access matrices will be needed.
6420
64212008-08-24 Sebastian Pop <sebastian.pop@amd.com>
6422
6423 * tree-data-ref.c (stmt_simple_memref_p): Don't call
6424 really_constant_p.
6425 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6426 Moved close by free_graphite_bb.
6427 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
6428 (new_scop): Move close by free_scop.
6429 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6430
64312008-08-22 Jan Sjodin <jan.sjodin@amd.com>
6432
6433 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6434 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6435 instead of recursive call.
6436 (graphite_translate_clast_equation): New.
6437 (graphite_create_guard_cond_expr): New.
6438 (graphite_create_new_guard): New.
6439 (get_stack_index_from_iv): Removed.
6440 (graphite_rename_ivs_stmt): Use gbb_loop_index.
6441 (get_true_edge_from_guard_bb): New.
6442 (translate_clast): Handle stmt_guard in clast.
6443 (get_construction_edge): Allow construction edge detection for
6444 a scope entry with multiple predecessors if one predecessor is
6445 the immediate dominator of scope entry.
6446 (can_generate_code_stmt): Enable code generation for clast_guard.
6447 (gloog): Use correct context loop. Removed check for post dominators.
6448 * cfgloop.h (create_empty_if_region_on_edge): Declared.
6449
64502008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6451
6452 * graphite.c (remove_dead_loops): Document better which
6453 loops are removed.
6454
64552008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6456
6457 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6458 and PPLINC.
6459 (graphite.o): Also depends on pointer-set.h.
6460
64612008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6462
6463 * graphite.c (scop_record_loop): Fix compile warning.
6464
64652008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
6466 Sebastian Pop <sebastian.pop@amd.com>
6467
6468 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6469
64702008-08-21 Sebastian Pop <sebastian.pop@amd.com>
6471
6472 * graphite.c (build_graphite_bb): Initialize bb->aux to
6473 point to the graphite_bb_p.
6474 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6475 content of bb->aux.
6476 (add_bb_domains): Does not use the scop parameter.
6477 (graphite_transform_loops): Clean bb->aux at the end.
6478
64792008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6480 Sebastian Pop <sebastian.pop@amd.com>
6481
6c9df8cb 6482 * lib/target-supports.exp
c6bb733d 6483 (check_effective_target_fgraphite): New.
6484
6c9df8cb 6485 * gcc.dg/graphite/graphite.exp: Early exit when
c6bb733d 6486 check_effective_target_fgraphite returns false.
6487 Set dg-do-what-default to compile.
6488 (scan-graphite-dump-times): Removed.
6c9df8cb 6489 * gfortran.dg/graphite/graphite.exp: Same.
c6bb733d 6490
6c9df8cb 6491 * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
c6bb733d 6492 Use scan-tree-dump-times instead of scan-graphite-dump-times.
6c9df8cb 6493 * gcc.dg/graphite/scop-1.c: Same.
6494 * gcc.dg/graphite/scop-2.c: Same.
6495 * gcc.dg/graphite/scop-3.c: Same.
6496 * gcc.dg/graphite/scop-4.c: Same.
6497 * gcc.dg/graphite/scop-5.c: Same.
6498 * gcc.dg/graphite/scop-6.c: Same.
6499 * gcc.dg/graphite/scop-7.c: Same.
6500 * gcc.dg/graphite/scop-8.c: Same.
6501 * gcc.dg/graphite/scop-9.c: Same.
6502 * gcc.dg/graphite/scop-10.c: Same.
6503 * gcc.dg/graphite/scop-11.c: Same.
6504 * gcc.dg/graphite/scop-12.c: Same.
6505 * gcc.dg/graphite/scop-13.c: Same.
6506 * gcc.dg/graphite/scop-matmult.c: Same.
6507 * gcc.dg/graphite/scop-14.c: Same.
6508 * gcc.dg/graphite/scop-15.c: Same.
6509 * gcc.dg/graphite/block-0.c: Same.
6510 * gcc.dg/graphite/scop-16.c: Same.
6511 * gcc.dg/graphite/block-1.c: Same.
6512 * gcc.dg/graphite/scop-17.c: Same.
6513 * gcc.dg/graphite/scop-18.c: Same.
6514 * gfortran.dg/graphite/block-1.f90: Same.
6515 * gfortran.dg/graphite/scop-1.f: Same.
6516 * gfortran.dg/graphite/block-2.f: Same.
c6bb733d 6517
65182008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6519
6520 * graphite.c: Fix some XXX comments.
6521 (build_scop_dynamic_schedules): Removed.
6522
65232008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6524
6525 * graphite.h (scop_max_loop_depth): Moved...
6526 * graphite.c (scop_max_loop_depth): ...here.
6527 (remove_all_edges_1): New.
6528 (remove_all_edges): Factored code.
6529 (remove_cond_exprs): Check only the last statement for
6530 a GIMPLE_COND expression.
6531
65322008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6533
6534 * graphite.c (scan_tree_for_params): Early return when the
6535 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
6536 (find_scop_parameters): Factor out code.
6537 (graphite_trans_bb_strip_mine): Remove dead code.
6538
65392008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6540
6541 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6542 graphite_trans_bb_move_loop): Factor asserts.
6543 (gloog): Perform sanity checks only for ENABLE_CHECKING.
6544 Do not call calculate_dominance_info and estimate_bb_frequencies.
6545
65462008-08-20 Jan Sjodin <jan.sjodin@amd.com>
6547
6548 * graphite.c (create_loops_mapping, free_loops_mapping,
6549 create_loops_mapping_num, debug_loop_mapping_1,
6550 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6551 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6552 graphite_loops_mapping_add_child_num,
6553 graphite_loops_mapping_insert_child,
6554 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6555 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6556 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6557 create_num_from_index, get_num_from_index,
6558 swap_loop_mapped_depth): Removed.
6559 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6560 (free_scop): Do not call free_loops_mapping.
6561 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6562 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
6563 get_loop_mapped_depth.
6564 (graphite_trans_bb_move_loop): Do not update the loop mapping.
6565 (graphite_trans_bb_strip_mine): Same.
6566 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6567 (struct scop): Remove field loops_mapping.
6568
65692008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6570 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6571
6572 * graphite.c (scop_record_loop): Factor out one level of the
6573 condition by early return.
6574 (build_scop_loop_nests): Format following FSF coding style.
6575 (build_scop_dynamic_schedules): Factor out code.
6576 (scopdet_bb_info): Reindent. Default case should not be reachable.
6577
65782008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6579 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6580
6581 * graphite.c (loop_affine_expr): Check for DECL_P or struct
6582 assignments that are not handled as simple operands for now.
6583
65842008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6585 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6586
6587 * graphite.c (build_scop_bbs): Factor up code.
6588
65892008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6590 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6591
6592 * graphite.c (stmt_simple_for_scop_p): Factor code out
6593 of the loop.
6594 (enum gbb_type): New. Group all the GBB_* types under it.
6595 (is_loop_exit): Moved...
6596 (end_scop): Enable BB spliting.
6597 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
6598 * cfgloop.h (is_loop_exit): Declared.
6599
66002008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6601
6602 * doc/invoke.texi: Remove strides from examples containing
6603 DO loops when the strides are equal to 1.
6604
66052008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
6606 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6607
6608 * graphite.c (graphite_trans_scop_block): Or the result with
6609 the result from graphite_trans_loop_block.
6c9df8cb 6610 * gcc.dg/graphite/block-1.c: New.
6611 * gfortran.dg/graphite/block-1.f90: New.
6612 * gfortran.dg/graphite/block-2.f: New.
c6bb733d 6613
66142008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6615
6616 * graphite.c (graphite_transform_loops): Call cloog_initialize
6617 and cloog_finalize.
6618
66192008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6620
6621 * tree-data-ref.c) (stmt_simple_memref_p): New.
6622 * tree-data-ref.h (stmt_simple_memref_p): Declared.
6623 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6624 (is_simple_operand): Call stmt_simple_memref_p.
6625
6c9df8cb 6626 * gcc.dg/graphite/scop-matmult.c: Updated for not
c6bb733d 6627 using pointer arithmetic, as this is optimized by PRE and
6628 makes the code too difficult to analyze.
6629
6c9df8cb 6630 * gcc.dg/graphite/scop-18.c: Same.
c6bb733d 6631
66322008-08-20 Sebastian Pop <sebastian.pop@amd.com>
6633
6634 * gdbinit.in (pgg): New.
6635
66362008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6637
6638 * graphite.c (graphite_trans_loop_block): Fix warning.
6639
66402008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6641
6642 * graphite.c (graphite_trans_loop_block): Fix my merge error.
6643
66442008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
6645
6646 * graphite.c (graphite_trans_bb_block): Remove check for
6647 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6648 Check if loop blocking is profitable for every loop, before applying
6649 the changes.
6650 (graphite_apply_transformations): Call graphite_trans_bb_block only,
6651 if flag_loop_block is set.
6652
66532008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6654
6655 * graphite.c: Add some more documentation for the loop
6656 mapping.
6657
66582008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6659
6660 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6661 * graphite.c: Format on less than 80 columns.
6662 * graphite.h: Same.
6663
66642008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6665
6666 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6667
66682008-08-14 Sebastian Pop <sebastian.pop@amd.com>
6669
6670 * doc/invoke.texi (floop-block, floop-strip-mine,
6671 floop-interchange): Update documentation with examples.
6672
66732008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6674
6675 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6676 add_referenced_var.
6677 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6678
66792008-08-13 Sebastian Pop <sebastian.pop@amd.com>
6680
6681 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6682 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
6683 * tree-scalar-evolution.c: Revert useless changes.
6684 * tree-phinodes.c: Same.
6685 * cfghooks.c: Same.
6686 * vec.h: Same.
6687 * tree-vectorizer.h: Same.
6688 * tree-flow.h: Same.
6689 * tree-cfg.c: Same.
6690 * common.opt (fgraphite): Update documentation.
6691
66922008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
6693
6694 * doc/invoke.texi (-floop-block, -floop-strip-mine,
6695 -floop-interchange): Add more text for explaining what each of these
6696 flags is doing.
6697 * tree-into-ssa.c (gimple_vec): Moved to...
6698 * graphite.c: Include gimple.h.
6699 (gimple_vec): Moved to...
6700 (del_loop_to_cloog_loop): Removed.
6701 (loop_affine_expr): Do not call create_data_ref when the
6702 operand is a constant.
6703 (new_scop): Use free instead of del_loop_to_cloog_loop.
6704 * Makefile.in (graphite.o): Depend on GIMPLE_H.
6705 * gimple.h (gimple_vec): ... here.
6706
67072008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6708
6709 * graphite.c (scopdet_bb_info): Only allow loops with known number of
6710 latch executions.
6711 (build_loop_iteration_domains): Fail, if latch executions unknown.
6712
67132008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6714
6715 * graphite.c (add_conditions_to_domain): New.
6716 (build_scop_conditions_1): Call add_conditions_to_domain.
6717 (set_cloog_options): Allow to disable optimizations.
6718
67192008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6720
6721 * graphite.c (find_params_in_bb): Look for parameters in conditions.
6722 Do not use walk_dominator_tree.
6723 (find_scop_parameters): Do not use walk_dominator_tree.
6724
67252008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6726
6727 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6728 (idx_record_params): Adapt.
6729 * graphite.h (scop_gimple_loop_depth): New.
6730
67312008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6732
6733 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6734 (scan_tree_for_params): Remove value_init.
6735 (build_scop_context): Remove value_init.
6736 (build_loop_iteration_domains): Remove value_init.
6737 (schedule_to_scattering): Remove value_init.
6738 (graphite_trans_bb_strip_mine): Remove value_init.
6739
67402008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6741
6742 * gcc/graphite.c (limit_scops): New.
6743 (graphite_transform_loops): Add limit SCoPs.
6c9df8cb 6744 * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6745 * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6746 * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6747 * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6748 * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6749 * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6750 * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6751 * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6752 * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
c6bb733d 6753 Change loop numbers.
6c9df8cb 6754 * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
c6bb733d 6755 Change loop numbers.
6c9df8cb 6756 * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6757 * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6758 * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6759 * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6760 * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6761 * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6762 * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6763 * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6764 * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6765 * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
c6bb733d 6766
67672008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
6768
6769 * graphite.c (graphite_transform_loops): Call always find_transform.
6770
67712008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
6772
6773 * graphite.c (free_loops_mapping): New.
6774 (stmt_simple_for_scop_p): Fix typo.
6775 (stmt_simple_for_scop_p): Fix tuples functions, that
6776 broke polyhedron.
6777 (free_graphite_bb): Fix some memleaks.
6778 (free_scop): Fix some memleaks.
6779 (scopdet_bb_info): Do not forget some tmp SCoPs.
6780 (find_params_in_bb): Fix some memleaks.
6781 (clast_to_gcc_expression): Fix warning.
6782
67832008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
6784
6c9df8cb 6785 * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6786 * gcc.dg/graphite/scop-17.c: Fix for 32bit.
c6bb733d 6787
67882008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6789
6790 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6791 Move code ifdef-ed HAVE_cloog...
6792 * graphite.c: Include toplev.h.
6793 ... here.
6794 * Makefile.in (OBJS-common): Always build graphite.o.
6795 (BACKEND): Remove @GRAPHITE@.
6796 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6797 (graphite.o): Depend on TOPLEV_H.
6798
67992008-08-04 Sebastian Pop <sebastian.pop@amd.com>
6800
6801 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6802 Remove typo left from polylib to ppl conversion.
6803 * graphite.c (graphite_transforms): Use sorry instead of fatal.
6804
68052008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6806
6807 * toplev.c (process_options): Move the graphite loop optimization
6808 flags...
6809 * tree-ssa-loop.c (graphite_transforms): ... here.
6810 When not configured with CLooG, print to dump_file that
6811 Graphite transforms were not performed.
6c9df8cb 6812 * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
c6bb733d 6813 New.
6c9df8cb 6814 * gcc.dg/graphite/*.c: Updated all testcases to use
c6bb733d 6815 scan-graphite-dump-times.
6816
68172008-08-03 Sebastian Pop <sebastian.pop@amd.com>
6818
6819 * graphite.c (dot_scop, dot_all_scops): Do not call system.
6820 Do not open /tmp/scop.dot and /tmp/allscops.dot.
6821
68222008-08-02 Sebastian Pop <sebastian.pop@amd.com>
6823 Jan Sjodin <jan.sjodin@amd.com>
6824
6825 * configure: Regenerated.
6826 * omp-low.c (expand_omp_sections): Remove now unused code.
6827 * config.in (HAVE_polylib): Removed.
6828 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6829 (PPLLIBS, PPLINC): Added.
6830 * graphite.c: Replace unsigned with int wherever possible.
6831 Don't access Cloog's data structures, but use accessor functions.
6832 Clast's stmt->type is now implemented as a vtable: change the
6833 switches of stmt->type into ifs.
6834 (polylib/polylibgmp.h): Don't include.
6835 (initialize_dependence_polyhedron,
6836 initialize_data_dependence_polyhedron, is_empty_polyhedron,
6837 statement_precedes_p, test_dependence, build_rdg_all_levels,
6838 dump_dependence_graph): Removed until this code is cleaned up
6839 or ported to Cloog.
6840 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6841 (POLYLIBINC): Renamed PPLINC.
6842
68432008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
6844 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6845 Jan Sjodin <jan.sjodin@amd.com>
6846
6847 Finish the merge and tuplification of graphite.
6848
68492008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6850 Jan Sjodin <jan.sjodin@amd.com>
6851
6852 Partial merge from mainline (138072:138275).
6853 * graphite.c still has to be tuplified.
6854
68552008-07-29 Jan Sjodin <jan.sjodin@amd.com>
6856
6857 * graphite.c (graphite_loops_mapping_max_loop_num): New.
6858 (create_num_from_index): New.
6859 (get_num_from_index): Also pass in the graphite BB.
6860 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6861 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6862 (graphite_trans_bb_strip_mine): Call create_num_from_index.
6863 (is_interchange_valid): Return false when failing.
6864 * graphite.h (struct num_map): New.
6865 (struct graphite_bb): New field num_map.
6866 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6867
68682008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
6869
6870 * graphite.c (dump_gbb_conditions): Print also conditions like
6871 "if (a)". Remove dublicated code and use print_generic_expr ().
6872 (stmt_simple_for_scop_p): Only allow conditions we can handle
6873 {<, <=, >, >=}.
6874
68752008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6876
6877 * graphite.h (struct scop): Removed new_ivs field.
6878 (SCOP_NEWIVS): Deleted.
6879 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
6880 clast_to_gcc_expression, graphite_create_new_loop):
6881 Removed use of new_ivs.
6882
68832008-07-25 Jan Sjodin <jan.sjodin@amd.com>
6884
6885 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
6886 create_loops_mapping_num, debug_loop_mapping_1): New.
6887 (debug_loop_mapping): Call debug_loop_mapping_1.
6888 (get_loop_mapping_for_num,
6889 graphite_loops_mapping_add_child,
6890 graphite_loops_mapping_add_child_num,
6891 graphite_loops_mapping_insert_child,
6892 graphite_loops_mapping_parent,
6893 split_loop_mapped_depth_for_num,
6894 loop_mapped_depth_split_loop): New.
6895 (increment_loop_mapped_depths): Removed.
6896 (swap_loop_mapped_depth_for_num): Reimplemented.
6897 (new_scop): Call create_loops_mapping.
6898 (scop_record_loop): Call graphite_loops_mapping_insert_child.
6899 (translate_clast): Pass the old loop father in parameter, and pass
6900 it to get_old_iv_from_ssa_name.
6901 (remove_edges_around_useless_blocks, can_generate_code_stmt,
6902 can_generate_code, can_generate_for_scop): New.
6903 (graphite_trans_bb_block): Returns false when it fails to transform.
6904 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
6905
69062008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6907
6908 Reverted all the changes related to the streamization and
6909 loop fusion.
6910 These changes are now tracked in the streamization branch.
6911
69122008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6913 Jan Sjodin <jan.sjodin@amd.com>
6914
6915 * graphite.c (gbb_compare): Correctly constify.
6916 (gbb_can_be_ignored): Indent.
6917 (graphite_trans_scop_swap_1and2): Add legality check.
6918 Remove dead FIXMEs.
6919
69202008-07-25 Sebastian Pop <sebastian.pop@amd.com>
6921
6922 Remove fallouts from "Reverted the Condate changes".
6923 * tree.h: Remove unused decl.
6c9df8cb 6924 * gcc.dg/tree-checker: Same.
c6bb733d 6925 * timevar.def: Remove counter.
6926
69272008-07-24 Sebastian Pop <sebastian.pop@amd.com>
6928
6929 * Merge from mainline (135673:138072).
6930
6931 Reverted the MIRO changes (from 2008-04-05) that are now
6932 tracked in the miro branch.
6933 * tree-bounds.c: Removed.
6934 * tree-bounds.h: Removed.
6935
6936 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
6937 are now tracked in the condate branch.
6938 * tree-check.c: Removed.
6939 * tree-match.c: Removed.
6940 * condate.y: Removed.
6941
69422008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
6943
6944 * common.opt: New user flag -floop-block, -floop-strip-mine
6945 and -floop-interchange.
6946 * toplev.c (process_options): Enable -fgraphite pass if any one of the
6947 graphite loop optimization flags is turned on.
6948 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
6949 flag_loop_strip_mine and flag_loop_interchange checks before
6950 optimizations.
6951 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
6952 -floop-strip-mine and -floop-interchange.
6c9df8cb 6953 * gcc.dg/graphite/block-0.c: Add -floop-block and remove
c6bb733d 6954 -fgraphite.
6c9df8cb 6955 * gcc.dg/graphite/scop-16.c: Ditto.
6956 * gcc.dg/graphite/scop-17.c: Ditto.
6957 * gcc.dg/graphite/scop-18.c: Ditto.
c6bb733d 6958
69592008-07-23 Jan Sjodin <jan.sjodin@amd.com>
6960 Sebastian Pop <sebastian.pop@amd.com>
6961
6962 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
6963 (create_empty_loop_on_edge): More fixes.
6964 * tree-phinodes.c (resize_phi_node): Extern.
6965 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
6966 * cfghooks.c (update_dominator_information): New split from
6967 split_edge.
6968 * tree-vectorizer.c (rename_variables_in_bb): Extern.
6969 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
6970 successor of the function entry block.
6971
6972 * graphite.c: Include pointer-set.h.
6973 (debug_loop_mapping, increment_loop_mapped_depths,
6974 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
6975 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
6976 swap_loop_mapped_depth_for_num, get_num_from_index,
6977 swap_loop_mapped_depth, loop_iv_stack_debug,
6978 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
6979 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
6980 get_old_iv_from_ssa_name): New.
6981 (new_scop): Initialize SCOP_LOOPS_MAPPING.
6982 (free_scop): Free SCOP_LOOPS_MAPPING.
6983 (scop_record_loop): Record old ivs.
6984 (create_var_name): Removed.
6985 (initialize_cloog_names): Allocate double space in case strip mine
6986 applies to all loops once.
6987 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
6988 (clast_to_gcc_expression): Same. Implement more clast to gimple
6989 translation.
6990 (graphite_create_new_loop): Pass in ivstack.
6991 (remove_all_edges): Pass in the construction_edge.
6992 (graphite_remove_iv): Removed.
6993 (graphite_rename_ivs, graphite_rename_ivs_stmt,
6994 remove_cond_exprs): Rewritten.
6995 (move_phi_nodes): New.
6996 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
6997 (translate_clast): Pass in ivstack. Rewrite some cases.
6998 (set_cloog_options, debug_clast_stmt): New.
6999 (find_transform): Use set_cloog_options.
7000 (outermost_loop_layer): Removed.
7001 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7002 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7003 mark_old_loops, remove_dead_loops): New.
7004 (gloog): Rewritten.
7005 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7006 (const_column_index, get_first_matching_sign_row_index,
7007 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7008 get_upper_bound): New.
7009 (graphite_trans_bb_strip_mine): Also update the iv map.
7010
7011 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7012 (struct name_tree): Add a loop field.
7013 (struct scop): Add a graphite_loops_mapping field.
7014 (SCOP_LOOPS_MAPPING): New.
7015 (debug_clast_stmt): Declare.
7016 * lambda.h (find_induction_var_from_exit_cond): Declare.
7017 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7018 * cfgloop.h (update_dominators_in_loop): Removed declaration.
7019 (create_empty_loop_on_edge): Updated.
7020 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7021 rename_variables_in_bb): Declare.
7022 * tree-cfg.c (remove_bb): Extern.
7023
6c9df8cb 7024 * gcc.dg/graphite/block-0.c: New.
c6bb733d 7025
70262008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
7027 Sebastian Pop <sebastian.pop@amd.com>
7028
7029 * graphite.c (strip_mine_profitable_p): New.
7030 (graphite_trans_bb_block): Disable strip mining if not profitable.
7031
6c9df8cb 7032 * gcc.dg/graphite/scop-18.c: New.
7033 * gcc.dg/graphite/scop-17.c: Fixed.
7034 * gcc.dg/graphite/scop-16.c: Fixed.
c6bb733d 7035
70362008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
7037 Jan Sjodin <jan.sjodin@amd.com>
7038 Sebastian Pop <sebastian.pop@amd.com>
7039
7040 * graphite.c (is_interchange_valid): New.
7041 (graphite_trans_bb_block): Check loop nest of basic block for legality
7042 of interchange.
7043
7044 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7045 outer_most_loop, gbb_outer_most_loop_index): New.
7046
7047 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7048 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
6c9df8cb 7049 * gcc.dg/graphite/scop-16.c: New.
7050 * gcc.dg/graphite/scop-17.c: New.
c6bb733d 7051
70522008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7053
7054 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7055 (graphite_trans_scop_block): Ignore SCoPs without bbs.
7056
70572008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
7058
7059 * graphite.c (new_scop): Initialize SCOP_EXIT.
7060 (scopdet_info): Add.
7061 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7062 (build_scops_1): Cleanup, bugfixes.
7063 (build_scops): Cleanup.
7064
6c9df8cb 7065 * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7066 * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
c6bb733d 7067
70682008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7069
6c9df8cb 7070 * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
c6bb733d 7071
6c9df8cb 7072 * gfortran.dg/graphite/graphite.exp: Use
c6bb733d 7073 DEFAULT_GRAPHITE_FLAGS.
7074
6c9df8cb 7075 * gcc.dg/graphite/scop-15.c: Update to reduced test case.
c6bb733d 7076
70772008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7078
7079 * graphite.c (scan_tree_for_params): Do not assert any more if
7080 MULT_EXPR parameter is negative.
7081
6c9df8cb 7082 * gfortran.dg/graphite/scop-1.f: New.
c6bb733d 7083
6c9df8cb 7084 * gfortran.dg/graphite/graphite.exp: New.
c6bb733d 7085
6c9df8cb 7086 * gcc.dg/graphite/scop-15.c: New.
c6bb733d 7087
70882008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
7089
7090 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7091
70922008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7093
7094 * graphite.c (graphite_trans_bb_swap_loops): Rename from
7095 graphite_swap_loops.
7096 (graphite_trans_bb_move_loop): New.
7097 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7098 (graphite_trans_bb_block): New.
7099 (graphite_trans_loop_block): New.
7100 (graphite_trans_scop_swap_1and2): Rename from
7101 graphite_trans_swap_1and2.
7102 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7103 (graphite_trans_scop_block): New.
7104 (graphite_apply_transformations): Rename from
7105 graphite_transformations.
7106
6c9df8cb 7107 * gcc.dg/graphite/scop-matmult.c: New.
c6bb733d 7108
71092008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
7110
7111 * graphite.c (gbb_compare): New.
7112 (graphite_sort_gbbs): New.
7113 (gbb_can_be_ignored): New.
7114 (scop_remove_ignoreable_gbbs): New.
7115 (graphite_transformations): Cleanup and add
7116 scop_remove_ignoreable_gbbs.
7117 * lambda.h (lambda_vector_compare): New.
7118
71192008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
7120
7121 * graphite.c (print_graphite_bb): Correct printing of static schedule.
7122 (graphite_swap_loops): int -> unsigned
7123 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7124 (graphite_transformations): New.
7125 (graphite_transform_loops): Move to graphite_transformations.
7126 * graphite.h (gbb_nb_loops): Return unsigned.
7127
71282008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
7129
7130 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7131 the domain matrix. This makes scop-0.c work again.
7132
71332008-06-20 Richard Guenther <rguenther@suse.de>
7134
7135 * graphite.h: Adjust copyright to GPLv3.
7136 * graphite.c: Likewise.
7137 (stmt_simple_memref_for_scop_p): Split out from ...
7138 (stmt_simple_for_scop_p): ... here. Fix handling of calls
7139 and simplify.
7140 (get_bb_type): Optimize.
7141 (is_pred): Remove.
7142 (is_bb_addable): Fix memleak, replace is_pred call with
7143 single_pred.
7144 (build_scops): Use current_loops.
7145 (param_index): Fix memleak.
7146
71472008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7148
7149 * graphite.c: Fix formatting.
7150
71512008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7152
7153 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7154 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7155 (create_var_name, save_var_name): Newly defined functions.
7156 (initialize_cloog_names): Part of the code factored out to
7157 save_var_name.
7158 (clast_to_gcc_expression): Now handles the case of clast_red_sum
7159 in clast_reduction statement.
7160 (graphite_create_new_loop): Now takes a new parameter
7161 for outer_loop.
7162 (translate_clast): Now also takes the context_loop and bb_exit
7163 parameters. Rewritten the code so that it creates a gimple code
7164 inside the given context.
7165 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7166 remove_cond_expr, disconnect_cond_expr,
7167 disconnect_virtual_phi_nodes): Newly defined functions.
7168 * graphite.h (struct scop): added old_ivs vector.
7169 SCOP_OLDIVS: New macro.
7170
71712008-06-19 Sebastian Pop <sebastian.pop@amd.com>
7172
7173 * cfgloopmanip.c: Add missing function comments, fix formatting.
7174
71752008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7176
7177 * cfgloopmanip.c (update_dominators_in_loop): Defined.
7178 (create_empty_loop_on_edge): Defined.
7179 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7180 instead of void.
7181 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7182 (update_dominators_in_loop): Declared as extern
7183 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7184
71852008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
7186
7187 * graphite.c (print_graphite_bb): Allow changing number of loops
7188 in SCoP domain.
7189 (initialize_cloog_names): Allow changing number of loops.
7190 (build_cloog_prog): Simplify.
7191 (find_transform): Enable cloog option --strides.
7192 (graphite_swap_loops): New.
7193 (graphite_strip_mine_loop): New.
7194 (graphite_trans_swap_1and2): New.
7195 (graphite_trans_strip): New.
7196 (graphite_transform_loops): Add graphite_trans_strip.
7197 * graphite.h (scop_max_loop_depth): New.
7198
71992008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7200
7201 * graphite.c (build_scop_iteration_domain): Remove forgotten
7202 line. (Fixes compile)
7203
72042008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
7205
7206 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7207 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7208 (build_bb_loops): New.
7209 (graphite_transform_loops): Add build_bb_loops.
7210 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7211 numbers.
7212 * graphite.h (graphite_bb): Add loops.
7213 (gbb_nb_loops): New.
7214 (gbb_loop_at_index): New.
7215 (gbb_loop_index): New.
7216 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7217 using nb_params_in_scop.
7218
72192008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7220
7221 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7222 (build_scop_canonical_schedules): Build minimized schedule.
7223 (schedule_to_scattering): Adapt to minimized schedule.
7224 * graphite.h (graphite_bb): Add/Update descriptions.
7225
72262008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
7227 Tobias Grosser <grosser@fim.uni-passau.de>
7228
7229 * graphite.c (print_graphite_bb): Add condition printing.
7230 (dump_value): New.
7231 (dump_gbb_conditions): New.
7232 (build_scop_conditions_1): New.
7233 (build_scop_conditions): New.
7234 * graphite.h (graphite_bb): Add conditions.
7235
72362008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
7237
7238 * graphite.c (print_graphite_bb):
7239 (free_graphite_bb): New.
7240 (free_scop): Free bbs.
7241 (get_bb_type): Free doms.
7242 (build_scop_context): Free context matrix.
7243 (build_loop_iteration_domains): Remove unused code.
7244 (build_cloog_prog): Free scattering function and blocklist.
7245 (find_transform): Free options.
7246
72472008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
7248
7249 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7250 Remove unnecessery cloog data structures. Make a copy of the domain
7251 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7252 unnecessary cloog data structures. Fix memory leaks. Remove insert
7253 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7254 used.
7255 (build_scop_iteration_domain): Remove unnecessary cloog
7256 data structures. Fix memory leaks.
7257 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7258 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7259
72602008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7261
7262 * graphite.c (find_scop_params): Remove initialize_cloog_names.
7263
72642008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7265
7266 * graphite.c (end_scop): Style fix.
7267 (schedule_to_scattering): Style and comment fix.
7268
72692008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7270 * graphite.c (print_graphite_bb): Fix definiton of
7271 schedule_to_scattering.
7272 (initialize_cloog_names): Change nb_scattdims to max loop
7273 depth in SCoP.
7274 (schedule_to_scattering): Take parameter for number of scattering
7275 dimensions.
7276 (build_cloog_prog): Only build as much scattering dimensions as
7277 necessary.
7278
72792008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
7280
7281 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7282 in polyhedron/aermod.f90.
7283
72842008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
7285 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7286 Harsha Jagasia <harsha.jagasia@amd.com>
7287
7288 * graphite.c (is_bb_addable): Fix segfault.
7289
72902008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
7291
7292 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7293 with multiple exits and conditional handling in edge cases.
7294 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7295
6c9df8cb 7296 * gcc.dg/graphite/scop-14.c: New.
c6bb733d 7297
72982008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
7299 Adrien Eliche <aeliche@isty.uvsq.fr>
7300
7301 * graphite.c (is_bb_addable): Add more comments and enhance
7302 readablity of the source code. Fix memory leak.
7303 (is_loop_exit): Fix memory leak.
7304
73052008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7306
7307 * graphite.c (first_loop_in_scop): Deleted.
7308 (setup_cloog_loop): Only walk the loop chain for inner loops.
7309 (build_scop_iteration_domain): Execute setup_cloog_loop for
7310 all loops in the first layer.
7311
73122008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
7313
7314 * graphite.c (scan_tree_for_params): Change the way params are
7315 added to be indepenent of the number of loops.
7316 (setup_cloog_loop): Revert to short matrix format. Fix parameter
7317 handling.
7318 (build_cloog_prog): Revert to short matrix format.
7319
73202008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7321 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7322
7323 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7324 warning.
7325
73262008-06-05 Sebastian Pop <sebastian.pop@amd.com>
7327
7328 * graphite.c (nb_data_refs_in_scop): New.
7329 (graphite_transform_loops): Print more stats: number of
7330 loops, basic blocks and data references per scop.
7331
73322008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7333 Jan Sjodin <jan.sjodin@amd.com>
7334
7335 * graphite.c (loop_affine_expr, idx_record_params,
7336 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7337 instead of instantiate_parameters.
7338
73392008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7340
7341 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7342 add support for parameters, add STATIC_SCHEDULE at the right places,
7343 cleanup.
7344
73452008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7346
7347 * graphite.c (build_scop_loop_nests): Only add the loops, that
7348 are contained completely in the SCoP.
7349 (build_cloog_prog): Disable scattering, until schedule_to_scattering
7350 and the domains are fixed.
7351 (build_scop_canonical_schedules): Add support for bbs not contained
7352 in any SCoP.
7353
73542008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
7355
7356 * graphite.h (scop_contains_loop): Update comments to match
7357 the actual behavior.
7358 (scop_contains_loop): New.
7359 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7360
73612008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7362
7363 * graphite.c (get_bb_type): On function body, i.e. loop_0,
7364 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7365 as GBB_COND_HEADER.
7366
73672008-06-04 Sebastian Pop <sebastian.pop@amd.com>
7368 Tobias Grosser <grosser@fim.uni-passau.de>
7369
7370 * graphite.c (graphite_transform_loops): Early return when
7371 there are no loops in the function.
7372
73732008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7374 Jan Sjodin <jan.sjodin@amd.com>
7375
7376 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7377 offset of the last loop.
7378 (setup_cloog_loop): Copy the entire outer constraint matrix.
7379
73802008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7381 Jan Sjodin <jan.sjodin@amd.com>
7382
7383 * graphite.c (stmt_in_scop_p, function_parameter_p,
7384 invariant_in_scop_p): Removed.
7385 (scan_tree_for_params): Can be used with no constraint
7386 matrix for gathering parameters.
7387 (idx_record_params): Don't use idx_record_param, instead use
7388 scan_tree_for_params.
7389 (find_scop_parameters): Same.
7390 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7391 Fix the size of loop domains.
7392 (schedule_to_scattering): Exit when the outer loop is not in scop.
7393 (find_transform): Enable build_cloog_prog.
7394
73952008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7396 Jan Sjodin <jan.sjodin@amd.com>
7397
7398 * graphite.c (schedule_to_scattering): Make scattering domains
7399 uniformly of the same size, as required by CLooG 0.14.0 and before.
7400
74012008-05-31 Sebastian Pop <sebastian.pop@amd.com>
7402 Jan Sjodin <jan.sjodin@amd.com>
7403
7404 * graphite.c (schedule_to_scattering): Rewrite, correct the
7405 translation of the scheduling function to scattering.
7406 (build_cloog_prog): Call schedule_to_scattering only once.
7407 * graphite.h (scop_loop_index): Do not fail for loops not
7408 in the scop: return -1.
7409
74102008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
7411
7412 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7413 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7414 (setup_cloog_loop): Export GBB_DOMAIN.
7415 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
7416 able to rebuild the original control flow.
7417 * graphite.h (graphite_bb): Add domain field and access macro.
7418 (GBB_DOMAIN): New.
7419
74202008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7421
7422 * graphite.c (debug_gbb): New.
7423 (print_scop, build_graphite_bb): Use SCOP_BBS.
7424 (build_scop_bbs): Reimplemented.
7425 (dfs_bb_in_scop_p): Removed.
7426 (build_scop_loop_nests): Reorder loops inserted in
7427 SCOP_LOOP_NEST: outer loops should come first.
7428 (build_scop_canonical_schedules): Reinitialize at zero
7429 the components of the SCOP_STATIC_SCHEDULE for the loops
7430 that have already been parsed.
7431
7432 * graphite.h (debug_gbb): Declared.
7433
74342008-05-30 Sebastian Pop <sebastian.pop@amd.com>
7435 Jan Sjodin <jan.sjodin@amd.com>
7436
7437 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7438 (graphite_loop_to_gcc_loop): Removed.
7439 (remove_all_edges): New.
7440 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7441 (gloog): Remove useless code.
7442
74432008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7444
7445 * graphite.c (get_bb_type): Reworked. We distinguish between
7446 loops with one or multiple exits.
7447 (is_loop_exit): New.
7448 (is_pred): New.
7449 (is_bb_addable): Rework condition handling, now support for case
7450 case statements and loops with multiple exits.
7451
6c9df8cb 7452 * gcc.dg/graphite/scop-11.c: New.
7453 * gcc.dg/graphite/scop-12.c: New.
7454 * gcc.dg/graphite/scop-13.c: New.
c6bb733d 7455
74562008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
7457
7458 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7459 we have too many colors.
7460
74612008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
7462
7463 * doc/invoke.texi (-ftree-loop-fusion): Document.
7464 * tree-pass.h (pass_loop_fusion): Declared.
7465 * tree-loop-fusion.c: New.
7466 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7467 * tree-data-ref.c (find_data_references_in_loop): Make extern.
7468 * tree-data-ref.h (find_data_references_in_loop): Declared.
7469 * common.opt (ftree-loop-fusion): Declared.
7470 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7471
74722008-05-21 Sebastian Pop <sebastian.pop@amd.com>
7473
7474 * graphite.c (build_access_matrix): Fix typo from the merge.
7475
74762008-05-20 Sebastian Pop <sebastian.pop@amd.com>
7477
7478 * Merge from mainline (130800:135673).
7479
74802008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7481
7482 * graphite.c (end_scop): The exit of the scop is not part of the scop.
7483 Update dominators after splitting.
7484
74852008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7486
7487 * graphite.c (is_bb_addable): Return the harmful statement.
7488 Factor up some code.
7489 (end_scop): New. Splits end of scope bbs on a harmful statement.
7490 (build_scops_1): Call end_scop.
7491
74922008-05-07 Sebastian Pop <sebastian.pop@amd.com>
7493
7494 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7495 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7496 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7497 build_scops_1): Removed.
7498 (build_scops_2): Renamed build_scops_1.
7499
75002008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7501
7502 * graphite.c: Fix formatting.
7503
75042008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7505
7506 * graphite.c (get_bb_type): New.
7507 (move_scops): New.
7508 (build_scops_2): New.
7509 (is_bb_addable): New.
7510 (build_scops): Switch the scop detection.
7511 (build_scop_bbs): Add entry bb to scop.
7512 * graphite.h (struct scop): Update comment.
7513
75142008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7515
7516 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7517 more colors.
7518
75192008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7520
6c9df8cb 7521 * gcc.dg/graphite/scop-1.c: Update.
7522 * gcc.dg/graphite/scop-2.c: Update.
7523 * gcc.dg/graphite/scop-4.c: Update.
7524 * gcc.dg/graphite/scop-5.c: Add.
7525 * gcc.dg/graphite/scop-6.c: Add.
c6bb733d 7526
75272008-05-06 Sebastian Pop <sebastian.pop@amd.com>
7528
6c9df8cb 7529 * gcc.dg/graphite/scop-0.c: Add.
7530 * gcc.dg/graphite/scop-7.c: Add.
7531 * gcc.dg/graphite/scop-8.c: Add.
7532 * gcc.dg/graphite/scop-9.c: Add.
7533 * gcc.dg/graphite/scop-10.c: Add.
c6bb733d 7534
75352008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
7536
7537 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7538 Check affine expressions depending on the outermost loop
7539 instead of a scop.
7540 (stmt_simple_for_scop_p): Same.
7541 (harmfule_stmt_in_scop): Same.
7542
75432008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
7544
7545 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7546 mark entry and exit, that are not part of the SCoP and update HTML
7547 formatting.
7548
75492008-04-25 Sebastian Pop <sebastian.pop@amd.com>
7550
7551 * graphite.c (basic_block_simple_for_scop_p): Renamed
7552 harmful_stmt_in_bb.
7553 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7554 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7555 (all_preds_visited_p, all_succs_visited_p,
7556 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7557 scop_end_loop): New.
7558 (build_scops): Do not use dfs_enumerate_from.
7559
6c9df8cb 7560 * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
c6bb733d 7561
75622008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7563
7564 * graphite.c: Add comments to functions that are missing a
7565 description.
7566 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
7567
75682008-04-23 Sebastian Pop <sebastian.pop@amd.com>
7569
7570 * graphite.c (nb_params_in_scop): Moved...
7571 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7572 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7573 (clast_to_gcc_expression): Reduce column size to less than 80.
7574 (graphite_create_iv): Return the new name of the IV.
7575 (find_transform): Set options->esp and options->cpp.
7576 (gloog): Comment out the invalidation of the old loop code.
7577 (initialize_dependence_polyhedron): Replace scop_nb_params with
7578 nb_params_in_scop.
7579
7580 * graphite.h (nb_params_in_scop): ... here.
7581 (scop_nb_params): Removed.
7582 (loop_domain_dim): Return something even when the loop was not
7583 found in the hash table: avoid ICEing on all the graphite.exp
7584 testcases.
7585
75862008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7587
7588 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7589
7590 * graphite.c (build_scop_dynamic_schedules): Schedule is built
7591 according to nesting level.
7592 (find_scop_parameters): Call instantiate_parameters.
7593 (scan_tree_for_params): Extend it to handle general affine bounds.
7594 Inner loop bound can depend on outer loop induction variable.
7595 (setup_cloog_loop): tmp variable is allocated on stack. Call
7596 instantiate_parameters with respect to outermost_loop_in_scop.
7597 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7598 graphite.h.
7599 (create_empty_loop): Function loopify should be given edge
7600 probability, instead of edge frequency. Dominance relation from
7601 switch_bb to loop_header.
7602 (clast_to_gcc_expression): Added handling of clast_reduction node.
7603 (gloog): New functionality for removing old loop.
7604 (test_dependence): Factored out from build_rdg_all_levels.
7605 (build_rdg_all_levels): Dependence testing factored out to
7606 test_dependence function.
7607
7608 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7609 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7610 from graphite.c
7611
76122008-04-07 Sebastian Pop <sebastian.pop@amd.com>
7613
7614 * graphite.c (free_scop, param_index, initialize_cloog_names,
7615 nb_params_in_scop): Use name_tree map instead of just a tree
7616 for keeping track of the variable name associated to that tree.
7617 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7618 clast_to_gcc_expression, graphite_create_iv,
7619 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7620 graphite_stmt_to_gcc_stmt): New.
7621 (gloog): Call these.
7622 * graphite.h (struct name_tree): New.
7623 (struct scop): Use name_tree instead of tree for params.
7624 Store a vector of name_tree for new_ivs.
7625 (SCOP_NEWIVS): New.
7626 (scop_nb_params): Use name_tree instead of tree.
7627
76282008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
7629 Sebastian Pop <sebastian.pop@amd.com>
7630
7631 * tree-bounds.c: New.
7632 * tree-bounds.h: New.
7633 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7634 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7635 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7636 flag_mudflap.
7637 * gcc.c: Same.
7638 * toplev.c: Same.
7639 * c-cppbuiltin.c: Same.
7640 * c-pragma.c: Same.
7641 * common.opt: Same.
7642 * varasm.c: Same.
7643 * tree-outof-ssa.c: Same.
7644 * c-common.c: Same.
7645 * Makefile.in: Same.
7646
76472008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
7648 Sebastian Pop <sebastian.pop@amd.com>
7649
7650 * tree-loop-distribution.c (remaining_stmts,
7651 upstream_mem_writes): Removed static variables.
7652 (copy_loop_before, create_bb_after_loop,
7653 mark_nodes_having_upstream_mem_writes, free_rdg_components,
7654 rdg_build_components, rdg_build_partitions,
7655 dump_rdg_partitions): Extern.
7656 (generate_loops_for_partition, generate_code_for_partition): Do not
7657 return a bool.
7658 (already_processed_vertex_p, predecessor_has_mem_write,
7659 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7660 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7661 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7662 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7663 Pass remaining_stmts and upstream_mem_writes as parameters.
7664 (rdg_component): Moved...
7665 (build_rdg_partition_for_component): Do not aggregate components when
7666 flag_streamize_loops is set.
7667 (gen_sequential_loops): New.
7668 (ldist_gen): Call gen_sequential_loops.
7669
7670 * tree-pass.h (pass_loop_streamization): Declared.
7671
7672 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7673 basic blocks when loops structures exist.
7674
7675 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7676
7677 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7678
7679 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7680 eliminate_local_variables_stmt, eliminate_local_variables,
7681 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7682 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7683 of code delimited by two edges in the CFG.
7684 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7685 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7686 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
7687 the case of parallelisation of reductions.
7688 (create_loop_fn): Extern.
7689 (create_omp_parallel_region): New.
7690
7691 * tree-data-ref.c (dump_data_dependence_relation): Don't call
7692 dump_data_reference for printing dra and drb.
7693 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7694 RDGE_RELATION.
7695 (build_rdg): Don't call free_dependence_relations for the moment, as
7696 we attach dependence relations on each edge of the RDG.
7697 To be fixed later.
7698
7699 * tree-data-ref.h (rdg_component): ...here.
7700 (struct rdg_edge): New field ddr_p relation.
7701 (RDGE_RELATION): New.
7702 (create_bb_after_loop, copy_loop_before,
7703 mark_nodes_having_upstream_mem_writes, rdg_build_components,
7704 rdg_build_partitions, dump_rdg_partitions,
7705 free_rdg_components): Declared.
7706
7707 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7708 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7709
7710 * tree-loop-streamization.c: New.
7711
7712 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7713 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7714
7715 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7716
7717 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7718
7719 * passes.c: Schedule pass_loop_streamization.
7720
77212008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
7722
7723 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7724 update comment.
7725
77262008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
7727
7728 * graphite.c (dot_all_scops): Update formatting.
7729 Bbs can now be part of more than one SCoP.
7730
77312008-03-04 Sebastian Pop <sebastian.pop@amd.com>
7732
7733 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7734 malloc problems.
7735 (loop_domain_dim): Check for unregistered toplev SCOP loop.
7736 * graphite.h (loop_to_cloog_loop): New.
7737
77382008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7739
7740 * graphite.c (loop_domain_dim, ref_nb_loops,
7741 loop_iteration_vector_dim): New.
7742 (build_access_matrix_with_af, build_access_matrix,
7743 initialize_dependence_polyhedron): Fixed for new matrix layout.
7744 No longer assume that all iteration domains are of the same
7745 dimensionality.
7746
77472008-03-02 Sebastian Pop <sebastian.pop@amd.com>
7748
7749 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7750 defined in a loop at depth 0 is invariant.
7751 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7752 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7753 be called at loop depth 0.
7754
7755 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7756 a parameter.
7757 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7758 (down_open_scop): Removed.
7759 (loop_in_scop_p): Redefined.
7760 (scop_affine_expr): New argument: scop.
7761 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
7762 a harmful statement ending a scop.
7763 (basic_block_simple_for_scop_p): New argument: scop.
7764 (get_loop_start): Removed.
7765 (new_scop): Initialize SCOP_LOOPS.
7766 (free_scop): Free SCOP_LOOPS.
7767 (succs_at_same_depth, preds_at_same_depth): New.
7768 (end_scop): Test the validity of a scop.
7769 (add_dominators_to_open_scops): New.
7770 (test_for_scop_bound): Call add_dominators_to_open_scops.
7771 Add cases for opening and closing multiple scops.
7772 (build_scops, build_scop_bbs): Iterate over basic blocks in
7773 depth first order.
7774 (build_graphite_bb): Pass scop directly.
7775 (dfs_bb_in_scop_p): New.
7776 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7777 several times.
7778 (nb_loops_around_gb): Use loop_in_scop_p.
7779 (schedule_to_scattering): Disabled for the moment the code computing
7780 the "textual order for outer loop".
7781
7782 * graphite.h (struct scop): New field loops.
7783 (SCOP_LOOPS): New.
7784 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7785
6c9df8cb 7786 * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
c6bb733d 7787
77882008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
7789 Sebastian Pop <sebastian.pop@amd.com>
7790
7791 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7792 * common.opt (fstreamize-loops): New.
7793 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7794 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7795 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7796 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7797
77982008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7799
7800 * tree-data-ref.c (build_empty_rdg): New.
7801 (build_rdg): Use it.
7802 * tree-data-ref.h (build_empty_rdg): Declared.
7803 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7804 (find_vertex_for_stmt): Removed.
7805 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7806
78072008-02-21 Sebastian Pop <sebastian.pop@amd.com>
7808
7809 * tree-loop-distribution.c (generate_builtin): After cancelling the
7810 loop tree, also delete basic blocks.
7811 (rdg_flag_uses): Stop recursion when a vertex has already been
7812 processed.
7813
78142008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7815
7816 * graphite.c (build_scop_alpha): Removed.
7817 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7818 and dump_dependence_graph to avoid compiler warnings.
7819
78202008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7821
7822 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7823 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7824 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7825 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7826 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7827 (initialize_dependence_polyhedron, find_vertex_for_stmt,
7828 initialize_data_dependence_polyhedron, is_empty_polyhedron,
7829 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7830 dump_dependence_graph): New.
7831 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7832 (GBB_ALPHA): New.
7833 (struct scop): New field loop2cloog_loop.
7834 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7835 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7836
78372008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
7838
7839 * graphite.c (build_graphite_bb): Fix initialization
7840 of the graphite basic block.
7841
78422008-02-05 Sebastian Pop <sebastian.pop@amd.com>
7843
7844 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7845 loop domain matrix. Pass in the number of loops contained in the
7846 constraint matrix.
7847 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7848 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7849 loops that are not surrounding the current loop are not represented
7850 in the domain constraint matrix.
7851 (build_scop_iteration_domain): Initial domain constraint matrix
7852 contains only the eq/ineq, cst, and scop parameters columns.
7853
78542008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7855
7856 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7857 (print_graphite_bb): Print scattering.
7858
78592008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7860
7861 * graphite.c (initialize_cloog_names): Initialize names of
7862 scattering variables.
7863
78642009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7865
7866 * graphite.c (dot_all_scops_1): Disable debug output while
7867 printing graph.
7868
78692008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
7870
7871 * graphite.c (find_transform): Change cloog output language to C.
7872
78732008-01-27 Sebastian Pop <sebastian.pop@amd.com>
7874
7875 * tree-loop-distribution.c (generate_memset_zero,
7876 generate_builtin, generate_code_for_partition,
7877 rdg_flag_all_uses): New.
7878 (rdg_flag_uses): Gather in the same partition the statements defining
7879 the VUSES of the current statement.
7880 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
7881 Gather in the same partition not only the stores to the same memory
7882 access, but also the reads.
7883 (ldist_generate_loops): Renamed ldist_gen.
7884
78852008-01-24 Sebastian Pop <sebastian.pop@amd.com>
7886 Tobias Grosser <grosser@fmi.uni-passau.de>
7887
7888 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
7889 next pointer, don't use the inner pointer.
7890
78912008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
7892
7893 * graphite.c (dot_all_scops, dot_all_scops_1): New.
7894 (find_transform): Call dot_all_1.
7895 * graphite.h (dot_all_scops): Declared.
7896
78972007-12-14 Sebastian Pop <sebastian.pop@amd.com>
7898
7899 * tree-loop-distribution.c: Fix apsi.f ICE.
7900 (create_bb_after_loop): New.
7901 (generate_loops_for_partition): Use it.
6c9df8cb 7902 * gfortran.dg/ldist-1.f90: New.
c6bb733d 7903
7904 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
7905 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
7906
79072007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7908
7909 * graphite.c (find_transform): Dump cloog program sent to cloog.
7910
79112007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7912
7913 * graphite.c (initialize_cloog_names): Initialize cloog
7914 iterator names.
7915
79162007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
7917
7918 * graphite.c (build_scop_context): Fix typo, for the matrix
7919 format: insert '0 >= 0' instead of '-1 >= 0'.
7920
79212007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7922
7923 * Fix merge problems.
7924
79252007-12-13 Sebastian Pop <sebastian.pop@amd.com>
7926
7927 * graphite.c (setup_cloog_loop): Fix typo.
7928
79292007-12-12 Sebastian Pop <sebastian.pop@amd.com>
7930
7931 * doc/invoke.texi (-ftree-loop-distribution): Documented.
7932 * tree-loop-distribution.c: Reimplemented.
7933 * tree-pass.h (pass_loop_distribution): New.
7934 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
7935 print_loops.
7936 * graphds.h (struct graph): New field indexes.
7937 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
7938
7939 * tree-vect-analyze.c: Remove declaration of static functions when not
7940 needed.
7941 * tree-vectorizer.c: Same.
7942 (rename_variables_in_loop): Now extern.
7943 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
7944 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
7945 calling redirect_edge_and_branch_force.
7946
7947 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
7948
7949 * tree-data-ref.c: Don't include tree-chrec.h.
7950 (debug_data_dependence_relations): New.
7951 (dump_data_dependence_relation): Call dump_data_reference on data refs
7952 in the relation.
7953 (same_access_functions): Moved...
7954 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
7955 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7956 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
7957 struct rdg_vertex_info, ): New.
7958 (create_rdg_edge_for_ddr): Compute the dependence level before looking
7959 at DDR_REVERSED_P.
7960 (create_rdg_vertices): Initialize the htab of graph->indexes.
7961 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
7962 (stmts_from_loop): Don't save LABEL_EXPR.
7963 (hash_stmt_vertex_info, eq_stmt_vertex_info,
7964 hash_stmt_vertex_del): New.
7965 (build_rdg): Initialize rdg->indexes.
7966 (free_rdg, stores_from_loop, ref_base_address,
7967 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
7968 have_similar_memory_accesses_1, ref_base_address_1,
7969 remove_similar_memory_refs): New.
7970
7971 * tree-data-ref.h: Include tree-chrec.h.
7972 (debug_data_dependence_relations): Declared.
7973 (same_access_functions): ...here. Now static inline.
7974 (ddr_is_anti_dependent, ddrs_have_anti_deps,
7975 ddr_dependence_level): New.
7976 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
7977 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
7978 RDG_MEM_READS_STMT): New.
7979 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
7980 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
7981 rdg_vertex_for_stmt): Declared.
7982 (struct rdg_edge): New field level.
7983 (RDGE_LEVEL, free_rdg): New.
7984 (stores_from_loop, remove_similar_memory_refs,
7985 rdg_defs_used_in_other_loops_p,
7986 have_similar_memory_accesses): Declared.
7987 (rdg_has_similar_memory_accesses): New.
7988
7989 * lambda.h (dependence_level): New.
7990 * common.opt (ftree-loop-distribution): New.
7991 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
7992 (print_loop_ir): Renamed print_loops.
7993 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
7994 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
7995 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
7996 (tree-loop-distribution.o): Added.
7997 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
7998 (mark_virtual_ops_in_bb): New.
7999 (print_loops_bb, debug_loop_num, debug_loop): New.
8000 * passes.c: Scheduled pass_loop_distribution.
8001
80022007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
8003
8004 * graphite.c (scan_tree_for_params): Correct the number of columns
8005 for polylib format.
8006 (nb_flat_iterator): New.
8007 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8008 (build_scop_iteration_domain): Correct the number of columns for
8009 polylib format.
8010
80112007-12-12 Sebastian Pop <sebastian.pop@amd.com>
8012
8013 * Merge from mainline (129697:130800).
8014
80152007-10-30 Sebastian Pop <sebastian.pop@amd.com>
8016
8017 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8018 dominated by SCoP's exit.
8019 (graphite_transform_loops): Compute post dominators.
8020
80212007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8022
8023 * Merge from mainline (127169:129697).
8024
80252007-10-28 Sebastian Pop <sebastian.pop@amd.com>
8026
8027 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
8028 parameter for the basic block that contains the expression. Use
8029 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8030 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8031 the expression.
8032 * graphite.h (gbb_loop): New.
8033 (GBB_LOOP): Removed.
8034
80352007-08-03 Sebastian Pop <sebpop@gmail.com>
8036
8037 * Makefile.in: Fix merge problem.
8038
80392007-08-03 Sebastian Pop <sebpop@gmail.com>
8040
8041 * Merge from mainline (125309:127169).
8042 * tree-loop-distribution.c: Disabled.
8043
80442007-06-05 Sebastian Pop <sebpop@gmail.com>
8045
8046 * Merge from mainline (r123693:125309).
8047
80482007-05-30 Sebastian Pop <sebpop@gmail.com>
8049
8050 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8051 correct_modify_p
8052 (correct_modify_p, check_statements, number_of_lvalue_uses,
8053 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8054 instead of MODIFY_EXPR.
8055 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
8056 and push new edges.
8057
80582007-05-24 Sebastian Pop <sebpop@gmail.com>
8059
8060 * tree-loop-distribution.c (struct rdg): Replace arrays by
8061 VECs for edges and vertices.
8062 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8063 (RDGV_NB_PARTITIONS): New.
8064 (PRDG_NBV, PRDG_NBE): Removed.
8065 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8066 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8067 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8068
80692007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
8070 Sebastian Pop <sebpop@gmail.com>
8071
8072 * doc/invoke.texi (-ftree-loop-distribution): Document.
8073 * tree-loop-distribution.c: New file.
8074 * tree-pass.h (pass_loop_distribution): Declared.
8075 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8076 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8077 and set reversed_p.
8078 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8079 (DDR_REVERSED_P): New.
8080 * common.opt (-ftree-loop-distribution): New.
8081 * tree-flow.h (distribute_loops): Declared.
8082 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8083 * passes.c (init_optimization_passes): Schedule loop distribution.
8084
80852007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
8086
8087 * graphite.c (print_graphite_bb): Don't call dump_data_references.
8088 (print_scop): Don't print when scop is NULL.
8089 (build_scop_context, find_transform): Don't output to stderr.
8090
80912007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
8092
8093 * tree-data-ref.c: Don't include graphite.h.
8094 Comment out the code for printing data reference's scop.
8095 (build_access_matrix_with_af): Moved...
8096 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8097 * graphite.c (build_access_matrix_with_af): ... here. Now static.
8098 (print_graphite_bb): Print basic block's schedule.
8099 (print_scop): Don't print the schedule, call cloog's pretty printer.
8100 (bb_in_scop_p): A basic block is in a scop only if it is both
8101 dominated and postdominated by the scop's entry and exit basic blocks.
8102 (function_parameter_p): New.
8103 (invariant_in_scop_p): Use function_parameter_p.
8104 (new_scop, save_scop): New.
8105 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8106 save_scop.
8107 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8108 (loop_in_scop_p): New.
8109 (scop_record_loop): Use loop_in_scop_p.
8110 (build_scop_domain): Renamed build_scop_iteration_domain.
8111 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8112 nb_params_in_scop, build_scop_context, first_loop_in_scop,
8113 setup_cloog_loop, dot_scop_1, dot_scop): New.
8114 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8115 (struct scop): Add a pointer to cloog's representation of a program.
8116
81172007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8118
8119 * doc/invoke.texi (-ftree-check-verbose): Renamed
8120 -ftree-checks-verbose.
8121 * common.opt (flag_tree_check_verbose): Renamed
8122 flag_tree_checks_verbose.
8123 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8124
81252007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
8126
8127 * configure: Regenerated.
8128 * config.in: Regenerated.
8129 * tree-ssa-loop.c (graphite_transforms): Execute
8130 graphite_transform_loops only when HAVE_cloog.
8131 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8132 * graphite.c: Include polylibgmp.h and cloog.h.
8133 (graphite_transform_loops): Removed loops parameter.
8134 * tree-flow.h (graphite_transform_loops): Update declaration.
8135 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8136 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8137 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8138 (OBJS-common): Remove dependence on graphite.o.
8139 (BACKEND): Depend on @GRAPHITE@.
8140
81412007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
8142
8143 * doc/invoke.texi (-ftree-check-verbose): Documented.
6c9df8cb 8144 * gcc.dg/tree-checker/tree-checks-1.c: New.
8145 * gcc.dg/tree-checker/tree-checks-2.c: New.
8146 * gcc.dg/tree-checker/tree-checks-3.c: New.
8147 * gcc.dg/tree-checker/tree-checks-4.c: New.
8148 * gcc.dg/tree-checker/tree-checks.exp: New.
8149 * gcc.dg/tree-checker/condates.crp: New.
c6bb733d 8150 * common.opt (ftree-checks-verbose): New.
8151 * tree-check.c (tree_check_warning): Move extra stderr output
8152 under control of flag_tree_check_verbose.
8153
81542007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
8155
8156 * tree-match.c: Fix comments formatting.
8157 * tree-match.h: Fix comments formatting.
8158 * tree-check.c: Fix comments formatting.
8159 (tree_check_init): Restructure.
8160
81612007-04-12 Nic Volanschi <nic.volanschi@free.fr>
8162
8163 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8164
81652007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
8166
8167 * Merge from mainline (r120733:123693).
8168
81692007-03-20 Nic Volanschi <nic.volanschi@free.fr>
8170
8171 * condate.y: New file.
8172 * tree-match.h (struct patt_info_s): New field sign.
8173 (struct condate_s): New field msg.
8174 (normalize_condate, name_condate, add_condate): New.
8175 (conds[], condate_parse): Made extern.
8176 * tree-check.c (tree_check_warning): First arg changed to cond;
8177 warning reformatted.
8178 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8179 (tree_scan): New.
8180 (tree_check): Process trivial condates.
8181 (read_delimited_string): Removed.
8182 (print_cond): Print name and msg.
8183 (conds[]): Made extern.
8184 (parse_tree_check_file_once): Rewritten to use the parser in
8185 condate.y.
8186 Processing of option --tree_check_string moved to tree_scan().
8187 * Makefile.in: Added condate.y
8188
81892007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
8190
8191 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8192 Use VECs instead of varrays.
8193 * diagnostic.h (lazy_dump_generic_node): Update declaration.
8194 * Makefile.in (pretty-print.o): Depend on vec.h.
8195 * pretty-print.c: Include tree.h and vec.h.
8196 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8197 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8198 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8199 pp_free_list): Use VECs instead of varrays.
8200 * pretty-print.h: Do not include varray.h.
8201 (struct tree_chunk_s): Declaration moved before its use.
8202 (output_buffer): Rename varray field to chunks.
8203 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8204 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8205 save_global_holes): Use VECs instead of varrays.
8206 * tree-match.h: Declare VECs of cfg_node, and hole_p.
8207 * tree-check.c (scan_cfg_stmts, push_node,
8208 print_matching_stmt): Removed.
8209 (tree_check_instance, push_global_holes_if_new, tree_check,
8210 execute_tree_check): Use VECs instead of varrays.
8211 (gate_tree_check): Don't execute the CFG check when basic_block_info
8212 is not available.
8213
82142007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8215
8216 * Merge from mainline (r115016:120733).
8217
82182007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8219
8220 * Merge from mainline (r117632:117661).
8221
82222007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
8223
8224 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8225 * tree-pass.h (TDF_DEBUG, debug_p): New.
8226 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8227 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8228 get_loop_exit_condition, analyze_evolution_in_loop,
8229 analyze_initial_condition, analyze_scalar_evolution,
8230 instantiate_parameters, number_of_latch_executions): Use debug_p.
8231 * tree-chrec.c (chrec_apply): Use debug_p.
8232 * tree-data-ref.c: Include graphite.h.
8233 (dump_data_reference): Print also the access matrix.
8234 (analyze_array, analyze_indirect_ref, init_data_ref,
8235 analyze_offset_expr, address_analysis, object_analysis,
8236 create_data_ref, finalize_ddr_dependent,
8237 non_affine_dependence_relation, analyze_ziv_subscript,
8238 analyze_siv_subscript_cst_affine,
8239 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8240 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8241 analyze_miv_subscript, analyze_overlapping_iterations,
8242 build_classic_dist_vector, subscript_dependence_tester,
8243 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8244 (build_access_matrix_with_af): No longer static.
8245 * tree-data-ref.h (scop_p): ... declaration here.
8246 (data_reference.scop): New field.
8247 (DR_SCOP, DR_ACCESS_MATRIX): New.
8248 (build_access_matrix_with_af, dr_num_subscripts): Declared.
8249 * graphite.c (print_graphite_bb): Call dump_data_references.
8250 (print_scop): Use scop_nb_loops and scop_dim_domain.
8251 (test_for_scop_bound): Use debug_p.
8252 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8253 scop_nb_params.
8254 (scop_loop_index): Moved...
8255 (scop_record_loop): New.
8256 (build_scop_loop_nests): Use scop_record_loop.
8257 (build_scop_domain): Use scop_dim_domain.
8258 (build_access_matrix): Implemented.
8259 (build_scop_canonical_schedules): Use scop_nb_loops.
8260 (build_graphite_bb): Initialize GBB_SCOP.
8261 * graphite.h (scop_p): Moved...
8262 (graphite_bb.scop): New field.
8263 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8264 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8265 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8266 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8267 scop_loop_index): New.
8268 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8269
82702007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
8271
8272 * Merge from mainline (r117661:120450).
8273
82742006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
8275
8276 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8277 at the first declaration outside the varying loop, instantiate as
8278 far as possible.
8279 * tree-chrec.c (for_each_scev_op): New.
8280 * tree-chrec.h (for_each_scev_op): Declared.
8281 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8282 * tree-data-ref.c (get_references_in_stmt,
8283 find_data_references_in_stmt): New, from trunk.
8284 (find_data_references_in_loop): Use get_references_in_stmt
8285 and find_data_references_in_loop, modified as in trunk.
8286 (build_access_matrix_with_af): New.
8287 * tree-data-ref.h (data_reference): Add a field access_matrix.
8288 (data_ref_loc): New, as in trunk.
8289 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8290 invariant_in_scop_p, param_index, scan_tree_for_params,
8291 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8292 idx_record_param, idx_record_params, build_access_matrix,
8293 build_scop_data_accesses, build_scop_canonical_schedules,
8294 build_graphite_bb, build_scop_bbs, find_params_in_bb,
8295 build_scop_params): New.
8296 * graphite.h (graphite_bb): New.
8297 (scop): Add fields static_schedule, params, loop_nest,
8298 iteration_domain.
8299 * lambda.h: Declare vecs of lambda_matrix.
8300 * tree-flow.h (print_loop_ir_bb): Declared.
8301 * tree-cfg.c (print_loop_ir_bb): New.
8302 (print_loop): Use print_loop_ir_bb.
8303
83042006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
8305
8306 * Merge from mainline (r115016:117632).
8307
83082006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
8309
8310 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8311 break due to a warning.
8312
83132006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
8314
8315 * graphite.c (print_scops, debug_scops): New.
8316 (graphite_transform): Renamed graphite_find_transform.
8317 * graphite.h (debug_scops): Declared.
8318
83192006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
8320
8321 * tree-match.c: Reformat following the GNU style.
8322 * tree-match.h: Reformat following the GNU style.
8323 * tree-pattern.h: Removed empty file.
8324 * Makefile.in: Remove references to tree-pattern.h.
8325 * tree-check.c: Reformat following the GNU style.
8326 (execute_tree_check): Move gate condition code to...
8327 (gate_tree_check): ...here. New function.
8328 (pass_check): Use the gate function.
8329
83302006-07-04 Nic Volanschi <nic.volanschi@free.fr>
8331
8332 * tree-pattern.h: New. Tree pattern matching and checking using
8333 concrete syntax.
8334 * tree-check.c: New. Tree/CFG checking pass.
8335 * tree-match.c: New. Library for tree pattern matching.
8336 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8337 * toplev.c, flags.h: Add globals for tree-check pass.
8338 * Makefile.in: Integrate the files in tree-check pass.
8339 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8340 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8341 Introduce a "lazy" pretty-print mode.
8342 * tree.c, tree.h: Add tree_name.
8343
83442006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
8345
8346 * doc/invoke.texi (-fgraphite): Correct typo.
8347 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8348 use of print_loop_ir.
6c9df8cb 8349 * gcc.dg/graphite/scop-1.c: New.
8350 * gcc.dg/graphite/scop-2.c: New.
8351 * gcc.dg/graphite/graphite.exp: New.
c6bb733d 8352 * graphite.c: Include domwalk.h.
8353 (print_scop): Print only the entry and exit blocks.
8354 (debug_scop): No longer static.
8355 (affine_expr): Fix formating. Return also true when the expression is
8356 constant.
8357 (stmt_simple_for_scop_p): Fix formating.
8358 (build_scops): Use domwalk.
8359 (get_loop_start, end_scop, test_for_scop_bound): New.
8360 (graphite_transform_loops): Avoid printing on stderr.
8361 * graphite.h (debug_scop): Declared.
8362 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8363 * Makefile.in (graphite.o): Depend on domwalk.h.
8364 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8365 declarations for static functions.
8366 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8367 controlling output verbosity.
8368
83692006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
8370 Plesco Alexandru <shurikx@gmail.com>
8371
8372 * doc/invoke.texi (-fgraphite): Document.
8373 * tree-pass.h (pass_graphite_transforms): Declared.
8374 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8375 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8376 (pass_graphite_transforms): Defined.
8377 * tree-data-ref.c (free_data_ref, data_reference): Extern.
8378 * tree-data-ref.h (free_data_ref, data_reference): Declared.
8379 * graphite.c, graphite.h: New.
8380 * common.opt (fgraphite): Declared.
8381 * tree-flow.h (graphite_transform_loops): Declared.
8382 * Makefile.in (OBJS-common): Add graphite.o.
8383 (graphite.o): New rule.
8384 * passes.c (pass_graphite_transforms): Scheduled.
8385