/* Forward propagation of single use variables.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
|| !CONSTANT_CLASS_P (op1)
|| !INTEGRAL_TYPE_P (TREE_TYPE (op1)))
continue;
+
+ /* Don't propagate if the first operand occurs in
+ an abnormal PHI. */
+ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0))
+ continue;
}
/* These cases require comparisons of a naked SSA_NAME or
|| (TREE_CODE (op1) != SSA_NAME
&& !is_gimple_min_invariant (op1)))
continue;
+
+ /* Don't propagate if the first operand occurs in
+ an abnormal PHI. */
+ if (TREE_CODE (op0) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0))
+ continue;
+
+ /* Don't propagate if the second operand occurs in
+ an abnormal PHI. */
+ if (TREE_CODE (op1) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op1))
+ continue;
}
/* If TEST_VAR is set from a TRUTH_NOT_EXPR, then it
if (TREE_CODE (def_rhs) != SSA_NAME
&& !is_gimple_min_invariant (def_rhs))
continue;
+
+ /* Don't propagate if the operand occurs in
+ an abnormal PHI. */
+ if (TREE_CODE (def_rhs) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def_rhs))
+ continue;
}
/* If TEST_VAR was set from a cast of an integer type
;
else
continue;
+
+ /* Don't propagate if the operand occurs in
+ an abnormal PHI. */
+ if (TREE_CODE (TREE_OPERAND (def_rhs, 0)) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (TREE_OPERAND
+ (def_rhs, 0)))
+ continue;
}
else
continue;
tree def = SSA_NAME_DEF_STMT (test_var);
dataflow_t df;
int j, num_uses, propagated_uses;
- block_stmt_iterator bsi;
VARRAY_POP (vars_worklist);
Unfortunately, we have to find the defining statement in
whatever block it might be in. */
if (num_uses && num_uses == propagated_uses)
- for (bsi = bsi_start (bb_for_stmt (def));
- !bsi_end_p (bsi);
- bsi_next (&bsi))
- {
- if (def == bsi_stmt (bsi))
- {
- bsi_remove (&bsi);
- break;
- }
- }
+ {
+ block_stmt_iterator bsi = bsi_for_stmt (def);
+ bsi_remove (&bsi);
+ }
}
}
basic_block bb;
varray_type vars_worklist, cond_worklist;
- vars = BITMAP_XMALLOC ();
+ vars = BITMAP_ALLOC (NULL);
VARRAY_TREE_INIT (vars_worklist, 10, "VARS worklist");
VARRAY_TREE_INIT (cond_worklist, 10, "COND worklist");
}
/* All done. Clean up. */
- BITMAP_XFREE (vars);
+ BITMAP_FREE (vars);
}