aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 20e05ad..84a4d5b 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1203,6 +1203,24 @@ ssa_undefined_value_p (tree t, bool partial)
}
+/* Return TRUE iff STMT, a gimple statement, references an undefined
+ SSA name. */
+
+bool
+gimple_uses_undefined_value_p (gimple *stmt)
+{
+ ssa_op_iter iter;
+ tree op;
+
+ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE)
+ if (ssa_undefined_value_p (op))
+ return true;
+
+ return false;
+}
+
+
+
/* If necessary, rewrite the base of the reference tree *TP from
a MEM_REF to a plain or converted symbol. */