For reference, here are the changes to patch 8a to update it to the
new syntax.

I'm assuming that this (and the changes to the various dumpfiles in
patches 8b-8d) count as "obvious".

gcc/ChangeLog:
        * read-rtl-function.c (lookup_reg_by_dump_name): Rework to expect
        regno wrapped in '<' and '>' rather than with a '%' prefix.
        (selftest::test_parsing_regnos): Update for above change.
---
 gcc/read-rtl-function.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/read-rtl-function.c b/gcc/read-rtl-function.c
index c3f5c64..24f7deb 100644
--- a/gcc/read-rtl-function.c
+++ b/gcc/read-rtl-function.c
@@ -352,10 +352,10 @@ lookup_reg_by_dump_name (const char *name)
     return VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM;
   /* TODO: handle "virtual-reg-%d".  */
 
-  /* In compact mode, pseudos are printed with a '%' sigil following
-     by the regno, offset by (LAST_VIRTUAL_REGISTER + 1), so that the
-     first non-virtual pseudo is dumped as "%0".  */
-  if (name[0] == '%')
+  /* In compact mode, pseudos are printed with '< and '>' wrapping the regno,
+     offseting it by (LAST_VIRTUAL_REGISTER + 1), so that the
+     first non-virtual pseudo is dumped as "<0>".  */
+  if (name[0] == '<' && name[strlen (name) - 1] == '>')
     {
       int dump_num = atoi (name + 1);
       return dump_num + LAST_VIRTUAL_REGISTER + 1;
@@ -1681,8 +1681,8 @@ test_parsing_regnos ()
     lookup_reg_by_dump_name ("virtual-preferred-stack-boundary"));
 
   /* Verify lookup of non-virtual pseudos.  */
-  ASSERT_EQ (LAST_VIRTUAL_REGISTER + 1, lookup_reg_by_dump_name ("%0"));
-  ASSERT_EQ (LAST_VIRTUAL_REGISTER + 2, lookup_reg_by_dump_name ("%1"));
+  ASSERT_EQ (LAST_VIRTUAL_REGISTER + 1, lookup_reg_by_dump_name ("<0>"));
+  ASSERT_EQ (LAST_VIRTUAL_REGISTER + 2, lookup_reg_by_dump_name ("<1>"));
 }
 
 /* Verify that edge E is as expected, with the src and dest basic blocks
-- 
1.8.5.3

Reply via email to