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