diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-25 04:48:51 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-25 04:48:51 +0000 |
commit | ae11f03bac138ee5e7c74c96bf4b4ec91daa419a (patch) | |
tree | c3a3e11e113cb3a461256142830a77efb4b05a37 /gcc/graphite-dependences.c | |
parent | e5d72697a63fb5fba97fa1f1027d765cc17a0711 (diff) | |
download | gcc-ae11f03bac138ee5e7c74c96bf4b4ec91daa419a.tar.gz |
2009-09-17 Li Feng <nemokingdom@gmail.com>
PR middle-end/41118
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154549 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-dependences.c')
-rw-r--r-- | gcc/graphite-dependences.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index 7fce3b331e7..f7b8c737daf 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-dependences.c @@ -494,8 +494,12 @@ dependence_polyhedron (poly_bb_p pbb1, poly_bb_p pbb2, return res; } +static bool +poly_drs_may_alias_p (poly_dr_p pdr1, poly_dr_p pdr2); + /* Returns the PDDR corresponding to the original schedule, or NULL if - the dependence relation is empty. */ + the dependence relation is empty or unknown (Can't judge dependency + under polyhedral model. */ static poly_ddr_p pddr_original_scattering (poly_bb_p pbb1, poly_bb_p pbb2, @@ -507,8 +511,9 @@ pddr_original_scattering (poly_bb_p pbb1, poly_bb_p pbb2, ppl_Polyhedron_t so1 = PBB_ORIGINAL_SCATTERING (pbb1); ppl_Polyhedron_t so2 = PBB_ORIGINAL_SCATTERING (pbb2); - if (PDR_NB_SUBSCRIPTS (pdr1) != PDR_NB_SUBSCRIPTS (pdr2) - || (pdr_read_p (pdr1) && pdr_read_p (pdr2))) + if ((pdr_read_p (pdr1) && pdr_read_p (pdr2)) + || PDR_BASE_OBJECT_SET (pdr1) != PDR_BASE_OBJECT_SET (pdr2) + || PDR_NB_SUBSCRIPTS (pdr1) != PDR_NB_SUBSCRIPTS (pdr2)) return NULL; pddr = dependence_polyhedron (pbb1, pbb2, d1, d2, pdr1, pdr2, so1, so2, @@ -706,14 +711,19 @@ graphite_carried_dependence_level_k (poly_dr_p pdr1, poly_dr_p pdr2, ppl_dimension_type dim; bool empty_p; poly_ddr_p pddr; + int obj_base_set1 = PDR_BASE_OBJECT_SET (pdr1); + int obj_base_set2 = PDR_BASE_OBJECT_SET (pdr2); - if ((PDR_TYPE (pdr1) == PDR_READ && PDR_TYPE (pdr2) == PDR_READ) + if ((pdr_read_p (pdr1) && pdr_read_p (pdr2)) || !poly_drs_may_alias_p (pdr1, pdr2)) return false; - if (PDR_NB_SUBSCRIPTS (pdr1) != PDR_NB_SUBSCRIPTS (pdr2)) + if (obj_base_set1 != obj_base_set2) return true; + if (PDR_NB_SUBSCRIPTS (pdr1) != PDR_NB_SUBSCRIPTS (pdr2)) + return false; + pddr = dependence_polyhedron (pbb1, pbb2, d1, d2, pdr1, pdr2, so1, so2, true, false); |