From: Richard Biener Date: Tue, 4 Nov 2025 14:48:04 +0000 (+0100) Subject: Add debug function for affine_iv X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5b355e45dbfc314b0a96cc7d27af000e06b75f1;p=thirdparty%2Fgcc.git 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 --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc index cc763839edc..5e35a59fcd1 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