]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[OpenACC privatization] Skip processing if no work to be done [PR90115]
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 20 May 2021 13:45:06 +0000 (15:45 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 21 May 2021 18:07:19 +0000 (20:07 +0200)
gcc/
PR middle-end/90115
* omp-offload.c (execute_oacc_device_lower): Skip processing if no
work to be done.

gcc/omp-offload.c

index 336b48d5a3b7f7881ad7f0031ac81bc20a0d036c..8bfb8b36cf05c71c22a199011577dfdde92345ea 100644 (file)
@@ -2246,7 +2246,8 @@ execute_oacc_device_lower ()
      COMPONENT_REFS, ARRAY_REFS and plain VAR_DECLs are also rewritten to use
      the new decl, adjusting types of appropriate tree nodes as necessary.  */
 
-  if (targetm.goacc.adjust_private_decl)
+  if (targetm.goacc.adjust_private_decl
+      && !adjusted_vars.is_empty ())
     {
       FOR_ALL_BB_FN (bb, cfun)
        for (gimple_stmt_iterator gsi = gsi_start_bb (bb);