aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2006-12-01 19:53:29 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2006-12-01 19:53:29 +0000
commit7c6a62dd399b670aac5a1d8c96ba591b75df74b7 (patch)
tree6542d2518434af68a90407dc272e1642c14f88d3 /gcc/tree-ssa-live.c
parent35e3ced91afa26d2fb8ad118de9c5e208dcc3944 (diff)
downloadgcc-7c6a62dd399b670aac5a1d8c96ba591b75df74b7.zip
gcc-7c6a62dd399b670aac5a1d8c96ba591b75df74b7.tar.gz
gcc-7c6a62dd399b670aac5a1d8c96ba591b75df74b7.tar.bz2
common.opt (ftree-combine-temps): Remove.
* common.opt (ftree-combine-temps): Remove. * tree-outof-ssa.c (SSANORM_COMBINE_TEMPS): Remove. (coalesce_ssa_name): Don't check for combine-temps. (coalesce_vars): Remove. (check_replaceable): Use num_imm_uses. (remove_ssa_form, insert_backedge_copies, rewrite_out_of_ssa): Don't check for combine-temps. (rewrite_out_of_ssa): Never create a ref_count in the var_map. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Change parms to register_ssa_partition calls. * tree-ssa-live.c (register_ssa_partition): Remove prototype. (init_var_map, delete_var_map): remove refernces to ref_count. (create_ssa_var_map): Never calculate a ref count. (type_var_init): Remove. * tree-ssa-live.h (typedef struct _var_map): Remove ref_count. (SSA_VAR_MAP_REF_COUNT): Delete. (create_ssa_var_map): Change Prototype to have no parameters. (version_ref_count): Delete. (register_ssa_partition): Remove 'is_use' paramater and don't set the ref_count vector. (type_var_num, type_var, type_var_first_partition, type_var_next_partition, type_var_dump, type_var_delete, type_var_remove_partition, type_var_find, type_var_compact, type_var_decompact): Remove. * gcc.dg/max-1.c: Remove reference to -fno-tree-lrs option. From-SVN: r119409
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c105
1 files changed, 9 insertions, 96 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index e1525c1..3d578ac 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -45,7 +45,6 @@ static tree_live_info_p new_tree_live_info (var_map);
static inline void set_if_valid (var_map, bitmap, tree);
static inline void add_livein_if_notdef (tree_live_info_p, bitmap,
tree, basic_block);
-static inline void register_ssa_partition (var_map, tree, bool);
static inline void add_conflicts_if_valid (tpa_p, conflict_graph,
var_map, bitmap, tree);
static partition_pair_p find_partition_pair (coalesce_list_p, int, int, bool);
@@ -79,7 +78,6 @@ init_var_map (int size)
map->compact_to_partition = NULL;
map->num_partitions = size;
map->partition_size = size;
- map->ref_count = NULL;
return map;
}
@@ -95,8 +93,6 @@ delete_var_map (var_map map)
free (map->partition_to_compact);
if (map->compact_to_partition)
free (map->compact_to_partition);
- if (map->ref_count)
- free (map->ref_count);
free (map);
}
@@ -402,11 +398,11 @@ remove_unused_locals (void)
new partition map is returned. */
var_map
-create_ssa_var_map (int flags)
+create_ssa_var_map (void)
{
block_stmt_iterator bsi;
basic_block bb;
- tree dest, use;
+ tree var;
tree stmt;
var_map map;
ssa_op_iter iter;
@@ -422,13 +418,6 @@ create_ssa_var_map (int flags)
used_in_virtual_ops = BITMAP_ALLOC (NULL);
#endif
- if (flags & SSA_VAR_MAP_REF_COUNT)
- {
- map->ref_count
- = (int *)xmalloc (((num_ssa_names + 1) * sizeof (int)));
- memset (map->ref_count, 0, (num_ssa_names + 1) * sizeof (int));
- }
-
FOR_EACH_BB (bb)
{
tree phi, arg;
@@ -436,12 +425,12 @@ create_ssa_var_map (int flags)
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
int i;
- register_ssa_partition (map, PHI_RESULT (phi), false);
+ register_ssa_partition (map, PHI_RESULT (phi));
for (i = 0; i < PHI_NUM_ARGS (phi); i++)
{
arg = PHI_ARG_DEF (phi, i);
if (TREE_CODE (arg) == SSA_NAME)
- register_ssa_partition (map, arg, true);
+ register_ssa_partition (map, arg);
mark_all_vars_used (&PHI_ARG_DEF_TREE (phi, i));
}
@@ -452,31 +441,22 @@ create_ssa_var_map (int flags)
stmt = bsi_stmt (bsi);
/* Register USE and DEF operands in each statement. */
- FOR_EACH_SSA_TREE_OPERAND (use , stmt, iter, SSA_OP_USE)
- {
- register_ssa_partition (map, use, true);
-
-#ifdef ENABLE_CHECKING
- bitmap_set_bit (used_in_real_ops, DECL_UID (SSA_NAME_VAR (use)));
-#endif
- }
-
- FOR_EACH_SSA_TREE_OPERAND (dest, stmt, iter, SSA_OP_DEF)
+ FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, (SSA_OP_DEF|SSA_OP_USE))
{
- register_ssa_partition (map, dest, false);
+ register_ssa_partition (map, var);
#ifdef ENABLE_CHECKING
- bitmap_set_bit (used_in_real_ops, DECL_UID (SSA_NAME_VAR (dest)));
+ bitmap_set_bit (used_in_real_ops, DECL_UID (SSA_NAME_VAR (var)));
#endif
}
#ifdef ENABLE_CHECKING
/* Validate that virtual ops don't get used in funny ways. */
- FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter,
+ FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter,
SSA_OP_VIRTUAL_USES | SSA_OP_VMUSTDEF)
{
bitmap_set_bit (used_in_virtual_ops,
- DECL_UID (SSA_NAME_VAR (use)));
+ DECL_UID (SSA_NAME_VAR (var)));
}
#endif /* ENABLE_CHECKING */
@@ -1069,73 +1049,6 @@ root_var_init (var_map map)
}
-/* Initialize a type_var structure which associates all the partitions in MAP
- of the same type to the type node's index. Volatiles are ignored. */
-
-type_var_p
-type_var_init (var_map map)
-{
- type_var_p tv;
- int x, y, p;
- int num_partitions = num_var_partitions (map);
- tree t;
- sbitmap seen;
-
- tv = tpa_init (map);
- if (!tv)
- return NULL;
-
- seen = sbitmap_alloc (num_partitions);
- sbitmap_zero (seen);
-
- for (x = num_partitions - 1; x >= 0; x--)
- {
- t = partition_to_var (map, x);
-
- /* Disallow coalescing of these types of variables. */
- if (!t
- || TREE_THIS_VOLATILE (t)
- || TREE_CODE (t) == RESULT_DECL
- || TREE_CODE (t) == PARM_DECL
- || (DECL_P (t)
- && (DECL_REGISTER (t)
- || !DECL_IGNORED_P (t)
- || DECL_RTL_SET_P (t))))
- continue;
-
- p = var_to_partition (map, t);
-
- gcc_assert (p != NO_PARTITION);
-
- /* If partitions have been coalesced, only add the representative
- for the partition to the list once. */
- if (TEST_BIT (seen, p))
- continue;
- SET_BIT (seen, p);
- t = TREE_TYPE (t);
-
- /* Find the list for this type. */
- for (y = 0; y < tv->num_trees; y++)
- if (t == VEC_index (tree, tv->trees, y))
- break;
- if (y == tv->num_trees)
- {
- tv->num_trees++;
- VEC_safe_push (tree, heap, tv->trees, t);
- VEC_safe_push (int, heap, tv->first_partition, p);
- }
- else
- {
- tv->next_partition[p] = VEC_index (int, tv->first_partition, y);
- VEC_replace (int, tv->first_partition, y, p);
- }
- tv->partition_to_tree_map[p] = y;
- }
- sbitmap_free (seen);
- return tv;
-}
-
-
/* Hash function for 2 integer coalesce pairs. */
#define COALESCE_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1))