aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2016-10-19 12:19:24 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2016-10-19 12:19:24 +0200
commita023f8c8dc9ef41f4212b964326a2d16a3f00b27 (patch)
tree90af851b2b5f659fea4c389ca23aff204e59bcae /gcc/omp-low.c
parentd40627f9335050467ae3fdb8bcf31ed695b290ea (diff)
downloadgcc-a023f8c8dc9ef41f4212b964326a2d16a3f00b27.zip
gcc-a023f8c8dc9ef41f4212b964326a2d16a3f00b27.tar.gz
gcc-a023f8c8dc9ef41f4212b964326a2d16a3f00b27.tar.bz2
[PR tree-optimization/78024] Clear basic block flags before using BB_VISITED for OpenACC loops processing
gcc/ * omp-low.c (oacc_loop_discovery): Call clear_bb_flags before, and don't clear BB_VISITED after processing. gcc/testsuite/ * gcc.dg/goacc/loop-processing-1.c: New file. From-SVN: r241334
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 77f89d5..3ef796f 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -19236,7 +19236,9 @@ oacc_loop_sibling_nreverse (oacc_loop *loop)
static oacc_loop *
oacc_loop_discovery ()
{
- basic_block bb;
+ /* Clear basic block flags, in particular BB_VISITED which we're going to use
+ in the following. */
+ clear_bb_flags ();
oacc_loop *top = new_oacc_loop_outer (current_function_decl);
oacc_loop_discover_walk (top, ENTRY_BLOCK_PTR_FOR_FN (cfun));
@@ -19245,10 +19247,6 @@ oacc_loop_discovery ()
that diagnostics come out in an unsurprising order. */
top = oacc_loop_sibling_nreverse (top);
- /* Reset the visited flags. */
- FOR_ALL_BB_FN (bb, cfun)
- bb->flags &= ~BB_VISITED;
-
return top;
}