[Bug tree-optimization/41118] Wrong dependence analysis in graphite for unrestricted pointers
--- Comment #3 from lifeng at gcc dot gnu dot org 2009-09-20 10:47 --- We should check if 2 data reference are with the same base object before checking dependency. This bug has been fix. Now has committed to Graphite branch. http://gcc.gnu.org/viewcvs?view=revision&revision=151801 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition. (pddr_original_scattering): Make sure 2 pdr2 in the same base object set. (graphite_carried_dependence_level_k): Ditto. * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET. * graphite-poly.h (struct poly_dr): Add member dr_base_object_set. (new_poly_dr): Adjust declaration. * graphite-sese-to-poly.c (free_data_refs_aux): New. (free_gimple_bb): Added free_data_refs_aux. (build_poly_dr): Add dr_base_object_set. (partition_drs_to_sets): New. (dr_same_base_object_p): New. (build_alias_set_for_drs): New. (build_base_object_set_for_drs): New. (build_scop_drs): Add build_base_obj_set_for_drs. * graphite-sese-to-poly.h: Added #define for alias set number index and base object set index. * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests. * libgomp/testsuite/libgomp.graphite/pr4118.c: New. -- lifeng at gcc dot gnu dot org changed: What|Removed |Added CC| |lifeng at gcc dot gnu dot | |org Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41118
[Bug middle-end/41924] New: graphite miscompiles aermod
http://www.polyhedron.com/web_images/documents/pb05.zip the testers report this: aermod FAILED1 fails and5 passes [...] Finished Testing 16 benchmarks - 15 passed, and 1 failed -- I have reduced the aermod problem in polyhedron benchmark. It seems that the cloog generate the wrong code for a simple case... ---Reduced fortran code MODULE MAIN1 REAL , ALLOCATABLE :: HRVALD(:) END MODULE MAIN1 SUBROUTINE VOLCALC() USE MAIN1 INTEGER :: ITYP LOGICAL :: WETSCIM DO ITYP = 1 , 100 IF ( WETSCIM ) HRVALD(ITYP) = 0.0 ENDDO END SUBROUTINE VOLCALC - Equivalent C code int hrval[101]; void volcalc() { int i; int wetscim; for (i = 0; i < 100; i++) if (wetscim) hrval[i] = 0; } -- (gdb) set debug_generated_program (scop) if (wetscim_3 <= -1) { for (scat_1=0;scat_1<=99;scat_1++) { S4(scat_1) ; } } if (wetscim_3 >= 1) { for (;;scat_1++) { for (git_0=0;git_0<=99;git_0++) { S4(git_0) ; } } } (gdb) set debug_scop (scop) scop ( parameters ( p_0 -> wetscim_3(D) ) context ( # eq p0cst 0 3 ) pbb_4 ( conditions bb_4 (if (wetscim_3(D) != 0) ) cases bb_4 (if (wetscim_3(D) != 0) ) pdr_0 (write (Data Ref: stmt: hrval[i_11] = 0; ref: hrval[i_11]; base_object: hrval[0]; Access function 0: {0, +, 1}_1 ) data accesses ( # eq i0 p0 alias sub0cst 4 6 0 1 0 0 -1 0 0 0 0 1 0 -1 1 -1 0 0 0100 1 1 0 0 0 0 ) ) domains bb_4 ( # eq i0 p0cst 3 4 1 -1 0 99 1 1 0 0 1 0 -1 -1 3 4 1 -1 0 99 1 1 0 0 1 0 1 -1 ) scattering bb_4 ( # eq s0 s1 s2 i0 p0cst 3 7 0 1 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 1 0 0 0 ) ) original_lst ( (root 0 (loop 0 stmt_4))) transformed_lst ( (root 0 (loop 0 stmt_4))) ) -- Summary: graphite miscompiles aermod Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lifeng at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41924
[Bug middle-end/41924] graphite miscompiles aermod
--- Comment #2 from lifeng at gcc dot gnu dot org 2009-11-05 02:38 --- (In reply to comment #1) > What are the options that you used to produce this? > I am not able to reproduce the failing clast with -O2, nor with -O3 with the > current graphite branch. I produce this with -O2. It seems I use the wrong version of cloog-ppl. I'll check this later. -- lifeng at gcc dot gnu dot org changed: What|Removed |Added CC| |lifeng at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41924