Add two missing dump_enabled_p calls
authorMartin Jambor <mjambor@suse.cz>
Fri, 1 Feb 2019 16:15:36 +0000 (17:15 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 1 Feb 2019 16:15:36 +0000 (17:15 +0100)
2019-02-01  Martin Jambor  <mjambor@suse.cz>

* omp-grid.c (grid_target_follows_gridifiable_pattern): Guard two
missed optimization dump with dump_enabled_p.

From-SVN: r268451

gcc/ChangeLog
gcc/omp-grid.c

index 64d312471e6c6eb9d5ac63d5cb6e49a21de49a04..700dd701df5fbad33a2c6b0d72c28707d6ebee47 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-01  Martin Jambor  <mjambor@suse.cz>
+
+       * omp-grid.c (grid_target_follows_gridifiable_pattern): Guard two
+       missed optimization dump with dump_enabled_p.
+
 2019-02-01  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/88597
index 12029b72445b30aa09e3bb6fbbc40c84a230864a..79e9405ce3f15f3fe4718b93d4fdbe43c96b76f4 100644 (file)
@@ -745,9 +745,10 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid)
   tree group_size = NULL;
   if (!teams)
     {
-      dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc,
-                      GRID_MISSED_MSG_PREFIX "it does not have a sole teams "
-                      "construct in it.\n");
+      if (dump_enabled_p ())
+       dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc,
+                        GRID_MISSED_MSG_PREFIX "it does not have a sole "
+                        "teams construct in it.\n");
       return false;
     }
 
@@ -788,9 +789,10 @@ grid_target_follows_gridifiable_pattern (gomp_target *target, grid_prop *grid)
   gomp_for *dist = dyn_cast <gomp_for *> (stmt);
   if (!dist)
     {
-      dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc,
-                      GRID_MISSED_MSG_PREFIX "the teams construct does not "
-                      "have a single distribute construct in it.\n");
+      if (dump_enabled_p ())
+       dump_printf_loc (MSG_MISSED_OPTIMIZATION, tloc,
+                        GRID_MISSED_MSG_PREFIX "the teams construct does not "
+                        "have a single distribute construct in it.\n");
       return false;
     }