print-rtl.c: use '<' and '>' rather than % for pseudos in compact mode

gcc/ChangeLog:
	* print-rtl.c (rtx_writer::print_rtx_operand_code_r): For
	non-virtual pseudos in compact mode, wrap the regno in '<' and '>'
	rather than using a '%' prefix.
	* rtl-tests.c (selftest::test_dumping_regs): Update for above change.

From-SVN: r243798
This commit is contained in:
David Malcolm 2016-12-19 15:24:47 +00:00 committed by David Malcolm
parent dc31c238bd
commit 596762ee4b
3 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2016-12-19 David Malcolm <dmalcolm@redhat.com>
* print-rtl.c (rtx_writer::print_rtx_operand_code_r): For
non-virtual pseudos in compact mode, wrap the regno in '<' and '>'
rather than using a '%' prefix.
* rtl-tests.c (selftest::test_dumping_regs): Update for above change.
2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com> 2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/78748 PR target/78748

View File

@ -481,11 +481,11 @@ rtx_writer::print_rtx_operand_code_r (const_rtx in_rtx)
fputc ('#', m_outfile); fputc ('#', m_outfile);
else if (m_compact) else if (m_compact)
{ {
/* In compact mode, print pseudos with a '%' sigil following /* In compact mode, print pseudos with '< and '>' wrapping the regno,
by the regno, offset by (LAST_VIRTUAL_REGISTER + 1), so that the offseting it by (LAST_VIRTUAL_REGISTER + 1), so that the
first non-virtual pseudo is dumped as "%0". */ first non-virtual pseudo is dumped as "<0>". */
gcc_assert (regno > LAST_VIRTUAL_REGISTER); gcc_assert (regno > LAST_VIRTUAL_REGISTER);
fprintf (m_outfile, " %%%d", regno - (LAST_VIRTUAL_REGISTER + 1)); fprintf (m_outfile, " <%d>", regno - (LAST_VIRTUAL_REGISTER + 1));
} }
else else
fprintf (m_outfile, " %d", regno); fprintf (m_outfile, " %d", regno);

View File

@ -104,9 +104,9 @@ test_dumping_regs ()
} }
/* Test dumping of non-virtual pseudos. */ /* Test dumping of non-virtual pseudos. */
ASSERT_RTL_DUMP_EQ ("(reg:SI %0)", ASSERT_RTL_DUMP_EQ ("(reg:SI <0>)",
gen_raw_REG (SImode, LAST_VIRTUAL_REGISTER + 1)); gen_raw_REG (SImode, LAST_VIRTUAL_REGISTER + 1));
ASSERT_RTL_DUMP_EQ ("(reg:SI %1)", ASSERT_RTL_DUMP_EQ ("(reg:SI <1>)",
gen_raw_REG (SImode, LAST_VIRTUAL_REGISTER + 2)); gen_raw_REG (SImode, LAST_VIRTUAL_REGISTER + 2));
} }