On 10/12/2016 07:48 PM, David Malcolm wrote:
This patch implements a "compact" mode for print_rtx_function,
implementing most of the ideas above.

Example of output can be seen here:
which can be contrasted with the non-compact output here:

It adds the "c" prefix to the insn names, so we get "cinsn", etc.  However,
it does lead to things like this:

   (ccode_label 56 8 "")

which gives me pause: would the "ccode" in "ccode_label" be confusing? (compared
to "ccmode").  An alternative might be to have a "compact-insn-chain" vs
"insn-chain" wrapper element, expressing that this is a compact dump.

Maybe "clabel" or something.

OK for trunk if it passes?

I'd say yes - we're iterating and this seems to be an improvement.

I think the only remaining item from our discussion above is what to do
about the numbering of pseudos in the dumps (currently it just prints the regno

Other than that, is the resultant dump format good enough that I can start
rewriting the RTL frontend parser, or are there other changes you'd want?

Give me a day or two to think it over, and for others to chime in. But I think this is reasonably close to what it should look like. Maybe empty edge flags don't need to be printed, and possibly there could be a more compact format for a large number edges like what you have for the switch?

+  /* For insns, print the INSN_UID.
+     In compact mode, we only print the INSN_UID of CODE_LABELs.  */
+  if (!flag_compact || GET_CODE (in_rtx) == CODE_LABEL)
+    if (INSN_CHAIN_CODE_P (GET_CODE (in_rtx)))

The two ifs should be merged I think.


Reply via email to