aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-01-28 14:09:12 +0100
committerRichard Biener <rguenther@suse.de>2020-01-28 14:10:16 +0100
commit6c42e27c165b3ed1f2a388ed74091cd5a18bba85 (patch)
treecd4266a0c8044c650c23ce80eca32662c9c52e4c /gcc/tree-cfg.c
parent1e964774aec65472d7a0741d7faa6a884295fc81 (diff)
downloadgcc-6c42e27c165b3ed1f2a388ed74091cd5a18bba85.zip
gcc-6c42e27c165b3ed1f2a388ed74091cd5a18bba85.tar.gz
gcc-6c42e27c165b3ed1f2a388ed74091cd5a18bba85.tar.bz2
tree-optimization/93439 move clique bookkeeping to OMP expansion
Autopar was doing clique bookkeeping too early when creating destination functions but then later introducing new cliques via versioning loops. The following moves the bookkeeping to the actual outlining process. 2020-01-28 Richard Biener <rguenther@suse.de> PR tree-optimization/93439 * tree-parloops.c (create_loop_fn): Move clique bookkeeping... * tree-cfg.c (move_sese_region_to_fn): ... here. (verify_types_in_gimple_reference): Verify used cliques are tracked. * gfortran.dg/graphite/pr93439.f90: New testcase.
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index fd69b36..f7b817d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3226,6 +3226,13 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
debug_generic_stmt (expr);
return true;
}
+ if (MR_DEPENDENCE_CLIQUE (expr) != 0
+ && MR_DEPENDENCE_CLIQUE (expr) > cfun->last_clique)
+ {
+ error ("invalid clique in %qs", code_name);
+ debug_generic_stmt (expr);
+ return true;
+ }
}
else if (TREE_CODE (expr) == TARGET_MEM_REF)
{
@@ -3245,6 +3252,13 @@ verify_types_in_gimple_reference (tree expr, bool require_lvalue)
debug_generic_stmt (expr);
return true;
}
+ if (MR_DEPENDENCE_CLIQUE (expr) != 0
+ && MR_DEPENDENCE_CLIQUE (expr) > cfun->last_clique)
+ {
+ error ("invalid clique in %qs", code_name);
+ debug_generic_stmt (expr);
+ return true;
+ }
}
else if (TREE_CODE (expr) == INDIRECT_REF)
{
@@ -7744,6 +7758,9 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb,
after = bb;
}
+ /* Adjust the maximum clique used. */
+ dest_cfun->last_clique = saved_cfun->last_clique;
+
loop->aux = NULL;
loop0->aux = NULL;
/* Loop sizes are no longer correct, fix them up. */