summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.h
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-17 09:42:06 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-17 09:42:06 +0000
commit4fb07d0042a71da1c2709e00c7c1b446479b8414 (patch)
tree0ebbe8deabfc8b9cc126c002c0f1e91f0ac0ea98 /gcc/tree-ssa-live.h
parent9d436fdd1b63396ba4c981c0a6a960428edcb37b (diff)
downloadgcc-4fb07d0042a71da1c2709e00c7c1b446479b8414.tar.gz
PR middle-end/54146
* tree-ssa-loop-im.c (lim_bitmap_obstack): New bitmap_obstack. (memref_free): Don't free the bitmaps individually here. (mem_ref_alloc): Allocate the bitmaps on the new bitmap obstack. (analyze_memory_references): Likewise. (tree_ssa_lim_initialize): Initialize the new bitmap obstack. (tree_ssa_lim_finalize): Release it. * dse.c (dse_bitmap_obstack): New bitmap obstack. (dse_obstack): New obstack. (get_group_info): Allocate the bitmaps on the new bitmap obstack. (dse_step0): Allocate the scratch bitmap on reg_obstack. Initialize the new bitmap obstack and normal obstack. Use XNEWVEC for bb_table. (record_store): Allocate regs_set on reg_obstack. (dse_step1): Allocate regs_live on reg_obstack. (dse_step2_init): Allocate offset_map_n and offset_map_p on the new obstack. (dse_step3_scan): Allocate bitmaps on the new bitmap obstack. (dse_step3): Likewise. (dse_confluence_0): Likewise. (dse_confluence_n): Likewise. (dse_transfer_function): Likewise. (dse_step7): Destroy the new obstacks, and everything allocated on them, in one big sweep. (rest_of_handle_dse): Update. * cfgexpand.c (stack_var_bitmap_obstack): New bitmap obstack. (add_stack_var_conflict): Allocate bitmaps on it. (add_scope_conflicts_1): Likewise. (add_scope_conflicts): Likewise. (update_alias_info_with_stack_vars): Likewise. (init_vars_expansion): Move TREE_USED fiddling expand_used_vars. Initialize the new bitmap obstack. (fini_vars_expansion): Release it. (estimated_stack_frame_size): Use init_vars_expansion to set things up and always clean up at the end. (expand_used_vars): Do the TREE_USED trickery here. Always call fini_vars_expansion. * tree-ssa-live.h (struct tree_live_info_d): Make livein and liveout arrays of bitmap_head to avoid one indirection per bitmap access. (live_on_entry, live_on_exit, live_var_map, live_merge_and_clear, make_live_on_entry): Update. * tree-ssa-live.c (partition_view_bitmap): Don't double-free 'used'. (liveness_bitmap_obstack): New bitmap obstack. (remove_unused_locals): Use it to allocate all bitmaps on. Update for livein/liveout changes in tree-ssa-live.h. (delete_tree_live_info): Release the bitmap obstack. (loe_visit_block, live_worklist, set_var_live_on_entry, calculate_live_on_exit, dump_live_info): Update. (calculate_live_ranges): Initialize the bitmap. * tree-ssa-ter.c (ter_bitmap_obstack): New bitmap obstack. (new_temp_expr_table): Allocate bitmap on it. (make_dependent_on_partition, add_to_partition_kill_list, add_dependence, process_replaceable): Likewise. (find_replaceable_exprs): Initialize and release the new obstack here. * df-problems.c (df_lr_add_problem): Allocate persistent bitmap for out_of_date_transfer_functions on df_bitmap_obstack. (df_live_add_problem): Likewise. (df_chain_add_problem): Likewise. (df_word_lr_add_problem): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190475 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-live.h')
-rw-r--r--gcc/tree-ssa-live.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tree-ssa-live.h b/gcc/tree-ssa-live.h
index d42bd87e2f7..70a3aa60fd3 100644
--- a/gcc/tree-ssa-live.h
+++ b/gcc/tree-ssa-live.h
@@ -226,8 +226,11 @@ typedef struct tree_live_info_d
/* Bitmap indicating which partitions are global. */
bitmap global;
- /* Bitmap of live on entry blocks for partition elements. */
- bitmap *livein;
+ /* Bitmaps of live on entry blocks for partition elements. */
+ bitmap_head *livein;
+
+ /* Bitmaps of what variables are live on exit for a basic blocks. */
+ bitmap_head *liveout;
/* Number of basic blocks when live on exit calculated. */
int num_blocks;
@@ -237,9 +240,6 @@ typedef struct tree_live_info_d
/* Top of workstack. */
int *stack_top;
-
- /* Bitmap of what variables are live on exit for a basic blocks. */
- bitmap *liveout;
} *tree_live_info_p;
@@ -273,7 +273,7 @@ live_on_entry (tree_live_info_p live, basic_block bb)
&& bb != ENTRY_BLOCK_PTR
&& bb != EXIT_BLOCK_PTR);
- return live->livein[bb->index];
+ return &live->livein[bb->index];
}
@@ -287,7 +287,7 @@ live_on_exit (tree_live_info_p live, basic_block bb)
&& bb != ENTRY_BLOCK_PTR
&& bb != EXIT_BLOCK_PTR);
- return live->liveout[bb->index];
+ return &live->liveout[bb->index];
}
@@ -306,9 +306,9 @@ live_var_map (tree_live_info_p live)
static inline void
live_merge_and_clear (tree_live_info_p live, int p1, int p2)
{
- gcc_checking_assert (live->livein[p1] && live->livein[p2]);
- bitmap_ior_into (live->livein[p1], live->livein[p2]);
- bitmap_zero (live->livein[p2]);
+ gcc_checking_assert (&live->livein[p1] && &live->livein[p2]);
+ bitmap_ior_into (&live->livein[p1], &live->livein[p2]);
+ bitmap_zero (&live->livein[p2]);
}
@@ -317,7 +317,7 @@ live_merge_and_clear (tree_live_info_p live, int p1, int p2)
static inline void
make_live_on_entry (tree_live_info_p live, basic_block bb , int p)
{
- bitmap_set_bit (live->livein[bb->index], p);
+ bitmap_set_bit (&live->livein[bb->index], p);
bitmap_set_bit (live->global, p);
}