diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-12 14:23:01 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-12 14:23:01 +0000 |
commit | a741358d2ef4498e2c72c96fe5a45a333478489f (patch) | |
tree | ea44f243fde73312dfa71681281a6fb0189704fc /gcc/graphite-blocking.c | |
parent | 95b2e0d363a0f078a9f37c6f2f33f620eee2aa99 (diff) | |
download | gcc-a741358d2ef4498e2c72c96fe5a45a333478489f.tar.gz |
Restore original scattering when the transform is not legal.
2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
Early return without analyzing the data dependences if no
transform has been done. Call restore_scattering if the transform
is not legal.
(graphite-interchange.c): Same.
* graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
(graphite_read_transforms): Initialize PBB_TRANSFORMED.
(apply_poly_transforms): Do not gcc_assert that
the transform is legal.
(new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
(free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
* graphite-poly.h (struct poly_scattering): New.
(struct poly_bb): Add original, transformed, and saved fields.
Remove transformed_scattering, original_scattering, nb_local_variables,
and nb_scattering_transform fields.
(PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
(poly_scattering_new): New.
(poly_scattering_free): New.
(poly_scattering_copy): New.
(store_scattering_pbb): New.
(store_scattering): New.
(restore_scattering_pbb): New.
(restore_scattering): New.
* graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150686 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-blocking.c')
-rw-r--r-- | gcc/graphite-blocking.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c index 4961c7f6d5a..45f3bc6c629 100644 --- a/gcc/graphite-blocking.c +++ b/gcc/graphite-blocking.c @@ -201,10 +201,21 @@ scop_do_strip_mine (scop_p scop) int i; bool transform_done = false; + store_scattering (scop); + for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb); i++) transform_done |= pbb_do_strip_mine (pbb); - return transform_done; + if (!transform_done) + return false; + + if (!graphite_legal_transform (scop)) + { + restore_scattering (scop); + return false; + } + + return true; } #endif |