summaryrefslogtreecommitdiff
path: root/gcc/ra-debug.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-22 02:04:25 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-22 02:04:25 +0000
commit6e898352ec0e5a656c97186134e31b7fd06ca06f (patch)
tree3114403bb3070cab9b0afd98aedb05080340f804 /gcc/ra-debug.c
parent6fc8784048bd1a34f08bf37fde4e7d7e6811b96f (diff)
downloadgcc-6e898352ec0e5a656c97186134e31b7fd06ca06f.tar.gz
* ra-build.c (check_conflict_numbers): Hide unused function.
(livethrough_conflicts_bb): Avoid automatic aggregate initialization. (parts_to_webs_1): Avoid `U' integer constant modifier. (conflicts_between_webs): Wrap a variable in the macro controlling its usage. * ra-debug.c (ra_debug_msg): Use VA_OPEN/VA_CLOSE. (dump_igraph, dump_graph_cost): Avoid string concatenation (dump_static_insn_cost): Avoid automatic aggregate initialization. * ra-rewrite.c (insert_stores): Avoid automatic aggregate initialization. (dump_cost): Avoid string concatenation git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55637 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ra-debug.c')
-rw-r--r--gcc/ra-debug.c46
1 files changed, 18 insertions, 28 deletions
diff --git a/gcc/ra-debug.c b/gcc/ra-debug.c
index fd8c8d4bb5b..a96d708d9b2 100644
--- a/gcc/ra-debug.c
+++ b/gcc/ra-debug.c
@@ -47,22 +47,12 @@ static const char *const reg_class_names[] = REG_CLASS_NAMES;
void
ra_debug_msg VPARAMS ((unsigned int level, const char *format, ...))
{
-#ifndef ANSI_PROTOTYPES
- int level;
- const char *format;
-#endif
- va_list ap;
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, unsigned int, level);
+ VA_FIXEDARG (ap, const char *, format);
if ((debug_new_regalloc & level) != 0 && rtl_dump_file != NULL)
- {
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- vfprintf (rtl_dump_file, format, ap);
- va_end (ap);
- }
+ vfprintf (rtl_dump_file, format, ap);
+ VA_CLOSE (ap);
}
@@ -720,10 +710,10 @@ dump_igraph (df)
ra_debug_msg (DUMP_WEBS, " sub %d", SUBREG_BYTE (web->orig_x));
ra_debug_msg (DUMP_WEBS, " par %d", find_web_for_subweb (web)->id);
}
- ra_debug_msg (DUMP_WEBS, " +%d (span %d, cost "
- HOST_WIDE_INT_PRINT_DEC ") (%s)",
- web->add_hardregs, web->span_deaths, web->spill_cost,
- reg_class_names[web->regclass]);
+ ra_debug_msg (DUMP_WEBS, " +%d (span %d, cost ",
+ web->add_hardregs, web->span_deaths);
+ ra_debug_msg (DUMP_WEBS, HOST_WIDE_INT_PRINT_DEC, web->spill_cost);
+ ra_debug_msg (DUMP_WEBS, ") (%s)", reg_class_names[web->regclass]);
if (web->spill_temp == 1)
ra_debug_msg (DUMP_WEBS, " (spilltemp)");
else if (web->spill_temp == 2)
@@ -866,7 +856,6 @@ dump_graph_cost (level, msg)
{
unsigned int i;
unsigned HOST_WIDE_INT cost;
-#define LU HOST_WIDE_INT_PRINT_UNSIGNED
if (!rtl_dump_file || (debug_new_regalloc & level) == 0)
return;
@@ -877,9 +866,9 @@ dump_graph_cost (level, msg)
if (alias (web)->type == SPILLED)
cost += web->orig_spill_cost;
}
- ra_debug_msg (level, " spill cost of graph (%s) = " LU "\n",
- msg ? msg : "", cost);
-#undef LU
+ ra_debug_msg (level, " spill cost of graph (%s) = ", msg ? msg : "");
+ ra_debug_msg (level, HOST_WIDE_INT_PRINT_UNSIGNED, cost);
+ ra_debug_msg (level, "\n");
}
/* Dump the color assignment per web, the coalesced and spilled webs. */
@@ -930,12 +919,13 @@ dump_static_insn_cost (file, message, prefix)
unsigned HOST_WIDE_INT cost;
unsigned int count;
};
- struct cost load = {0, 0};
- struct cost store = {0, 0};
- struct cost regcopy = {0, 0};
- struct cost selfcopy = {0, 0};
- struct cost overall = {0, 0};
basic_block bb;
+ struct cost load, store, regcopy, selfcopy, overall;
+ memset (&load, 0, sizeof(load));
+ memset (&store, 0, sizeof(store));
+ memset (&regcopy, 0, sizeof(regcopy));
+ memset (&selfcopy, 0, sizeof(selfcopy));
+ memset (&overall, 0, sizeof(overall));
if (!file)
return;