https://gcc.gnu.org/g:e5b355e45dbfc314b0a96cc7d27af000e06b75f1

commit r16-5038-ge5b355e45dbfc314b0a96cc7d27af000e06b75f1
Author: Richard Biener <[email protected]>
Date:   Tue Nov 4 15:48:04 2025 +0100

    Add debug function for affine_iv
    
            * tree-ssa-loop-niter.cc (dump_affine_iv): Use file, not
            dump_file when printing.
            (debug): New overload for affine_iv.

Diff:
---
 gcc/tree-ssa-loop-niter.cc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc
index cc763839edcd..5e35a59fcd10 100644
--- a/gcc/tree-ssa-loop-niter.cc
+++ b/gcc/tree-ssa-loop-niter.cc
@@ -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

Reply via email to