[PATCH] (v2) Add a "compact" mode to print_rtx_function

David Malcolm dmalcolm@redhat.com
Tue Nov 22 15:38:00 GMT 2016


On Tue, 2016-11-22 at 15:45 +0100, Jakub Jelinek wrote:
> On Tue, Nov 22, 2016 at 03:38:04PM +0100, Bernd Schmidt wrote:
> > On 11/22/2016 02:37 PM, Jakub Jelinek wrote:
> > > Can't it be done only if xloc.file contains any fancy characters?
> > 
> > Sure, but why? Strings generally get emitted with quotes around
> > them, I
> > don't see a good reason for filenames to be different, especially
> > if it
> > makes the output easier to parse.
> 
> Because printing common filenames matches what we emit in
> diagnostics,
> what e.g. sanitizers emit at runtime diagnostics, what we emit as
> locations
> in gimple dumps etc.

It sounds like a distinction between human-readable vs machine
-readable.

How about something like the following, which only adds the quotes if
outputting the RTL FE's input format?

Does this fix the failing tests?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-print-rtl.c-conditionalize-quotes-for-filenames.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161122/b760bb32/attachment.bin>


More information about the Gcc-patches mailing list