diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2015-07-21 19:15:13 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2015-07-21 19:15:13 +0000 |
commit | f9ffade09c3cc13eb1a199a24517b9b1909c6e80 (patch) | |
tree | 15769f2b54469137ff69aba07b201d29a7b12110 /gcc/tree-ssa-operands.c | |
parent | 324000329be228765b56c2b11d24256a8a30000e (diff) | |
download | gcc-f9ffade09c3cc13eb1a199a24517b9b1909c6e80.zip gcc-f9ffade09c3cc13eb1a199a24517b9b1909c6e80.tar.gz gcc-f9ffade09c3cc13eb1a199a24517b9b1909c6e80.tar.bz2 |
ssa-iterators.h (has_zero_uses, [...]): Implement as straight loops.
2015-07-21 Andrew MacLeod <amacleod@redhat.com>
* ssa-iterators.h (has_zero_uses, has_single_use): Implement as
straight loops.
(single_imm_use): Check for iterator node.
(num_imm_uses): Likewise.
* tree-ssa-operands.c (has_zero_uses_1): Delete.
(single_imm_use_1): Check for iterator node.
From-SVN: r226051
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index a132679..b1e3f99 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -1304,22 +1304,6 @@ unlink_stmt_vdef (gimple stmt) SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vuse) = 1; } - -/* Return true if the var whose chain of uses starts at PTR has no - nondebug uses. */ -bool -has_zero_uses_1 (const ssa_use_operand_t *head) -{ - const ssa_use_operand_t *ptr; - - for (ptr = head->next; ptr != head; ptr = ptr->next) - if (!is_gimple_debug (USE_STMT (ptr))) - return false; - - return true; -} - - /* Return true if the var whose chain of uses starts at PTR has a single nondebug use. Set USE_P and STMT to that single nondebug use, if so, or to NULL otherwise. */ @@ -1330,7 +1314,7 @@ single_imm_use_1 (const ssa_use_operand_t *head, ssa_use_operand_t *ptr, *single_use = 0; for (ptr = head->next; ptr != head; ptr = ptr->next) - if (!is_gimple_debug (USE_STMT (ptr))) + if (USE_STMT(ptr) && !is_gimple_debug (USE_STMT (ptr))) { if (single_use) { @@ -1348,3 +1332,4 @@ single_imm_use_1 (const ssa_use_operand_t *head, return single_use; } + |