Commit 67295642 by Jeff Law Committed by Jeff Law

tree-ssa-live.c (remove_unused_scope_block_p): Remove set but unused variable "ann".


	* tree-ssa-live.c (remove_unused_scope_block_p): Remove set but
	unused variable "ann".
	(remove_unused_locals): Likewise.

	* tree-ssa-copy.c (propagate_tree_value_into_stmt): Remove useless
	statement.

	* cfglayout.c (fixup_reorder_chain): Do not dereference E_FALL
	after it is freed.

From-SVN: r171408
parent 3a4639b4
2011-03-24 Jeff Law <law@redhat.com>
* tree-ssa-live.c (remove_unused_scope_block_p): Remove set but
unused variable "ann".
(remove_unused_locals): Likewise.
* tree-ssa-copy.c (propagate_tree_value_into_stmt): Remove useless
statement.
* cfglayout.c (fixup_reorder_chain): Do not dereference E_FALL
after it is freed.
2011-03-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> 2011-03-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_preferred_reload_class): Return NO_REGS * config/s390/s390.c (s390_preferred_reload_class): Return NO_REGS
......
...@@ -766,7 +766,7 @@ fixup_reorder_chain (void) ...@@ -766,7 +766,7 @@ fixup_reorder_chain (void)
{ {
edge e_fall, e_taken, e; edge e_fall, e_taken, e;
rtx bb_end_insn; rtx bb_end_insn;
basic_block nb; basic_block nb, src_bb;
edge_iterator ei; edge_iterator ei;
if (EDGE_COUNT (bb->succs) == 0) if (EDGE_COUNT (bb->succs) == 0)
...@@ -894,7 +894,10 @@ fixup_reorder_chain (void) ...@@ -894,7 +894,10 @@ fixup_reorder_chain (void)
continue; continue;
} }
/* We got here if we need to add a new jump insn. */ /* We got here if we need to add a new jump insn.
Note force_nonfallthru can delete E_FALL and thus we have to
save E_FALL->src prior to the call to force_nonfallthru. */
src_bb = e_fall->src;
nb = force_nonfallthru (e_fall); nb = force_nonfallthru (e_fall);
if (nb) if (nb)
{ {
...@@ -905,9 +908,9 @@ fixup_reorder_chain (void) ...@@ -905,9 +908,9 @@ fixup_reorder_chain (void)
bb = nb; bb = nb;
/* Make sure new bb is tagged for correct section (same as /* Make sure new bb is tagged for correct section (same as
fall-thru source, since you cannot fall-throu across fall-thru source, since you cannot fall-thru across
section boundaries). */ section boundaries). */
BB_COPY_PARTITION (e_fall->src, single_pred (bb)); BB_COPY_PARTITION (src_bb, single_pred (bb));
if (flag_reorder_blocks_and_partition if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections && targetm.have_named_sections
&& JUMP_P (BB_END (bb)) && JUMP_P (BB_END (bb))
......
...@@ -244,7 +244,6 @@ propagate_tree_value_into_stmt (gimple_stmt_iterator *gsi, tree val) ...@@ -244,7 +244,6 @@ propagate_tree_value_into_stmt (gimple_stmt_iterator *gsi, tree val)
expr = gimple_assign_rhs1 (stmt); expr = gimple_assign_rhs1 (stmt);
propagate_tree_value (&expr, val); propagate_tree_value (&expr, val);
gimple_assign_set_rhs_from_tree (gsi, expr); gimple_assign_set_rhs_from_tree (gsi, expr);
stmt = gsi_stmt (*gsi);
} }
else if (gimple_code (stmt) == GIMPLE_COND) else if (gimple_code (stmt) == GIMPLE_COND)
{ {
......
...@@ -427,7 +427,6 @@ remove_unused_scope_block_p (tree scope) ...@@ -427,7 +427,6 @@ remove_unused_scope_block_p (tree scope)
{ {
tree *t, *next; tree *t, *next;
bool unused = !TREE_USED (scope); bool unused = !TREE_USED (scope);
var_ann_t ann;
int nsubblocks = 0; int nsubblocks = 0;
for (t = &BLOCK_VARS (scope); *t; t = next) for (t = &BLOCK_VARS (scope); *t; t = next)
...@@ -467,8 +466,7 @@ remove_unused_scope_block_p (tree scope) ...@@ -467,8 +466,7 @@ remove_unused_scope_block_p (tree scope)
info about optimized-out variables in the scope blocks. info about optimized-out variables in the scope blocks.
Exception are the scope blocks not containing any instructions Exception are the scope blocks not containing any instructions
at all so user can't get into the scopes at first place. */ at all so user can't get into the scopes at first place. */
else if ((ann = var_ann (*t)) != NULL else if (var_ann (*t) != NULL && is_used_p (*t))
&& is_used_p (*t))
unused = false; unused = false;
else if (TREE_CODE (*t) == LABEL_DECL && TREE_USED (*t)) else if (TREE_CODE (*t) == LABEL_DECL && TREE_USED (*t))
/* For labels that are still used in the IL, the decision to /* For labels that are still used in the IL, the decision to
...@@ -690,7 +688,6 @@ remove_unused_locals (void) ...@@ -690,7 +688,6 @@ remove_unused_locals (void)
basic_block bb; basic_block bb;
tree var, t; tree var, t;
referenced_var_iterator rvi; referenced_var_iterator rvi;
var_ann_t ann;
bitmap global_unused_vars = NULL; bitmap global_unused_vars = NULL;
unsigned srcidx, dstidx, num; unsigned srcidx, dstidx, num;
...@@ -766,7 +763,7 @@ remove_unused_locals (void) ...@@ -766,7 +763,7 @@ remove_unused_locals (void)
{ {
var = VEC_index (tree, cfun->local_decls, srcidx); var = VEC_index (tree, cfun->local_decls, srcidx);
if (TREE_CODE (var) != FUNCTION_DECL if (TREE_CODE (var) != FUNCTION_DECL
&& (!(ann = var_ann (var)) && (!var_ann (var)
|| !is_used_p (var))) || !is_used_p (var)))
{ {
if (is_global_var (var)) if (is_global_var (var))
...@@ -798,7 +795,7 @@ remove_unused_locals (void) ...@@ -798,7 +795,7 @@ remove_unused_locals (void)
FOR_EACH_LOCAL_DECL (cfun, ix, var) FOR_EACH_LOCAL_DECL (cfun, ix, var)
if (TREE_CODE (var) == VAR_DECL if (TREE_CODE (var) == VAR_DECL
&& is_global_var (var) && is_global_var (var)
&& (ann = var_ann (var)) != NULL && var_ann (var) != NULL
&& is_used_p (var)) && is_used_p (var))
mark_all_vars_used (&DECL_INITIAL (var), global_unused_vars); mark_all_vars_used (&DECL_INITIAL (var), global_unused_vars);
......
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