]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
graphite: Accept loops without data references
authorFrederik Harwath <frederik@codesourcery.com>
Tue, 16 Nov 2021 15:22:29 +0000 (16:22 +0100)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:54 +0000 (14:11 +0100)
It seems that the check that rejects loops without data references is
only included to avoid handling non-profitable loops.  Including those
loops in Graphite's analysis enables more consistent diagnostic
messages in OpenACC "kernels" code and does not introduce any
testsuite regressions.  If executing Graphite on loops without
data references leads to noticeable compile time slow-downs for
non-OpenACC users of Graphite, the check can be re-introduced but
restricted to non-OpenACC functions.

gcc/ChangeLog:

* graphite-scop-detection.cc (scop_detection::harmful_loop_in_region):
Remove check for loops without data references.

gcc/ChangeLog.omp
gcc/graphite-scop-detection.cc

index 8773233b4d9844ed8db20d298de443ec669d12a7..1926db94dc4f1ffb45068747fc42e4a58b14cc86 100644 (file)
@@ -1,3 +1,8 @@
+2021-11-16  Frederik Harwath  <frederik@codesourcery.com>
+
+       * graphite-scop-detection.cc (scop_detection::harmful_loop_in_region):
+       Remove check for loops without data references.
+
 2021-11-16  Frederik Harwath  <frederik@codesourcery.com>
 
        * graphite-scop-detection.cc (scop_context_loop): New function.
index f4dba010bde7820a9688b1f53cb5cdb564d4fa97..c63933e5aa00048afba6e1d9a0c49d1538bb4eeb 100644 (file)
@@ -849,19 +849,6 @@ scop_detection::harmful_loop_in_region (sese_l scop) const
          return true;
        }
 
-      /* Check if all loop nests have at least one data reference.
-        ???  This check is expensive and loops premature at this point.
-        If important to retain we can pre-compute this for all innermost
-        loops and reject those when we build a SESE region for a loop
-        during SESE discovery.  */
-      if (! loop->inner
-         && ! loop_nest_has_data_refs (loop))
-       {
-         DEBUG_PRINT (dp << "[scop-detection-fail] loop_" << loop->num
-                      << " does not have any data reference.\n");
-         return true;
-       }
-
       DEBUG_PRINT (dp << "[scop-detection] loop_" << loop->num << " is harmless.\n");
     }