aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 5f7efa7de31..14f169c1941 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -459,6 +459,18 @@ has_single_use (tree var)
return (ptr != ptr->next && ptr == ptr->next->next);
}
+
+/* If VAR has only a single immediate use, return true. */
+static inline bool
+single_imm_use_p (tree var)
+{
+ ssa_use_operand_t *ptr;
+
+ ptr = &(SSA_NAME_IMM_USE_NODE (var));
+ return (ptr != ptr->next && ptr == ptr->next->next);
+}
+
+
/* If VAR has only a single immediate use, return true, and set USE_P and STMT
to the use pointer and stmt of occurrence. */
static inline bool