summaryrefslogtreecommitdiff
path: root/gcc/graphite-optimize-isl.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-07 01:32:27 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-07 01:32:27 +0000
commit3c7086accbf63ed7fc3381dbea1a84b4d1ce5b6d (patch)
tree32104e688dc8f9ffb5f432b9e2a565d4fdc3e700 /gcc/graphite-optimize-isl.c
parent277e6866c1a6ef5390b97667b6e757f3b22798c3 (diff)
downloadgcc-3c7086accbf63ed7fc3381dbea1a84b4d1ce5b6d.tar.gz
add original schedule to scop
* graphite-optimize-isl.c (optimize_isl): Call isl_union_map_is_equal. * graphite-poly.c (new_scop): Initialize original_schedule. (free_scop): Free original_schedule. * graphite-poly.h (struct scop): Add field original_schedule. * graphite-sese-to-poly.c (build_scop_original_schedule): New. (build_poly_scop): Call build_scop_original_schedule. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-optimize-isl.c')
-rw-r--r--gcc/graphite-optimize-isl.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c
index 0d859759da1..c09264bf093 100644
--- a/gcc/graphite-optimize-isl.c
+++ b/gcc/graphite-optimize-isl.c
@@ -441,11 +441,23 @@ optimize_isl (scop_p scop)
#else
isl_union_map *schedule_map = get_schedule_map (schedule);
#endif
- apply_schedule_map_to_scop (scop, schedule_map);
- isl_schedule_free (schedule);
- isl_union_map_free (schedule_map);
- return true;
+ if (isl_union_map_is_equal (scop->original_schedule, schedule_map))
+ {
+ if (dump_file && dump_flags)
+ fprintf (dump_file, "\nISL schedule same as original schedule\n");
+
+ isl_schedule_free (schedule);
+ isl_union_map_free (schedule_map);
+ return false;
+ }
+ else
+ {
+ apply_schedule_map_to_scop (scop, schedule_map);
+ isl_schedule_free (schedule);
+ isl_union_map_free (schedule_map);
+ return true;
+ }
}
#endif /* HAVE_isl */