Skip to content

Commit e5b355e

Browse files
rguenthRichard Biener
authored andcommitted
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.
1 parent 5bb3bc9 commit e5b355e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

gcc/tree-ssa-loop-niter.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,16 +1752,23 @@ dump_affine_iv (FILE *file, affine_iv *iv)
17521752
if (!integer_zerop (iv->step))
17531753
fprintf (file, "[");
17541754

1755-
print_generic_expr (dump_file, iv->base, TDF_SLIM);
1755+
print_generic_expr (file, iv->base, TDF_SLIM);
17561756

17571757
if (!integer_zerop (iv->step))
17581758
{
17591759
fprintf (file, ", + , ");
1760-
print_generic_expr (dump_file, iv->step, TDF_SLIM);
1760+
print_generic_expr (file, iv->step, TDF_SLIM);
17611761
fprintf (file, "]%s", iv->no_overflow ? "(no_overflow)" : "");
17621762
}
17631763
}
17641764

1765+
DEBUG_FUNCTION void
1766+
debug (affine_iv *iv)
1767+
{
1768+
dump_affine_iv (stderr, iv);
1769+
fputc ('\n', stderr);
1770+
}
1771+
17651772
/* Determine the number of iterations according to condition (for staying
17661773
inside loop) which compares two induction variables using comparison
17671774
operator CODE. The induction variable on left side of the comparison

0 commit comments

Comments
 (0)