diff options
author | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-23 01:17:29 +0000 |
---|---|---|
committer | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-23 01:17:29 +0000 |
commit | 02a8ad7e6a1fa6c0da9f0c8a4df1f2498e7a32e3 (patch) | |
tree | f324d099d9d167255cb708938d6b7fb3a505f4e0 /gcc | |
parent | d3d410e15660be79881f484f5ccda6142cba0dca (diff) | |
download | gcc-02a8ad7e6a1fa6c0da9f0c8a4df1f2498e7a32e3.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ddg.c | 4 | ||||
-rw-r--r-- | gcc/df-problems.c | 35 | ||||
-rw-r--r-- | gcc/modulo-sched.c | 5 |
4 files changed, 35 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 988d4f9924e..196804b1bd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +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 diff --git a/gcc/ddg.c b/gcc/ddg.c index c00e4991157..c59ee6ea8f1 100644 --- a/gcc/ddg.c +++ b/gcc/ddg.c @@ -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); } } diff --git a/gcc/df-problems.c b/gcc/df-problems.c index 8c5ed6d7bd3..051ec333b67 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -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); } } diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 8b620c4b119..56df63c894c 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -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 */ |