GCN's 64-lane vectors tend to make RTL dumps very long. This patch makes them far more bearable by eliding long sequences of the same element into "repeated" messages.
2018-09-05 Andrew Stubbs <a...@codesourcery.com> Jan Hubicka <j...@suse.cz> Martin Jambor <mjam...@suse.cz> * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times the same elements are repeated rather than printing all of them. --- gcc/print-rtl.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 5dd2e31..8a04264 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -370,7 +370,20 @@ rtx_writer::print_rtx_operand_codes_E_and_V (const_rtx in_rtx, int idx) m_sawclose = 1; for (int j = 0; j < XVECLEN (in_rtx, idx); j++) - print_rtx (XVECEXP (in_rtx, idx, j)); + { + int j1; + + print_rtx (XVECEXP (in_rtx, idx, j)); + for (j1 = j + 1; j1 < XVECLEN (in_rtx, idx); j1++) + if (XVECEXP (in_rtx, idx, j) != XVECEXP (in_rtx, idx, j1)) + break; + + if (j1 != j + 1) + { + fprintf (m_outfile, " repeated %ix", j1 - j); + j = j1 - 1; + } + } m_indent -= 2; }