On 09/27/16 09:30, Bernd Schmidt wrote:
On 09/27/2016 12:58 PM, Nathan Sidwell wrote:
In working on some new code I got sufficiently frustrated to implement
pretty printing on internal function discriminators, as I think one of
you suggested a while back. With this patch we get:
.data_dep.2 = UNIQUE (OACC_FORK, .data_dep.2, -1);
rather than an obscure raw integer for the first argument.
I realized I could simplify the comma separator logic, by checking i for
non-zeroness before emitting the arg. Committed as obvious.
nathan
2016-09-28 Nathan Sidwell <nat...@acm.org>
* gimple-pretty-print.c (dump_gimple_call_args): Simplify "' "
printing.
Index: gimple-pretty-print.c
===================================================================
--- gimple-pretty-print.c (revision 240552)
+++ gimple-pretty-print.c (working copy)
@@ -649,26 +649,21 @@ dump_gimple_call_args (pretty_printer *b
{
i++;
pp_string (buffer, enums[v]);
- if (i < gimple_call_num_args (gs))
- pp_string (buffer, ", ");
}
}
}
for (; i < gimple_call_num_args (gs); i++)
{
- dump_generic_node (buffer, gimple_call_arg (gs, i), 0, flags, false);
- if (i < gimple_call_num_args (gs) - 1)
+ if (i)
pp_string (buffer, ", ");
+ dump_generic_node (buffer, gimple_call_arg (gs, i), 0, flags, false);
}
if (gimple_call_va_arg_pack_p (gs))
{
- if (gimple_call_num_args (gs) > 0)
- {
- pp_comma (buffer);
- pp_space (buffer);
- }
+ if (i)
+ pp_string (buffer, ", ");
pp_string (buffer, "__builtin_va_arg_pack ()");
}