aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@act-europe.fr>2003-04-16 23:33:19 +0200
committerRichard Kenner <kenner@gcc.gnu.org>2003-04-16 17:33:19 -0400
commita9ecacf6c44316e20d54c36f84ae80dedfff09e6 (patch)
treed54db0fbb9e85319256be0471da62b0bf8117eb6 /gcc/tree.h
parent15b19a7dbf433b1936eecd042ce7dedbb23220f9 (diff)
downloadgcc-a9ecacf6c44316e20d54c36f84ae80dedfff09e6.zip
gcc-a9ecacf6c44316e20d54c36f84ae80dedfff09e6.tar.gz
gcc-a9ecacf6c44316e20d54c36f84ae80dedfff09e6.tar.bz2
tree.c (skip_simple_arithmetics_at, [...]): New functions.
* tree.c (skip_simple_arithmetics_at, saved_expr_p): New functions. (save_expr): Replace loop by call to skip_simple_arithmetics_at. * tree.h: Add prototypes for the two new functions. * fold-const.c (fold_binary_op_with_conditional_arg): Replace test updates introduced in the previous revision by call to saved_expr_p. * stor-layout.c (put_pending_size): Use skip_simple_arithmetics_at. From-SVN: r65702
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 95f2ad4..44ccd45 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2681,6 +2681,16 @@ extern int lvalue_or_else PARAMS ((tree, const char *));
extern tree save_expr PARAMS ((tree));
+/* Look inside EXPR and into any simple arithmetic operations. Return
+ the innermost non-arithmetic node. */
+
+extern tree skip_simple_arithmetic PARAMS ((tree));
+
+/* Return TRUE if EXPR is a SAVE_EXPR or wraps simple arithmetic around a
+ SAVE_EXPR. Return FALSE otherwise. */
+
+extern bool saved_expr_p PARAMS ((tree));
+
/* Returns the index of the first non-tree operand for CODE, or the number
of operands if all are trees. */