diff options
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto/lto.c | 40 |
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 3ce3a32..6d6ebf6 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,4 +1,10 @@ 2013-11-29 Jakub Jelinek <jakub@redhat.com> + Richard Biener <rguenther@suse.de> + + PR lto/59326 + * lto.c (compare_tree_sccs_1): Handle OMP_CLAUSE. + +2013-11-29 Jakub Jelinek <jakub@redhat.com> PR lto/59326 * lto.c (mentions_vars_p_omp_clause): New function. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 26084bf..1f46238 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1410,6 +1410,36 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) TREE_STRING_LENGTH (t1)) != 0) return false; + if (code == OMP_CLAUSE) + { + compare_values (OMP_CLAUSE_CODE); + switch (OMP_CLAUSE_CODE (t1)) + { + case OMP_CLAUSE_DEFAULT: + compare_values (OMP_CLAUSE_DEFAULT_KIND); + break; + case OMP_CLAUSE_SCHEDULE: + compare_values (OMP_CLAUSE_SCHEDULE_KIND); + break; + case OMP_CLAUSE_DEPEND: + compare_values (OMP_CLAUSE_DEPEND_KIND); + break; + case OMP_CLAUSE_MAP: + compare_values (OMP_CLAUSE_MAP_KIND); + break; + case OMP_CLAUSE_PROC_BIND: + compare_values (OMP_CLAUSE_PROC_BIND_KIND); + break; + case OMP_CLAUSE_REDUCTION: + compare_values (OMP_CLAUSE_REDUCTION_CODE); + compare_values (OMP_CLAUSE_REDUCTION_GIMPLE_INIT); + compare_values (OMP_CLAUSE_REDUCTION_GIMPLE_MERGE); + break; + default: + break; + } + } + #undef compare_values @@ -1633,6 +1663,16 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) } } + if (code == OMP_CLAUSE) + { + int i; + + for (i = 0; i < omp_clause_num_ops[OMP_CLAUSE_CODE (t1)]; i++) + compare_tree_edges (OMP_CLAUSE_OPERAND (t1, i), + OMP_CLAUSE_OPERAND (t2, i)); + compare_tree_edges (OMP_CLAUSE_CHAIN (t1), OMP_CLAUSE_CHAIN (t2)); + } + #undef compare_tree_edges return true; |