From 6c6f84d77276e4edd3abc52e7a19b6c6881ef6d7 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Wed, 25 Nov 2009 05:25:43 +0000 Subject: [PATCH] graphite-clast-to-gimple.c (gloog): Do not call sese_reset_aux_in_loops. 2009-10-26 Sebastian Pop * graphite-clast-to-gimple.c (gloog): Do not call sese_reset_aux_in_loops. * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an extra argument for domains. Do not use loop->aux. (build_scop_iteration_domain): Initialize and free domains, pass it to build_loop_iteration_domains and extract the information from domains. Do not use loop->aux. * sese.c (sese_reset_aux_in_loops): Removed. * sese.h (sese_reset_aux_in_loops): Removed. From-SVN: r154627 --- gcc/ChangeLog.graphite | 12 ++++++++++++ gcc/graphite-clast-to-gimple.c | 1 - gcc/graphite-sese-to-poly.c | 32 ++++++++++++++++++-------------- gcc/sese.c | 12 ------------ gcc/sese.h | 1 - 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 4da7e865a05..e67bce75c10 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,15 @@ +2009-10-26 Sebastian Pop + + * graphite-clast-to-gimple.c (gloog): Do not call + sese_reset_aux_in_loops. + * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an + extra argument for domains. Do not use loop->aux. + (build_scop_iteration_domain): Initialize and free domains, pass it + to build_loop_iteration_domains and extract the information from + domains. Do not use loop->aux. + * sese.c (sese_reset_aux_in_loops): Removed. + * sese.h (sese_reset_aux_in_loops): Removed. + 2009-10-26 Sebastian Pop * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up. diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 96fb4318e39..85941908663 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -1193,7 +1193,6 @@ gloog (scop_p scop, htab_t bb_pbb_mapping) if_region->true_region->entry, rename_map, &newivs, newivs_index, bb_pbb_mapping, 1); - sese_reset_aux_in_loops (region); graphite_verify (); sese_adjust_liveout_phis (region, rename_map, if_region->region->exit->src, diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 8adffce20c3..d3a24037954 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -1066,7 +1066,8 @@ gbb_from_bb (basic_block bb) static void build_loop_iteration_domains (scop_p scop, struct loop *loop, - ppl_Polyhedron_t outer_ph, int nb) + ppl_Polyhedron_t outer_ph, int nb, + ppl_Pointset_Powerset_C_Polyhedron_t *domains) { int i; ppl_Polyhedron_t ph; @@ -1205,15 +1206,15 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop, gcc_unreachable (); if (loop->inner && loop_in_sese_p (loop->inner, region)) - build_loop_iteration_domains (scop, loop->inner, ph, nb + 1); + build_loop_iteration_domains (scop, loop->inner, ph, nb + 1, domains); if (nb != 0 && loop->next && loop_in_sese_p (loop->next, region)) - build_loop_iteration_domains (scop, loop->next, outer_ph, nb); + build_loop_iteration_domains (scop, loop->next, outer_ph, nb, domains); ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron - ((ppl_Pointset_Powerset_C_Polyhedron_t *) &loop->aux, ph); + (&domains[loop->num], ph); ppl_delete_Polyhedron (ph); } @@ -1592,31 +1593,34 @@ build_scop_iteration_domain (scop_p scop) int i; ppl_Polyhedron_t ph; poly_bb_p pbb; + int nb_loops = number_of_loops (); + ppl_Pointset_Powerset_C_Polyhedron_t *domains + = XNEWVEC (ppl_Pointset_Powerset_C_Polyhedron_t, nb_loops); + + for (i = 0; i < nb_loops; i++) + domains[i] = NULL; ppl_new_C_Polyhedron_from_space_dimension (&ph, scop_nb_params (scop), 0); for (i = 0; VEC_iterate (loop_p, SESE_LOOP_NEST (region), i, loop); i++) if (!loop_in_sese_p (loop_outer (loop), region)) - build_loop_iteration_domains (scop, loop, ph, 0); + build_loop_iteration_domains (scop, loop, ph, 0, domains); for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) - if (gbb_loop (PBB_BLACK_BOX (pbb))->aux) + if (domains[gbb_loop (PBB_BLACK_BOX (pbb))->num]) ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron (&PBB_DOMAIN (pbb), (ppl_const_Pointset_Powerset_C_Polyhedron_t) - gbb_loop (PBB_BLACK_BOX (pbb))->aux); + domains[gbb_loop (PBB_BLACK_BOX (pbb))->num]); else ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (&PBB_DOMAIN (pbb), ph); - for (i = 0; VEC_iterate (loop_p, SESE_LOOP_NEST (region), i, loop); i++) - if (loop->aux) - { - ppl_delete_Pointset_Powerset_C_Polyhedron - ((ppl_Pointset_Powerset_C_Polyhedron_t) loop->aux); - loop->aux = NULL; - } + for (i = 0; i < nb_loops; i++) + if (domains[i]) + ppl_delete_Pointset_Powerset_C_Polyhedron (domains[i]); ppl_delete_Polyhedron (ph); + free (domains); } /* Add a constrain to the ACCESSES polyhedron for the alias set of diff --git a/gcc/sese.c b/gcc/sese.c index 917adbdf256..76c92bd08b7 100644 --- a/gcc/sese.c +++ b/gcc/sese.c @@ -1458,18 +1458,6 @@ move_sese_in_condition (sese region) return if_region; } -/* Reset the loop->aux pointer for all loops in REGION. */ - -void -sese_reset_aux_in_loops (sese region) -{ - int i; - loop_p loop; - - for (i = 0; VEC_iterate (loop_p, SESE_LOOP_NEST (region), i, loop); i++) - loop->aux = NULL; -} - /* Returns the scalar evolution of T in REGION. Every variable that is not defined in the REGION is considered a parameter. */ diff --git a/gcc/sese.h b/gcc/sese.h index ca167f53ce6..73d5adec45d 100644 --- a/gcc/sese.h +++ b/gcc/sese.h @@ -68,7 +68,6 @@ extern edge copy_bb_and_scalar_dependences (basic_block, sese, edge, htab_t); extern struct loop *outermost_loop_in_sese (sese, basic_block); extern void insert_loop_close_phis (htab_t, loop_p); extern void insert_guard_phis (basic_block, edge, edge, htab_t, htab_t); -extern void sese_reset_aux_in_loops (sese); extern tree scalar_evolution_in_region (sese, loop_p, tree); /* Check that SESE contains LOOP. */