https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111975

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following is a pragmatic patch for the dots, a less pragmatic one would
maybe use dump_fancy_name in a special mode for -gimple, replacing dots by
$ for example.  The patch below will turn ivtmp.17_23 into D_432_23, making
dumps less readable.

diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc
index a2a4f5bfa2f..35073ac067f 100644
--- a/gcc/tree-pretty-print.cc
+++ b/gcc/tree-pretty-print.cc
@@ -288,6 +288,9 @@ dump_decl_name (pretty_printer *pp, tree node, dump_flags_t
flags)
               && DECL_NAMELESS (node)
               && DECL_IGNORED_P (node))
        name = NULL_TREE;
+      else if ((flags & TDF_GIMPLE)
+              && DECL_ARTIFICIAL (node))
+       name = NULL_TREE;
       /* For DECL_NAMELESS names look for embedded uids in the
         names and sanitize them for TDF_NOUID.  */
       else if ((flags & TDF_NOUID) && DECL_NAMELESS (node))
@@ -3744,7 +3747,7 @@ dump_generic_node (pretty_printer *pp, tree node, int
spc, dump_flags_t flags,
            dump_fancy_name (pp, SSA_NAME_IDENTIFIER (node));
          else if (! (flags & TDF_GIMPLE)
                   || SSA_NAME_VAR (node))
-           dump_generic_node (pp, SSA_NAME_IDENTIFIER (node),
+           dump_generic_node (pp, SSA_NAME_VAR (node),
                               spc, flags, false);
        }
       pp_underscore (pp);

Reply via email to