On 11/03/2016 05:35 PM, Martin Jambor wrote:
* print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times an element is repeated istead of printing each repeated element.
"instead"
--- 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 341ecdf..9752c85 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -252,7 +252,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; + } + }
Good idea, but can you give an example of how this looks in practice? Also, it would be nice (and necessary for David's rtl-testing) to also teach the rtl reader to parse this format.
Bernd