+/** dumps something like:
+ *
+ * "prefix" "Name" (x): node1, ... node7,\n
+ * "prefix" node8, ... node15,\n
+ * "prefix" node16, node17\n
+ */
+static void dump_node_list(FILE *F, firm_kind *k, char *prefix,
+ int (*get_entity_n_nodes)(firm_kind *ent),
+ ir_node *(*get_entity_node)(firm_kind *ent, int pos),
+ char *name) {
+ int i, n_nodes = get_entity_n_nodes(k);
+ char *comma = "";
+
+ fprintf(F, "%s %s (%d):", prefix, name, n_nodes);
+ for (i = 0; i < n_nodes; ++i) {
+ int rem;
+ if (i > 7 && !(i & 7)) { /* line break every eigth node. */
+ fprintf(F, ",\n%s ", prefix);
+ comma = "";
+ }
+ fprintf(F, "%s ", comma);
+ rem = opt_dump_analysed_type_info;
+ opt_dump_analysed_type_info = 0;
+ dump_node_label(F, get_entity_node(k, i));
+ opt_dump_analysed_type_info = rem;
+ comma = ",";
+ }
+ fprintf(F, "\n");
+}
+
+/** dumps something like:
+ *
+ * "prefix" "Name" (x): node1, ... node7,\n
+ * "prefix" node8, ... node15,\n
+ * "prefix" node16, node17\n
+ */
+static void dump_type_list(FILE *F, type *tp, char *prefix,
+ int (*get_n_types)(type *tp),
+ type *(*get_type)(type *tp, int pos),
+ char *name) {
+ int i, n_nodes = get_n_types(tp);
+ char *comma = "";
+
+ fprintf(F, "%s %s (%d):", prefix, name, n_nodes);
+ for (i = 0; i < n_nodes; ++i) {
+ if (i > 7 && !(i & 7)) { /* line break every eigth node. */
+ fprintf(F, ",\n%s ", prefix);
+ comma = "";
+ }
+ fprintf(F, "%s %s(%ld)", comma, get_type_name(get_type(tp, i)), get_type_nr(tp));
+ //dump_type_to_file(F, get_type(tp, i), dump_verbosity_onlynames);
+ comma = ",";
+ }
+ fprintf(F, "\n");
+}
+