graphite: add missing dump_enabled_p checks (PR tree-optimization/88015)
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 15 Nov 2018 14:01:29 +0000 (14:01 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 15 Nov 2018 14:01:29 +0000 (14:01 +0000)
gcc/ChangeLog:
PR tree-optimization/88015
* graphite-isl-ast-to-gimple.c
(translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
for dump_enabled_p.
* graphite-sese-to-poly.c (build_poly_scop): Likewise.

From-SVN: r266184

gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c
gcc/graphite-sese-to-poly.c

index f60b32166fe67467a116e4f5a12f7abebfa924e9..d9857fef20cb7e279d79855e2e9c6df09b56c34e 100644 (file)
@@ -1,3 +1,11 @@
+2018-11-15  David Malcolm  <dmalcolm@redhat.com>
+
+       PR tree-optimization/88015
+       * graphite-isl-ast-to-gimple.c
+       (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
+       for dump_enabled_p.
+       * graphite-sese-to-poly.c (build_poly_scop): Likewise.
+
 2018-11-15  Richard Biener  <rguenther@suse.de>
 
         PR middle-end/88029
index e2dbf6fbf9d53b6a657214d395ba0b02c3e860c2..cc93fb94dafd8357d10113bb34555e74bb92de9a 100644 (file)
@@ -1411,17 +1411,20 @@ scop_to_isl_ast (scop_p scop)
   isl_ctx_set_max_operations (scop->isl_context, old_max_operations);
   if (isl_ctx_last_error (scop->isl_context) != isl_error_none)
     {
-      dump_user_location_t loc = find_loop_location
-       (scop->scop_info->region.entry->dest->loop_father);
-      if (isl_ctx_last_error (scop->isl_context) == isl_error_quota)
-       dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
-                        "loop nest not optimized, AST generation timed out "
-                        "after %d operations [--param max-isl-operations]\n",
-                        max_operations);
-      else
-       dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
-                        "loop nest not optimized, ISL AST generation "
-                        "signalled an error\n");
+      if (dump_enabled_p ())
+       {
+         dump_user_location_t loc = find_loop_location
+           (scop->scop_info->region.entry->dest->loop_father);
+         if (isl_ctx_last_error (scop->isl_context) == isl_error_quota)
+           dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+                            "loop nest not optimized, AST generation timed out "
+                            "after %d operations [--param max-isl-operations]\n",
+                            max_operations);
+         else
+           dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc,
+                            "loop nest not optimized, ISL AST generation "
+                            "signalled an error\n");
+       }
       isl_ast_node_free (ast_isl);
       return NULL;
     }
index 69898d4ffd8203a1b0d21fee3a0b9c3b2d76294b..1d41cffeb04e48270358c301d2c9eb3bd18bb735 100644 (file)
@@ -1218,7 +1218,8 @@ build_poly_scop (scop_p scop)
   enum isl_error err = isl_ctx_last_error (scop->isl_context);
   isl_ctx_reset_error (scop->isl_context);
   isl_options_set_on_error (scop->isl_context, old_err);
-  if (err != isl_error_none)
+  if (err != isl_error_none
+      && dump_enabled_p ())
     dump_printf (MSG_MISSED_OPTIMIZATION,
                 "ISL error while building poly scop\n");