+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>
* config/s390/s390.c (s390_preferred_reload_class): Return NO_REGS
{
edge e_fall, e_taken, e;
rtx bb_end_insn;
- basic_block nb;
+ basic_block nb, src_bb;
edge_iterator ei;
if (EDGE_COUNT (bb->succs) == 0)
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);
if (nb)
{
bb = nb;
/* 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). */
- BB_COPY_PARTITION (e_fall->src, single_pred (bb));
+ BB_COPY_PARTITION (src_bb, single_pred (bb));
if (flag_reorder_blocks_and_partition
&& targetm.have_named_sections
&& JUMP_P (BB_END (bb))
expr = gimple_assign_rhs1 (stmt);
propagate_tree_value (&expr, val);
gimple_assign_set_rhs_from_tree (gsi, expr);
- stmt = gsi_stmt (*gsi);
}
else if (gimple_code (stmt) == GIMPLE_COND)
{
{
tree *t, *next;
bool unused = !TREE_USED (scope);
- var_ann_t ann;
int nsubblocks = 0;
for (t = &BLOCK_VARS (scope); *t; t = next)
info about optimized-out variables in the scope blocks.
Exception are the scope blocks not containing any instructions
at all so user can't get into the scopes at first place. */
- else if ((ann = var_ann (*t)) != NULL
- && is_used_p (*t))
+ else if (var_ann (*t) != NULL && is_used_p (*t))
unused = false;
else if (TREE_CODE (*t) == LABEL_DECL && TREE_USED (*t))
/* For labels that are still used in the IL, the decision to
basic_block bb;
tree var, t;
referenced_var_iterator rvi;
- var_ann_t ann;
bitmap global_unused_vars = NULL;
unsigned srcidx, dstidx, num;
{
var = VEC_index (tree, cfun->local_decls, srcidx);
if (TREE_CODE (var) != FUNCTION_DECL
- && (!(ann = var_ann (var))
+ && (!var_ann (var)
|| !is_used_p (var)))
{
if (is_global_var (var))
FOR_EACH_LOCAL_DECL (cfun, ix, var)
if (TREE_CODE (var) == VAR_DECL
&& is_global_var (var)
- && (ann = var_ann (var)) != NULL
+ && var_ann (var) != NULL
&& is_used_p (var))
mark_all_vars_used (&DECL_INITIAL (var), global_unused_vars);