Go to the source code of this file.
Functions |
var_map | init_var_map (int) |
void | delete_var_map (var_map) |
void | dump_var_map (FILE *, var_map) |
void | debug (_var_map &ref) |
void | debug (_var_map *ptr) |
int | var_union (var_map, tree, tree) |
void | partition_view_normal (var_map, bool) |
void | partition_view_bitmap (var_map, bitmap, bool) |
void | register_ssa_partition_check (tree ssa_var) |
static unsigned | num_var_partitions () |
static tree | partition_to_var () |
static tree | version_to_var () |
static int | var_to_partition () |
static tree | var_to_partition_to_var () |
static int | basevar_index () |
static int | num_basevars () |
static void | register_ssa_partition (var_map map, tree ssa_var) |
tree_live_info_p | calculate_live_ranges (var_map) |
void | calculate_live_on_exit (tree_live_info_p) |
void | delete_tree_live_info (tree_live_info_p) |
void | dump_live_info (FILE *, tree_live_info_p, int) |
void | debug (tree_live_info_d &ref) |
void | debug (tree_live_info_d *ptr) |
static int | partition_is_global () |
static bitmap | live_on_entry () |
static bitmap | live_on_exit () |
static var_map | live_var_map () |
static void | live_merge_and_clear () |
static void | make_live_on_entry () |
var_map | coalesce_ssa_name (void) |
bitmap | find_replaceable_exprs (var_map) |
void | dump_replaceable_exprs (FILE *, bitmap) |
Typedef Documentation
---------------- live on entry/exit info ------------------------------
This structure is used to represent live range information on SSA based
trees. A partition map must be provided, and based on the active partitions,
live-on-entry information and live-on-exit information can be calculated.
As well, partitions are marked as to whether they are global (live
outside the basic block they are defined in).
The live-on-entry information is per block. It provide a bitmap for
each block which has a bit set for each partition that is live on entry to
that block.
The live-on-exit information is per block. It provides a bitmap for each
block indicating which partitions are live on exit from the block.
For the purposes of this implementation, we treat the elements of a PHI
as follows:
Uses in a PHI are considered LIVE-ON-EXIT to the block from which they
originate. They are *NOT* considered live on entry to the block
containing the PHI node.
The Def of a PHI node is *not* considered live on entry to the block.
It is considered to be "define early" in the block. Picture it as each
block having a stmt (or block-preheader) before the first real stmt in
the block which defines all the variables that are defined by PHIs.
-----------------------------------------------------------------------
Used to create the variable mapping when we go out of SSA form.
Mapping from an ssa_name to a partition number is maintained, as well as
partition number back to ssa_name.
This data structure also supports "views", which work on a subset of all
partitions. This allows the coalescer to decide what partitions are
interesting to it, and only work with those partitions. Whenever the view
is changed, the partition numbers change, but none of the partition groupings
change. (ie, it is truly a view since it doesn't change anything)
The final component of the data structure is the basevar map. This provides
a list of all the different base variables which occur in a partition view,
and a unique index for each one. Routines are provided to quickly produce
the base variable of a partition.
Note that members of a partition MUST all have the same base variable.
Function Documentation
static int basevar_index |
( |
| ) |
|
|
inlinestatic |
From tree-ssa-coalesce.c
Reduce the number of copies by coalescing variables in the function. Return
a partition map with the resulting coalesces.
References add_coalesce(), bitmap_set_bit(), build_ssa_conflict_graph(), calculate_live_ranges(), coalesce_partitions(), hash_table< Descriptor, Allocator >::create(), create_coalesce_list(), create_outofssa_var_map(), delete_coalesce_list(), delete_tree_live_info(), hash_table< Descriptor, Allocator >::dispose(), dump_coalesce_list(), dump_file, dump_flags, dump_live_info(), dump_var_map(), hash_table< Descriptor, Allocator >::find_slot(), graph, has_zero_uses(), map, num_var_partitions(), partition_view_bitmap(), sort_coalesce_list(), ssa_conflicts_delete(), and ssa_conflicts_dump().
Referenced by remove_ssa_form().
void dump_replaceable_exprs |
( |
FILE * |
, |
|
|
bitmap |
|
|
) |
| |
void dump_var_map |
( |
FILE * |
, |
|
|
var_map |
|
|
) |
| |
static void live_merge_and_clear |
( |
| ) |
|
|
inlinestatic |
static bitmap live_on_entry |
( |
| ) |
|
|
inlinestatic |
static bitmap live_on_exit |
( |
| ) |
|
|
inlinestatic |
static void make_live_on_entry |
( |
| ) |
|
|
inlinestatic |
static int num_basevars |
( |
| ) |
|
|
inlinestatic |
static unsigned num_var_partitions |
( |
| ) |
|
|
inlinestatic |
static int partition_is_global |
( |
| ) |
|
|
inlinestatic |
static tree partition_to_var |
( |
| ) |
|
|
inlinestatic |
Given partition index I from MAP, return the variable which represents that
partition.
References _var_map::var_partition, and _var_map::view_to_partition.
Referenced by attempt_coalesce(), calculate_live_ranges(), copy_rename_partition_coalesce(), dump_live_info(), dump_var_map(), elim_create(), expand_used_vars(), gimple_expand_cfg(), insert_part_to_rtx_on_edge(), insert_partition_copy_on_edge(), insert_rtx_to_part_on_edge(), insert_value_copy_on_edge(), rename_ssa_copies(), var_map_base_init(), var_to_partition_to_var(), verify_live_on_entry(), and version_to_var().
void partition_view_normal |
( |
var_map |
, |
|
|
bool |
|
|
) |
| |
static void register_ssa_partition |
( |
var_map |
map, |
|
|
tree |
ssa_var |
|
) |
| |
|
inlinestatic |
void register_ssa_partition_check |
( |
tree |
ssa_var | ) |
|
static int var_to_partition |
( |
| ) |
|
|
inlinestatic |
Given VAR, return the partition number in MAP which contains it.
NO_PARTITION is returned if it's not in any partition.
References _var_map::partition_to_view, and _var_map::var_partition.
Referenced by add_dependence(), attempt_coalesce(), calculate_live_on_exit(), eliminate_build(), expand_debug_expr(), expand_stack_vars(), find_replaceable_in_bb(), gimple_expand_cfg(), live_track_clear_var(), live_track_live_p(), live_track_process_def(), live_track_process_use(), new_temp_expr_table(), remove_ssa_form(), rewrite_trees(), set_rtl(), set_var_live_on_entry(), and var_to_partition_to_var().
static tree var_to_partition_to_var |
( |
| ) |
|
|
inlinestatic |
static tree version_to_var |
( |
| ) |
|
|
inlinestatic |