ra-build.c (check_conflict_numbers): Hide unused function.
* 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 From-SVN: r55637
This commit is contained in:
parent
8943a0b4d8
commit
533c486363
@ -1,3 +1,19 @@
|
||||
2002-07-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* 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
|
||||
|
||||
2002-07-21 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* expr.c (expand_expr) [TRY_FINALLY_EXPR]: Don't use
|
||||
|
@ -101,7 +101,9 @@ static unsigned int parts_to_webs_1 PARAMS ((struct df *, struct web_link **,
|
||||
struct df_link *));
|
||||
static void parts_to_webs PARAMS ((struct df *));
|
||||
static void reset_conflicts PARAMS ((void));
|
||||
#if 0
|
||||
static void check_conflict_numbers PARAMS ((void));
|
||||
#endif
|
||||
static void conflicts_between_webs PARAMS ((struct df *));
|
||||
static void remember_web_was_spilled PARAMS ((struct web *));
|
||||
static void detect_spill_temps PARAMS ((void));
|
||||
@ -1069,8 +1071,10 @@ livethrough_conflicts_bb (bb)
|
||||
{
|
||||
if (INSN_P (insn))
|
||||
{
|
||||
struct ra_insn_info info = insn_df[INSN_UID (insn)];
|
||||
unsigned int n;
|
||||
struct ra_insn_info info;
|
||||
|
||||
info = insn_df[INSN_UID (insn)];
|
||||
for (n = 0; n < info.num_defs; n++)
|
||||
bitmap_set_bit (all_defs, DF_REF_ID (info.defs[n]));
|
||||
if (TEST_BIT (insns_with_deaths, INSN_UID (insn)))
|
||||
@ -1826,7 +1830,7 @@ parts_to_webs_1 (df, copy_webs, all_refs)
|
||||
if (! wp->uplink)
|
||||
{
|
||||
/* If we have a web part root, create a new web. */
|
||||
unsigned int newid = ~0U;
|
||||
unsigned int newid = ~(unsigned)0;
|
||||
unsigned int old_web = 0;
|
||||
|
||||
/* In the first pass, there are no old webs, so unconditionally
|
||||
@ -1871,7 +1875,7 @@ parts_to_webs_1 (df, copy_webs, all_refs)
|
||||
}
|
||||
}
|
||||
/* The id is zeroed in init_one_web(). */
|
||||
if (newid == ~0U)
|
||||
if (newid == ~(unsigned)0)
|
||||
newid = web->id;
|
||||
if (old_web)
|
||||
reinit_one_web (web, GET_CODE (reg) == SUBREG
|
||||
@ -2188,6 +2192,7 @@ reset_conflicts ()
|
||||
/* For each web check it's num_conflicts member against that
|
||||
number, as calculated from scratch from all neighbors. */
|
||||
|
||||
#if 0
|
||||
static void
|
||||
check_conflict_numbers ()
|
||||
{
|
||||
@ -2204,6 +2209,7 @@ check_conflict_numbers ()
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Convert the conflicts between web parts to conflicts between full webs.
|
||||
|
||||
@ -2223,7 +2229,9 @@ conflicts_between_webs (df)
|
||||
struct df *df;
|
||||
{
|
||||
unsigned int i;
|
||||
#ifdef STACK_REGS
|
||||
struct dlist *d;
|
||||
#endif
|
||||
bitmap ignore_defs = BITMAP_XMALLOC ();
|
||||
unsigned int have_ignored;
|
||||
unsigned int *pass_cache = (unsigned int *) xcalloc (num_webs, sizeof (int));
|
||||
|
@ -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 (®copy, 0, sizeof(regcopy));
|
||||
memset (&selfcopy, 0, sizeof(selfcopy));
|
||||
memset (&overall, 0, sizeof(overall));
|
||||
|
||||
if (!file)
|
||||
return;
|
||||
|
@ -666,9 +666,11 @@ insert_stores (new_deaths)
|
||||
if (uid < insn_df_max_uid)
|
||||
{
|
||||
unsigned int n;
|
||||
struct ra_insn_info info = insn_df[uid];
|
||||
rtx following = NEXT_INSN (insn);
|
||||
basic_block bb = BLOCK_FOR_INSN (insn);
|
||||
struct ra_insn_info info;
|
||||
|
||||
info = insn_df[uid];
|
||||
for (n = 0; n < info.num_defs; n++)
|
||||
{
|
||||
struct web *web = def2web[DF_REF_ID (info.defs[n])];
|
||||
@ -1949,20 +1951,18 @@ void
|
||||
dump_cost (level)
|
||||
unsigned int level;
|
||||
{
|
||||
#define LU HOST_WIDE_INT_PRINT_UNSIGNED
|
||||
ra_debug_msg (level, "Instructions for spilling\n added:\n");
|
||||
ra_debug_msg (level, " loads =%d cost=" LU "\n", emitted_spill_loads,
|
||||
spill_load_cost);
|
||||
ra_debug_msg (level, " stores=%d cost=" LU "\n", emitted_spill_stores,
|
||||
spill_store_cost);
|
||||
ra_debug_msg (level, " remat =%d cost=" LU "\n", emitted_remat,
|
||||
spill_remat_cost);
|
||||
ra_debug_msg (level, " removed:\n");
|
||||
ra_debug_msg (level, " moves =%d cost=" LU "\n", deleted_move_insns,
|
||||
deleted_move_cost);
|
||||
ra_debug_msg (level, " others=%d cost=" LU "\n", deleted_def_insns,
|
||||
deleted_def_cost);
|
||||
#undef LU
|
||||
ra_debug_msg (level, " loads =%d cost=", emitted_spill_loads);
|
||||
ra_debug_msg (level, HOST_WIDE_INT_PRINT_UNSIGNED, spill_load_cost);
|
||||
ra_debug_msg (level, "\n stores=%d cost=", emitted_spill_stores);
|
||||
ra_debug_msg (level, HOST_WIDE_INT_PRINT_UNSIGNED, spill_store_cost);
|
||||
ra_debug_msg (level, "\n remat =%d cost=", emitted_remat);
|
||||
ra_debug_msg (level, HOST_WIDE_INT_PRINT_UNSIGNED, spill_remat_cost);
|
||||
ra_debug_msg (level, "\n removed:\n moves =%d cost=", deleted_move_insns);
|
||||
ra_debug_msg (level, HOST_WIDE_INT_PRINT_UNSIGNED, deleted_move_cost);
|
||||
ra_debug_msg (level, "\n others=%d cost=", deleted_def_insns);
|
||||
ra_debug_msg (level, HOST_WIDE_INT_PRINT_UNSIGNED, deleted_def_cost);
|
||||
ra_debug_msg (level, "\n");
|
||||
}
|
||||
|
||||
/* Initialization of the rewrite phase. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user