On 8/25/21 1:25 PM, Martin Sebor wrote:
I noticed that the output of -fdump-tree-walloca (and probably all
passes that call gimple_ranger::export_global_ranges()) includes
the following two lines for all functions, even when there's
nothing else of relevance after them:

Exported global range table
===========================

I was a bit puzzled by it at first, wondering if it was leftover
debugging output, until I checked the code and realized it's
a header that may be (but isn't always) followed by the contents
of the table.

To reduce clutter in the dump the attached patch changes the function
to print the header only when it is followed by at least one line of
output.  (Another tweak to reduce even further the amount of output
printed by default that might be worth considering is to print
the table only when TDF_DETAILS is set.)

Martin

Except checking x == 1 won't work if ssa_name(1)  was not updated.

Just set a flag if the header hasn't been printed yet. tried and true. I guess you can protect it behind details if you want.

Andrew




Reply via email to