]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add debug function for affine_iv
authorRichard Biener <rguenther@suse.de>
Tue, 4 Nov 2025 14:48:04 +0000 (15:48 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 5 Nov 2025 08:22:44 +0000 (09:22 +0100)
* tree-ssa-loop-niter.cc (dump_affine_iv): Use file, not
dump_file when printing.
(debug): New overload for affine_iv.

gcc/tree-ssa-loop-niter.cc

index cc763839edcd273e6abc4f715d176db182c4900d..5e35a59fcd10afd76c1d1e181d5fcd6ee0847195 100644 (file)
@@ -1752,16 +1752,23 @@ dump_affine_iv (FILE *file, affine_iv *iv)
   if (!integer_zerop (iv->step))
     fprintf (file, "[");
 
-  print_generic_expr (dump_file, iv->base, TDF_SLIM);
+  print_generic_expr (file, iv->base, TDF_SLIM);
 
   if (!integer_zerop (iv->step))
     {
       fprintf (file, ", + , ");
-      print_generic_expr (dump_file, iv->step, TDF_SLIM);
+      print_generic_expr (file, iv->step, TDF_SLIM);
       fprintf (file, "]%s", iv->no_overflow ? "(no_overflow)" : "");
     }
 }
 
+DEBUG_FUNCTION void
+debug (affine_iv *iv)
+{
+  dump_affine_iv (stderr, iv);
+  fputc ('\n', stderr);
+}
+
 /* Determine the number of iterations according to condition (for staying
    inside loop) which compares two induction variables using comparison
    operator CODE.  The induction variable on left side of the comparison