* tree-ssa-dse.c (dse_optimize_stmt): Avoid num_imm_uses when
checking for zero or one use.
* tree-ssa-dom.c (propagate_rhs_into_lhs): Similarly.
* tree-cfgcleanup.c (merge_phi_nodes): Similarly.
* tree-ssa-reassoc.c (negate_value): Similarly.
(reassociate_bb): Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113120
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-04-20 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/26854
+ * tree-ssa-dse.c (dse_optimize_stmt): Avoid num_imm_uses when
+ checking for zero or one use.
+ * tree-ssa-dom.c (propagate_rhs_into_lhs): Similarly.
+ * tree-cfgcleanup.c (merge_phi_nodes): Similarly.
+ * tree-ssa-reassoc.c (negate_value): Similarly.
+ (reassociate_bb): Similarly.
+
2006-04-20 Jakub Jelinek <jakub@redhat.com>
* c-pretty-print.c (pp_c_direct_abstract_declarator): Print
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree result = PHI_RESULT (phi);
- int num_uses = num_imm_uses (result);
use_operand_p imm_use;
tree use_stmt;
/* If the PHI's result is never used, then we can just
ignore it. */
- if (num_uses == 0)
+ if (has_zero_uses (result))
continue;
/* Get the single use of the result of this PHI node. */
The maximum number of times we can re-execute the loop is
bounded by the maximum number of times a given SSA_NAME
appears in a single statement. */
- if (all && num_imm_uses (lhs) != 0)
+ if (all && !has_zero_uses (lhs))
goto repeat;
/* If we were able to propagate away all uses of LHS, then
/* If this virtual def does not have precisely one use, then
we will not be able to eliminate STMT. */
- if (num_imm_uses (defvar) != 1)
+ if (! has_single_use (defvar))
{
fail = true;
break;
if (TREE_CODE (tonegate) == SSA_NAME
&& TREE_CODE (negatedef) == MODIFY_EXPR
&& TREE_CODE (TREE_OPERAND (negatedef, 0)) == SSA_NAME
- && num_imm_uses (TREE_OPERAND (negatedef, 0)) == 1
+ && has_single_use (TREE_OPERAND (negatedef, 0))
&& TREE_CODE (TREE_OPERAND (negatedef, 1)) == PLUS_EXPR)
{
block_stmt_iterator bsi;
/* There may be no immediate uses left by the time we
get here because we may have eliminated them all. */
- if (TREE_CODE (lhs) == SSA_NAME && num_imm_uses (lhs) == 0)
+ if (TREE_CODE (lhs) == SSA_NAME && has_zero_uses (lhs))
continue;
TREE_VISITED (stmt) = 1;