From adef5d4f4eee1394c862cafc4cb33395af68bc4a Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 25 Jun 2019 13:50:12 +0200 Subject: [PATCH] Remove dead code in df-scan.c (PR tree-optimization/90978). 2019-06-25 Martin Liska PR tree-optimization/90978 * df-scan.c (df_update_entry_block_defs): Remove dead else branch. (df_update_exit_block_uses): Likewise. From-SVN: r272651 --- gcc/ChangeLog | 7 +++++++ gcc/df-scan.c | 44 ++++++++++++-------------------------------- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94b5c49caab..231bfe71035 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-06-25 Martin Liska + + PR tree-optimization/90978 + * df-scan.c (df_update_entry_block_defs): Remove dead else + branch. + (df_update_exit_block_uses): Likewise. + 2019-06-25 Kwok Cheung Yeung Andrew Stubbs diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 08d7af33371..2eea149e458 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3601,23 +3601,13 @@ df_update_entry_block_defs (void) auto_bitmap refs (&df_bitmap_obstack); df_get_entry_block_def_set (refs); - if (df->entry_block_defs) + gcc_assert (df->entry_block_defs); + if (!bitmap_equal_p (df->entry_block_defs, 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; - 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); + 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; } @@ -3775,23 +3765,13 @@ df_update_exit_block_uses (void) auto_bitmap refs (&df_bitmap_obstack); df_get_exit_block_use_set (refs); - if (df->exit_block_uses) + gcc_assert (df->exit_block_uses); + if (!bitmap_equal_p (df->exit_block_uses, 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; - 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); + 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; } -- 2.30.2