This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/42777] New: [graphite] loop interchange heuristic is broken
- From: "spop at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2010 16:20:59 -0000
- Subject: [Bug middle-end/42777] New: [graphite] loop interchange heuristic is broken
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Starting from r155273: Fix fall outs from Fix-PR42334.
2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42178
PR middle-end/42334
* graphite-interchange.c (lst_try_interchange): Do not increment the
the OUTER index when there is no AFTER kernel. Do not increment the
OUTER index for after processing the AFTER kernel.
(lst_interchange_select_inner): Call lst_try_interchange only on loops.
(lst_interchange_select_outer): Do not pass in a pointer to the OUTER
index. Do not pass to lst_interchange_select_inner the OUTER index.
(scop_do_interchange): Update use of lst_interchange_select_outer.
* testsuite/gfortran.dg/graphite/graphite.exp
(DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
* testsuite/gfortran.dg/graphite/interchange-1.f: Add comment. Clean
the graphite dump file.
* testsuite/gfortran.dg/graphite/interchange-2.f: Same.
* testsuite/gfortran.dg/graphite/pr42334-1.f: New.
and with r155248: Fix PR42334: correct the update of the LST on loop
interchange and distribution.
2009-12-15 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42178
PR middle-end/42334
* graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
that are empty.
(lst_do_interchange_1): Renamed lst_interchange_select_inner.
(lst_try_interchange): Reimplemented.
(lst_interchange_select_inner): Same.
(lst_do_interchange): Renamed lst_interchange_select_outer.
Reimplemented.
(scop_do_interchange): Update use of lst_interchange_select_outer.
* testsuite/g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
* testsuite/gcc.dg/graphite/block-0.c: Un-XFAILed.
* testsuite/gcc.dg/graphite/pr42211.c: New.
* testsuite/gfortran.dg/graphite/pr42334.f90: New.
we have at least one benchmark in {calculix,gamess,mcf} from the
SPEC2006 that performs more than 20% slower at -O2 than at -O2
-fno-{graphite,loop-interchange,...} on the graphite branch: see the
recent test on http://groups.google.com/group/gcc-graphite-test
I am suspecting the heuristic of loop interchange to be in fault here,
as the above commit was fixing the traversal of the loops where the
interchange is applied.
--
Summary: [graphite] loop interchange heuristic is broken
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: spop at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42777