aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-gimple.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2004-07-14 14:16:48 -0400
committerJason Merrill <jason@gcc.gnu.org>2004-07-14 14:16:48 -0400
commit0c322af34a9bdd8bce4b32a0aab0777580b20b9b (patch)
tree2cec016794db7f4edc897fa4b5d68c8d7bb1ec15 /gcc/tree-gimple.h
parent3ac5ea7c80dd6f688952560fc425c6b06d6c3c94 (diff)
downloadgcc-0c322af34a9bdd8bce4b32a0aab0777580b20b9b.zip
gcc-0c322af34a9bdd8bce4b32a0aab0777580b20b9b.tar.gz
gcc-0c322af34a9bdd8bce4b32a0aab0777580b20b9b.tar.bz2
tree-gimple.c (is_gimple_reg_rhs, [...]): New fns.
* tree-gimple.c (is_gimple_reg_rhs, is_gimple_mem_rhs): New fns. (rhs_test_for): New fn. (is_gimple_tmp_rhs): Rename from is_gimple_rhs. * tree-gimple.h: Declare them. * gimplify.c (gimplify_modify_expr): Use the new fns. From-SVN: r84696
Diffstat (limited to 'gcc/tree-gimple.h')
-rw-r--r--gcc/tree-gimple.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree-gimple.h b/gcc/tree-gimple.h
index 5395c67..32647a0 100644
--- a/gcc/tree-gimple.h
+++ b/gcc/tree-gimple.h
@@ -39,6 +39,8 @@ extern void annotate_all_with_locus (tree *, location_t);
the basic form of the expression, they don't recurse to make sure that
underlying nodes are also of the right form. */
+typedef bool (*gimple_predicate)(tree);
+
/* Returns true iff T is a valid GIMPLE statement. */
extern bool is_gimple_stmt (tree);
@@ -59,8 +61,15 @@ extern bool is_gimple_lvalue (tree);
extern bool is_gimple_min_invariant (tree);
/* Returns true iff T is a GIMPLE rvalue. */
extern bool is_gimple_val (tree);
-/* Returns true iff T is a valid rhs for a MODIFY_EXPR. */
-extern bool is_gimple_rhs (tree);
+/* Returns true iff T is a valid rhs for a MODIFY_EXPR where the LHS is a
+ GIMPLE temporary, a renamed user variable, or something else,
+ respectively. */
+extern bool is_gimple_tmp_rhs (tree);
+extern bool is_gimple_reg_rhs (tree);
+extern bool is_gimple_mem_rhs (tree);
+/* Returns the appropriate one of the above three predicates for the LHS
+ T. */
+extern gimple_predicate rhs_predicate_for (tree);
/* Returns true iff T is a valid if-statement condition. */
extern bool is_gimple_condexpr (tree);