Commit 1a1a5f4b by Kenneth Zadeck Committed by Kenneth Zadeck

re PR rtl-optimization/26375 (Swing modulo scheduling results in ICE)

2006-05-22  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR rtl-optimization/26375
	PR rtl-optimization/26855
	* df-problems (df_ru_bb_local_compute_process_def): Removed update
	to gen set.
	(df_ru_bb_local_compute): Reversed statements and removed bogus
	comment explaining why they should be in wrong order.
	(df_ru_dump, df_rd_dump): Enhanced debug info.     
	* modulo-sched.c (sms_schedule, tree_opt_pass pass_sms): Enhanced
	debug info.       
	* ddg.c (add_deps_for_def): Converted use of reaching defs to
        reaching uses and fixed space problem.

From-SVN: r114010
parent b633db7b
2006-05-22 Kenneth Zadeck <zadeck@naturalbridge.com>
PR rtl-optimization/26375
PR rtl-optimization/26855
* df-problems (df_ru_bb_local_compute_process_def): Removed update
to gen set.
(df_ru_bb_local_compute): Reversed statements and removed bogus
comment explaining why they should be in wrong order.
(df_ru_dump, df_rd_dump): Enhanced debug info.
* modulo-sched.c (sms_schedule, tree_opt_pass pass_sms): Enhanced
debug info.
* ddg.c (add_deps_for_def): Converted use of reaching defs to
reaching uses and fixed space problem.
2006-05-23 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (decide_is_function_needed): Also nested functions
......
......@@ -225,7 +225,7 @@ static void
add_deps_for_def (ddg_ptr g, struct df *df, struct df_ref *rd)
{
int regno = DF_REF_REGNO (rd);
struct df_rd_bb_info *bb_info = DF_RD_BB_INFO (df, g->bb);
struct df_ru_bb_info *bb_info = DF_RU_BB_INFO (df, g->bb);
struct df_link *r_use;
int use_before_def = false;
rtx def_insn = DF_REF_INSN (rd);
......@@ -338,7 +338,7 @@ build_inter_loop_deps (ddg_ptr g, struct df *df)
/* We are interested in uses of this BB. */
if (BLOCK_FOR_INSN (use->insn) == g->bb)
add_deps_for_use (g, df,use);
add_deps_for_use (g, df, use);
}
}
......
......@@ -440,15 +440,15 @@ df_ru_bb_local_compute_process_def (struct dataflow *dflow,
unsigned int n_uses = DF_REG_USE_GET (df, regno)->n_refs;
if (!bitmap_bit_p (seen_in_block, regno))
{
/* The first def for regno, causes the kill info to be
generated and the gen information to cleared. */
/* The first def for regno in the insn, causes the kill
info to be generated. Do not modify the gen set
because the only values in it are the uses from here
to the top of the block and this def does not effect
them. */
if (!bitmap_bit_p (seen_in_insn, regno))
{
if (n_uses > DF_SPARSE_THRESHOLD)
{
bitmap_set_bit (bb_info->sparse_kill, regno);
bitmap_clear_range (bb_info->gen, begin, n_uses);
}
bitmap_set_bit (bb_info->sparse_kill, regno);
else
{
struct df_ru_problem_data * problem_data
......@@ -457,7 +457,6 @@ df_ru_bb_local_compute_process_def (struct dataflow *dflow,
= df_ref_bitmap (problem_data->use_sites, regno,
begin, n_uses);
bitmap_ior_into (bb_info->kill, uses);
bitmap_and_compl_into (bb_info->gen, uses);
}
}
bitmap_set_bit (seen_in_insn, regno);
......@@ -520,16 +519,12 @@ df_ru_bb_local_compute (struct dataflow *dflow, unsigned int bb_index)
if (!INSN_P (insn))
continue;
df_ru_bb_local_compute_process_def (dflow, bb_info,
DF_INSN_UID_DEFS (df, uid), 0);
/* The use processing must happen after the defs processing even
though the uses logically happen first since the defs clear
the gen set. Otherwise, a use for regno occuring in the same
instruction as a def for regno would be cleared. */
df_ru_bb_local_compute_process_use (bb_info,
DF_INSN_UID_USES (df, uid), 0);
df_ru_bb_local_compute_process_def (dflow, bb_info,
DF_INSN_UID_DEFS (df, uid), 0);
bitmap_ior_into (seen_in_block, seen_in_insn);
bitmap_clear (seen_in_insn);
}
......@@ -765,13 +760,13 @@ df_ru_dump (struct dataflow *dflow, FILE *file)
if (!bb_info->in)
continue;
fprintf (file, " in \t");
fprintf (file, " in \t(%d)\n", (int) bitmap_count_bits (bb_info->in));
dump_bitmap (file, bb_info->in);
fprintf (file, " gen \t");
fprintf (file, " gen \t(%d)\n", (int) bitmap_count_bits (bb_info->gen));
dump_bitmap (file, bb_info->gen);
fprintf (file, " kill\t");
fprintf (file, " kill\t(%d)\n", (int) bitmap_count_bits (bb_info->kill));
dump_bitmap (file, bb_info->kill);
fprintf (file, " out \t");
fprintf (file, " out \t(%d)\n", (int) bitmap_count_bits (bb_info->out));
dump_bitmap (file, bb_info->out);
}
}
......@@ -1276,13 +1271,13 @@ df_rd_dump (struct dataflow *dflow, FILE *file)
if (!bb_info->in)
continue;
fprintf (file, " in\t(%d)\n", (int) bitmap_count_bits (bb_info->in));
fprintf (file, " in \t(%d)\n", (int) bitmap_count_bits (bb_info->in));
dump_bitmap (file, bb_info->in);
fprintf (file, " gen \t(%d)\n", (int) bitmap_count_bits (bb_info->gen));
dump_bitmap (file, bb_info->gen);
fprintf (file, " kill\t(%d)\n", (int) bitmap_count_bits (bb_info->kill));
dump_bitmap (file, bb_info->kill);
fprintf (file, " out\t(%d)\n", (int) bitmap_count_bits (bb_info->out));
fprintf (file, " out \t(%d)\n", (int) bitmap_count_bits (bb_info->out));
dump_bitmap (file, bb_info->out);
}
}
......
......@@ -940,6 +940,9 @@ sms_schedule (void)
df_chain_add_problem (df, DF_DU_CHAIN | DF_UD_CHAIN);
df_analyze (df);
if (dump_file)
df_dump (df, dump_file);
/* Allocate memory to hold the DDG array one entry for each loop.
We use loop->num as index into this array. */
g_arr = XCNEWVEC (ddg_ptr, loops->num);
......@@ -2545,7 +2548,7 @@ struct tree_opt_pass pass_sms =
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func, /* todo_flags_start */
TODO_dump_func |
TODO_ggc_collect, /* todo_flags_finish */
'm' /* letter */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment