aboutsummaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2008-06-30 19:28:24 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2008-06-30 19:28:24 +0000
commit370f38e84763ca6271d7898b4900baad3810ad81 (patch)
tree25163222bdff7bf15877a51ced2d08b2d02e3dea /gcc/dse.c
parent5bb77598866d730419f52a846b3bf9d7412aba2a (diff)
downloadgcc-370f38e84763ca6271d7898b4900baad3810ad81.zip
gcc-370f38e84763ca6271d7898b4900baad3810ad81.tar.gz
gcc-370f38e84763ca6271d7898b4900baad3810ad81.tar.bz2
df-scan.c (df_scan_free_ref_vec, [...]): New macros.
2008-06-30 Kenneth Zadeck <zadeck@naturalbridge.com> * df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): New macros. (df_scan_free_internal): Free data structures not allocated in storage pools. (df_mw_hardreg_chain_delete_eq_uses): Use df_scan_free_mws_vec. (df_refs_add_to_chains): Use df_scan_free_ref_vec and df_scan_free_mws_vec. * dse.c (dse_step6): Free offset_map_p and offset_map_n unconditionally. From-SVN: r137284
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c56
1 files changed, 21 insertions, 35 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index b65a72b..71d3462 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -3156,43 +3156,30 @@ dse_step6 (bool global_done)
group_info_t group;
basic_block bb;
- if (global_done)
- {
- for (i = 0; VEC_iterate (group_info_t, rtx_group_vec, i, group); i++)
- {
- free (group->offset_map_n);
- free (group->offset_map_p);
- BITMAP_FREE (group->store1_n);
- BITMAP_FREE (group->store1_p);
- BITMAP_FREE (group->store2_n);
- BITMAP_FREE (group->store2_p);
- BITMAP_FREE (group->group_kill);
- }
-
- FOR_ALL_BB (bb)
- {
- bb_info_t bb_info = bb_table[bb->index];
- BITMAP_FREE (bb_info->gen);
- if (bb_info->kill)
- BITMAP_FREE (bb_info->kill);
- if (bb_info->in)
- BITMAP_FREE (bb_info->in);
- if (bb_info->out)
- BITMAP_FREE (bb_info->out);
- }
- }
- else
+ for (i = 0; VEC_iterate (group_info_t, rtx_group_vec, i, group); i++)
{
- for (i = 0; VEC_iterate (group_info_t, rtx_group_vec, i, group); i++)
- {
- BITMAP_FREE (group->store1_n);
- BITMAP_FREE (group->store1_p);
- BITMAP_FREE (group->store2_n);
- BITMAP_FREE (group->store2_p);
- BITMAP_FREE (group->group_kill);
- }
+ free (group->offset_map_n);
+ free (group->offset_map_p);
+ BITMAP_FREE (group->store1_n);
+ BITMAP_FREE (group->store1_p);
+ BITMAP_FREE (group->store2_n);
+ BITMAP_FREE (group->store2_p);
+ BITMAP_FREE (group->group_kill);
}
+ if (global_done)
+ FOR_ALL_BB (bb)
+ {
+ bb_info_t bb_info = bb_table[bb->index];
+ BITMAP_FREE (bb_info->gen);
+ if (bb_info->kill)
+ BITMAP_FREE (bb_info->kill);
+ if (bb_info->in)
+ BITMAP_FREE (bb_info->in);
+ if (bb_info->out)
+ BITMAP_FREE (bb_info->out);
+ }
+
if (clear_alias_sets)
{
BITMAP_FREE (clear_alias_sets);
@@ -3217,7 +3204,6 @@ dse_step6 (bool global_done)
}
-
/* -------------------------------------------------------------------------
DSE
------------------------------------------------------------------------- */