Commit fd0477ca by Kugan Vivekanandarajah Committed by Kugan Vivekanandarajah

tree-ssa-coalesce.c (register_default_def): Remove register_ssa_partition.

gcc/ChangeLog:

2016-11-16  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* tree-ssa-coalesce.c (register_default_def): Remove register_ssa_partition.
	(create_outofssa_var_map): Likewise.
	* tree-ssa-live.c (register_ssa_partition_check): Remove.
	* tree-ssa-live.h (register_ssa_partition): Likewise.

From-SVN: r242461
parent a8dd1337
2016-11-16 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-ssa-coalesce.c (register_default_def): Remove register_ssa_partition.
(create_outofssa_var_map): Likewise.
* tree-ssa-live.c (register_ssa_partition_check): Remove.
* tree-ssa-live.h (register_ssa_partition): Likewise.
2016-11-15 Bernd Edlinger <bernd.edlinger@hotmail.de> 2016-11-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
* genattrtab.c (attr_rtx_1): Avoid allocating new rtx objects. * genattrtab.c (attr_rtx_1): Avoid allocating new rtx objects.
...@@ -1040,17 +1040,13 @@ create_default_def (tree var, void *arg ATTRIBUTE_UNUSED) ...@@ -1040,17 +1040,13 @@ create_default_def (tree var, void *arg ATTRIBUTE_UNUSED)
/* Register VAR's default def in MAP. */ /* Register VAR's default def in MAP. */
static void static void
register_default_def (tree var, void *map_) register_default_def (tree var, void *arg ATTRIBUTE_UNUSED)
{ {
var_map map = (var_map)map_;
if (!is_gimple_reg (var)) if (!is_gimple_reg (var))
return; return;
tree ssa = ssa_default_def (cfun, var); tree ssa = ssa_default_def (cfun, var);
gcc_assert (ssa); gcc_assert (ssa);
register_ssa_partition (map, ssa);
} }
/* If VAR is an SSA_NAME associated with a PARM_DECL or a RESULT_DECL, /* If VAR is an SSA_NAME associated with a PARM_DECL or a RESULT_DECL,
...@@ -1088,7 +1084,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy) ...@@ -1088,7 +1084,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy)
gimple *stmt; gimple *stmt;
tree first; tree first;
var_map map; var_map map;
ssa_op_iter iter;
int v1, v2, cost; int v1, v2, cost;
unsigned i; unsigned i;
...@@ -1096,7 +1091,7 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy) ...@@ -1096,7 +1091,7 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy)
map = init_var_map (num_ssa_names); map = init_var_map (num_ssa_names);
for_all_parms (register_default_def, map); for_all_parms (register_default_def, NULL);
FOR_EACH_BB_FN (bb, cfun) FOR_EACH_BB_FN (bb, cfun)
{ {
...@@ -1114,7 +1109,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy) ...@@ -1114,7 +1109,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy)
res = gimple_phi_result (phi); res = gimple_phi_result (phi);
ver = SSA_NAME_VERSION (res); ver = SSA_NAME_VERSION (res);
register_ssa_partition (map, res);
/* Register ssa_names and coalesces between the args and the result /* Register ssa_names and coalesces between the args and the result
of all PHI. */ of all PHI. */
...@@ -1125,7 +1119,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy) ...@@ -1125,7 +1119,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy)
if (TREE_CODE (arg) != SSA_NAME) if (TREE_CODE (arg) != SSA_NAME)
continue; continue;
register_ssa_partition (map, arg);
if (gimple_can_coalesce_p (arg, res) if (gimple_can_coalesce_p (arg, res)
|| (e->flags & EDGE_ABNORMAL)) || (e->flags & EDGE_ABNORMAL))
{ {
...@@ -1152,10 +1145,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy) ...@@ -1152,10 +1145,6 @@ create_outofssa_var_map (coalesce_list *cl, bitmap used_in_copy)
if (is_gimple_debug (stmt)) if (is_gimple_debug (stmt))
continue; continue;
/* Register USE and DEF operands in each statement. */
FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, (SSA_OP_DEF|SSA_OP_USE))
register_ssa_partition (map, var);
/* Check for copy coalesces. */ /* Check for copy coalesces. */
switch (gimple_code (stmt)) switch (gimple_code (stmt))
{ {
......
...@@ -1276,22 +1276,6 @@ debug (tree_live_info_d *ptr) ...@@ -1276,22 +1276,6 @@ debug (tree_live_info_d *ptr)
} }
/* Verify that SSA_VAR is a non-virtual SSA_NAME. */
void
register_ssa_partition_check (tree ssa_var)
{
gcc_assert (TREE_CODE (ssa_var) == SSA_NAME);
if (virtual_operand_p (ssa_var))
{
fprintf (stderr, "Illegally registering a virtual SSA name :");
print_generic_expr (stderr, ssa_var, TDF_SLIM);
fprintf (stderr, " in the SSA->Normal phase.\n");
internal_error ("SSA corruption");
}
}
/* Verify that the info in LIVE matches the current cfg. */ /* Verify that the info in LIVE matches the current cfg. */
static void static void
......
...@@ -80,7 +80,6 @@ extern void remove_unused_locals (void); ...@@ -80,7 +80,6 @@ extern void remove_unused_locals (void);
extern void dump_var_map (FILE *, var_map); extern void dump_var_map (FILE *, var_map);
extern void debug (_var_map &ref); extern void debug (_var_map &ref);
extern void debug (_var_map *ptr); extern void debug (_var_map *ptr);
extern void register_ssa_partition_check (tree ssa_var);
/* Return number of partitions in MAP. */ /* Return number of partitions in MAP. */
...@@ -174,18 +173,6 @@ num_basevars (var_map map) ...@@ -174,18 +173,6 @@ num_basevars (var_map map)
} }
/* This routine registers a partition for SSA_VAR with MAP. Any unregistered
partitions may be filtered out by a view later. */
static inline void
register_ssa_partition (var_map map ATTRIBUTE_UNUSED, tree ssa_var)
{
if (flag_checking)
register_ssa_partition_check (ssa_var);
}
/* ---------------- live on entry/exit info ------------------------------ /* ---------------- live on entry/exit info ------------------------------
This structure is used to represent live range information on SSA based This structure is used to represent live range information on SSA based
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment