summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-08 22:18:11 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-08 22:18:11 +0000
commitfa4dba85a6100b242df3b2b64d09e06a2bdba4a2 (patch)
tree4ae633205ff90db31f378cc5d617287718e64532 /libgomp
parent0a259d8df4868ae323c2825c7d367a9cb657548f (diff)
downloadgcc-fa4dba85a6100b242df3b2b64d09e06a2bdba4a2.tar.gz
Remove limit_scops
This patch removes graphite-scop-detection.c:limit_scops function and fix related issues arising because of that. The functionality limit_scop was added as an intermediate step to discard the loops which graphite could not handle. Removing limit_scop required handling of different cases of loops and surrounding code. The scop is now larger so most test cases required 'number of scops detected' to be fixed. By increasing the size of scop we can now optimize loops which are 'siblings' of each other. This could enable loop fusion on a number of loops. Since in the graphite framework we mostly want to opimize loop-nests/adjacent-loops, we now discard scops with less than 2 loops. We also discard scops without any data references. Essentially: - Remove limite_scops. - Only select scops when there are at least two loops (loop nest or, side by side). - Discard loops without data-refs. - Fix test cases. Passes bootstrap and reg-test. gcc/ChangeLog: 2015-09-02 Aditya Kumar <hiraditya@msn.com> Sebastian Pop <s.pop@samsung.com> * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id): Return the parameter if it was saved in corresponding parameter_rename_map of the region. (copy_def): Copy def from sese region to the newly created region. (copy_internal_parameters): Copy all the internal parameters defined within a region to the newly created region. (graphite_regenerate_ast_isl): Copy parameters to the new region before translating isl to gimple. * graphite-scop-detection.c (graphite_can_represent_loop): Bail out if the loop-nest does not have any data-references. (build_graphite_scops): Create a scop only when there is at least one loop inside it. (contains_only_close_phi_nodes): Deleted. (print_graphite_scop_statistics): Deleted (print_graphite_statistics): Deleted (limit_scops): Deleted. (build_scops): Removed call to limit_scops. * sese.c (new_sese): Construct. (free_sese): Destruct. (sese_add_exit_phis_edge): update_stmt after exit phi edge has been added. (set_rename): Pass sese region so that parameters inside the region can be added to its parameter_rename_map. (rename_uses): Pass sese region. (graphite_copy_stmts_from_block): Do not copy parameters that have been generated in the header of the scop. For each SSA_NAME in the parameter_rename_map rename its usage. (invariant_in_sese_p_rec): Return false if tree t is defined outside sese region. (scalar_evolution_in_region): If the tree t is invariant just return t. * sese.h: Added a parameter renamne map (parameter_rename_map_t) to struct sese to keep track of all the parameters which need renaming. * tree-data-ref.c (loop_nest_has_data_refs): Check if a loop nest has any data-refs. * tree-data-ref.h: Declaration of loop_nest_has_data_refs. gcc/testsuite/ChangeLog: 2015-09-02 Aditya Kumar <hiraditya@msn.com> Sebastian Pop <s.pop@samsung.com> * gcc.dg/graphite/block-0.c: Modifed test case to match current output. * gcc.dg/graphite/block-1.c: Same. * gcc.dg/graphite/block-5.c: Same. * gcc.dg/graphite/block-6.c: Same. * gcc.dg/graphite/interchange-1.c: Same. * gcc.dg/graphite/interchange-10.c: Same. * gcc.dg/graphite/interchange-11.c: Same. * gcc.dg/graphite/interchange-13.c: Same. * gcc.dg/graphite/interchange-14.c: Same. * gcc.dg/graphite/interchange-3.c: Same. * gcc.dg/graphite/interchange-4.c: Same. * gcc.dg/graphite/interchange-7.c: Same. * gcc.dg/graphite/interchange-8.c: Same. * gcc.dg/graphite/interchange-9.c: Same. * gcc.dg/graphite/isl-codegen-loop-dumping.c: Same. * gcc.dg/graphite/pr35356-1.c (foo): Same. * gcc.dg/graphite/pr37485.c: Same. * gcc.dg/graphite/scop-0.c (int toto): Same. * gcc.dg/graphite/scop-1.c: Same. * gcc.dg/graphite/scop-10.c: Same. * gcc.dg/graphite/scop-11.c: Same. * gcc.dg/graphite/scop-12.c: Same. * gcc.dg/graphite/scop-13.c: Same. * gcc.dg/graphite/scop-16.c: Same. * gcc.dg/graphite/scop-17.c: Same. * gcc.dg/graphite/scop-18.c: Same. * gcc.dg/graphite/scop-2.c: Same. * gcc.dg/graphite/scop-21.c (int test): Same. * gcc.dg/graphite/scop-22.c (void foo): Same. * gcc.dg/graphite/scop-4.c: Same. * gcc.dg/graphite/scop-5.c: Same. * gcc.dg/graphite/scop-6.c: Same. * gcc.dg/graphite/scop-7.c: Same. * gcc.dg/graphite/scop-8.c: Same. * gcc.dg/graphite/scop-9.c: Same. * gcc.dg/graphite/scop-mvt.c (void mvt): Introduced dependency so that data-refs remain inside the inner loop. * gcc.dg/graphite/uns-block-1.c: Modifed test case to match o/p. * gcc.dg/graphite/uns-interchange-14.c: Same. * gcc.dg/graphite/uns-interchange-9.c: Same. * gfortran.dg/graphite/interchange-3.f90 libgomp/ChangeLog: 2015-09-04 Aditya Kumar <hiraditya@msn.com> Sebastian Pop <s.pop@samsung.com> * testsuite/libgomp.graphite/bounds.c (int foo): Modifed test case to match o/p. * testsuite/libgomp.graphite/force-parallel-1.c (void parloop): Same. * testsuite/libgomp.graphite/force-parallel-4.c: Same. * testsuite/libgomp.graphite/force-parallel-5.c: Same. * testsuite/libgomp.graphite/force-parallel-7.c: Same. * testsuite/libgomp.graphite/force-parallel-8.c: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog11
-rw-r--r--libgomp/testsuite/libgomp.graphite/bounds.c2
-rw-r--r--libgomp/testsuite/libgomp.graphite/force-parallel-1.c7
-rw-r--r--libgomp/testsuite/libgomp.graphite/force-parallel-4.c1
-rw-r--r--libgomp/testsuite/libgomp.graphite/force-parallel-5.c2
-rw-r--r--libgomp/testsuite/libgomp.graphite/force-parallel-7.c2
-rw-r--r--libgomp/testsuite/libgomp.graphite/force-parallel-8.c2
7 files changed, 20 insertions, 7 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index a6bd73677a3..29665c226e1 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,14 @@
+2015-09-08 Aditya Kumar <hiraditya@msn.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * testsuite/libgomp.graphite/bounds.c (int foo): Modifed test case to
+ match o/p.
+ * testsuite/libgomp.graphite/force-parallel-1.c (void parloop): Same.
+ * testsuite/libgomp.graphite/force-parallel-4.c: Same.
+ * testsuite/libgomp.graphite/force-parallel-5.c: Same.
+ * testsuite/libgomp.graphite/force-parallel-7.c: Same.
+ * testsuite/libgomp.graphite/force-parallel-8.c: Same.
+
2015-09-03 Jakub Jelinek <jakub@redhat.com>
* configure.tgt: Add missing ;; in between nvptx and rtems
diff --git a/libgomp/testsuite/libgomp.graphite/bounds.c b/libgomp/testsuite/libgomp.graphite/bounds.c
index 822eb6a6f95..3d2fd7aaec8 100644
--- a/libgomp/testsuite/libgomp.graphite/bounds.c
+++ b/libgomp/testsuite/libgomp.graphite/bounds.c
@@ -3,6 +3,8 @@ int foo(int *a, int n)
int i;
for (i = 2; i < n; i++)
a[i] += a[i+1];
+ for (i = 2; i < n; i++)
+ a[i] += a[i+1];
}
/* Check that Graphite dependency checking notes the dependency. */
diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-1.c b/libgomp/testsuite/libgomp.graphite/force-parallel-1.c
index 245e64c6271..0393356f9f2 100644
--- a/libgomp/testsuite/libgomp.graphite/force-parallel-1.c
+++ b/libgomp/testsuite/libgomp.graphite/force-parallel-1.c
@@ -7,6 +7,9 @@ void parloop (int N)
int i;
for (i = 0; i < N; i++)
+ x[i] = i + 1;
+
+ for (i = 0; i < N; i++)
x[i] = i + 3;
for (i = 0; i < N; i++)
@@ -24,5 +27,5 @@ int main(void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 8 "optimized" } } */
diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-4.c b/libgomp/testsuite/libgomp.graphite/force-parallel-4.c
index 513d58d7391..b58883c377a 100644
--- a/libgomp/testsuite/libgomp.graphite/force-parallel-4.c
+++ b/libgomp/testsuite/libgomp.graphite/force-parallel-4.c
@@ -47,7 +47,6 @@ int main(void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "loopfn.0" 4 "optimized" } } */
/* { dg-final { scan-tree-dump-times "loopfn.1" 4 "optimized" } } */
diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-5.c b/libgomp/testsuite/libgomp.graphite/force-parallel-5.c
index d5994677253..de31d6436f5 100644
--- a/libgomp/testsuite/libgomp.graphite/force-parallel-5.c
+++ b/libgomp/testsuite/libgomp.graphite/force-parallel-5.c
@@ -31,6 +31,6 @@ int main(void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "loopfn.0" 4 "optimized" } } */
/* { dg-final { scan-tree-dump-times "loopfn.1" 4 "optimized" } } */
diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-7.c b/libgomp/testsuite/libgomp.graphite/force-parallel-7.c
index 5a54d474771..9d2b37cbd4b 100644
--- a/libgomp/testsuite/libgomp.graphite/force-parallel-7.c
+++ b/libgomp/testsuite/libgomp.graphite/force-parallel-7.c
@@ -31,5 +31,5 @@ int main (void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "3 loops carried no dependency" 1 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "5 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "loopfn.0" 4 "optimized" } } */
diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-8.c b/libgomp/testsuite/libgomp.graphite/force-parallel-8.c
index dc60f2f32b4..32ba5ab84ef 100644
--- a/libgomp/testsuite/libgomp.graphite/force-parallel-8.c
+++ b/libgomp/testsuite/libgomp.graphite/force-parallel-8.c
@@ -43,8 +43,6 @@ int main(void)
}
/* Check that parallel code generation part make the right answer. */
-/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
-/* { dg-final { scan-tree-dump-times "3 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "5 loops carried no dependency" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "loopfn.0" 4 "optimized" } } */
/* { dg-final { scan-tree-dump-times "loopfn.1" 4 "optimized" } } */