[obvious] remove some dead df-scan code
Michael Matz
matz@suse.de
Tue Jul 26 17:09:00 GMT 2011
Hi,
jimis noticed this on IRC. Since r160348 there's some dead code in
df_update_entry_block_defs and df_update_exit_block_uses. I'm currently
regstrapping this together with the pointer alignment merging patch on
x86_64-linux, and am going to commit it as obvious when that works.
Ciao,
Michael.
* df-scan.c (df_update_entry_block_defs, df_update_exit_block_uses):
Remove dead code.
Index: df-scan.c
===================================================================
*** df-scan.c (revision 176790)
--- df-scan.c (working copy)
*************** void
*** 3849,3884 ****
df_update_entry_block_defs (void)
{
bitmap_head refs;
- bool changed = false;
bitmap_initialize (&refs, &df_bitmap_obstack);
df_get_entry_block_def_set (&refs);
! if (df->entry_block_defs)
! {
! if (!bitmap_equal_p (df->entry_block_defs, &refs))
! {
! struct df_scan_bb_info *bb_info = df_scan_get_bb_info (ENTRY_BLOCK);
! df_ref_chain_delete_du_chain (bb_info->artificial_defs);
! df_ref_chain_delete (bb_info->artificial_defs);
! bb_info->artificial_defs = NULL;
! changed = true;
! }
! }
! else
! {
! struct df_scan_problem_data *problem_data
! = (struct df_scan_problem_data *) df_scan->problem_data;
! gcc_unreachable ();
! df->entry_block_defs = BITMAP_ALLOC (&problem_data->reg_bitmaps);
! changed = true;
! }
!
! if (changed)
{
df_record_entry_block_defs (&refs);
bitmap_copy (df->entry_block_defs, &refs);
df_set_bb_dirty (BASIC_BLOCK (ENTRY_BLOCK));
}
bitmap_clear (&refs);
}
--- 3849,3868 ----
df_update_entry_block_defs (void)
{
bitmap_head refs;
bitmap_initialize (&refs, &df_bitmap_obstack);
df_get_entry_block_def_set (&refs);
! if (!bitmap_equal_p (df->entry_block_defs, &refs))
{
+ struct df_scan_bb_info *bb_info = df_scan_get_bb_info (ENTRY_BLOCK);
+ df_ref_chain_delete_du_chain (bb_info->artificial_defs);
+ df_ref_chain_delete (bb_info->artificial_defs);
+ bb_info->artificial_defs = NULL;
df_record_entry_block_defs (&refs);
bitmap_copy (df->entry_block_defs, &refs);
df_set_bb_dirty (BASIC_BLOCK (ENTRY_BLOCK));
}
+
bitmap_clear (&refs);
}
*************** void
*** 4023,4058 ****
df_update_exit_block_uses (void)
{
bitmap_head refs;
- bool changed = false;
bitmap_initialize (&refs, &df_bitmap_obstack);
df_get_exit_block_use_set (&refs);
! if (df->exit_block_uses)
! {
! if (!bitmap_equal_p (df->exit_block_uses, &refs))
! {
! struct df_scan_bb_info *bb_info = df_scan_get_bb_info (EXIT_BLOCK);
! df_ref_chain_delete_du_chain (bb_info->artificial_uses);
! df_ref_chain_delete (bb_info->artificial_uses);
! bb_info->artificial_uses = NULL;
! changed = true;
! }
! }
! else
! {
! struct df_scan_problem_data *problem_data
! = (struct df_scan_problem_data *) df_scan->problem_data;
! gcc_unreachable ();
! df->exit_block_uses = BITMAP_ALLOC (&problem_data->reg_bitmaps);
! changed = true;
! }
!
! if (changed)
{
df_record_exit_block_uses (&refs);
bitmap_copy (df->exit_block_uses,& refs);
df_set_bb_dirty (BASIC_BLOCK (EXIT_BLOCK));
}
bitmap_clear (&refs);
}
--- 4007,4026 ----
df_update_exit_block_uses (void)
{
bitmap_head refs;
bitmap_initialize (&refs, &df_bitmap_obstack);
df_get_exit_block_use_set (&refs);
! if (!bitmap_equal_p (df->exit_block_uses, &refs))
{
+ struct df_scan_bb_info *bb_info = df_scan_get_bb_info (EXIT_BLOCK);
+ df_ref_chain_delete_du_chain (bb_info->artificial_uses);
+ df_ref_chain_delete (bb_info->artificial_uses);
+ bb_info->artificial_uses = NULL;
df_record_exit_block_uses (&refs);
bitmap_copy (df->exit_block_uses,& refs);
df_set_bb_dirty (BASIC_BLOCK (EXIT_BLOCK));
}
+
bitmap_clear (&refs);
}
More information about the Gcc-patches
mailing list