This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch][graphite] Rewrite of "out of graphite"
- From: "Sebastian Pop" <sebpop at gmail dot com>
- To: "Jack Howarth" <howarth at bromo dot med dot uc dot edu>
- Cc: "Richard Guenther" <rguenther at suse dot de>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Diego Novillo" <dnovillo at google dot com>, "Daniel Berlin" <dberlin at dberlin dot org>, "Sjodin, Jan" <Jan dot Sjodin at amd dot com>, "Jagasia, Harsha" <harsha dot jagasia at amd dot com>, "Christophe Harle" <christophe dot harle at amd dot com>, "Tobias Grosser" <grosser at fim dot uni-passau dot de>, "Albert Cohen" <Albert dot Cohen at inria dot fr>, "Konrad Trifunovic" <konrad dot trifunovic at gmail dot com>
- Date: Wed, 3 Dec 2008 13:48:20 -0600
- Subject: Re: [patch][graphite] Rewrite of "out of graphite"
- References: <cb9d34b20812022354w2a41bcfeg796ca952c7006e40@mail.gmail.com> <alpine.LNX.2.00.0812031113460.5167@zhemvz.fhfr.qr> <cb9d34b20812031044v6baedb97oa1da7fe0f976acdb@mail.gmail.com> <20081203185716.GA18172@bromo.med.uc.edu> <cb9d34b20812031133m47c65b6ei120e4ea2cc1a60c9@mail.gmail.com>
On Wed, Dec 3, 2008 at 1:33 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> There are still 3 bugs left for building polyhedron benchmarks:
> id-{2,3,4}.f90. I'm working on id-4.f90, Tobias and Dwarak are going
> to work on id-3.f90 that is a fail in the scop detection: sd_region.
>
Here is the fix for id-4.f90. Committed to graphite branch, waiting for review
to commit to trunk.
Sebastian Pop
--
AMD - GNU Tools
2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
Fix testsuite/gfortran.dg/graphite/id-4.f90.
* graphite.c (scan_tree_for_params): Do not compute the multiplicand
when not needed.
Index: graphite.c
===================================================================
--- graphite.c (revision 142403)
+++ graphite.c (working copy)
@@ -2324,26 +2324,28 @@ scan_tree_for_params (scop_p s, tree e,
case MULT_EXPR:
if (chrec_contains_symbols (TREE_OPERAND (e, 0)))
{
- Value val;
-
- gcc_assert (host_integerp (TREE_OPERAND (e, 1), 0));
-
- value_init (val);
- value_set_si (val, int_cst_value (TREE_OPERAND (e, 1)));
- value_multiply (k, k, val);
- value_clear (val);
+ if (c)
+ {
+ Value val;
+ gcc_assert (host_integerp (TREE_OPERAND (e, 1), 0));
+ value_init (val);
+ value_set_si (val, int_cst_value (TREE_OPERAND (e, 1)));
+ value_multiply (k, k, val);
+ value_clear (val);
+ }
scan_tree_for_params (s, TREE_OPERAND (e, 0), c, r, k, subtract);
}
else
{
- Value val;
-
- gcc_assert (host_integerp (TREE_OPERAND (e, 0), 0));
-
- value_init (val);
- value_set_si (val, int_cst_value (TREE_OPERAND (e, 0)));
- value_multiply (k, k, val);
- value_clear (val);
+ if (c)
+ {
+ Value val;
+ gcc_assert (host_integerp (TREE_OPERAND (e, 0), 0));
+ value_init (val);
+ value_set_si (val, int_cst_value (TREE_OPERAND (e, 0)));
+ value_multiply (k, k, val);
+ value_clear (val);
+ }
scan_tree_for_params (s, TREE_OPERAND (e, 1), c, r, k, subtract);
}
break;