diff options
author | Olivier Hainque <hainque@act-europe.fr> | 2003-04-16 23:33:19 +0200 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-04-16 17:33:19 -0400 |
commit | a9ecacf6c44316e20d54c36f84ae80dedfff09e6 (patch) | |
tree | d54db0fbb9e85319256be0471da62b0bf8117eb6 /gcc/tree.h | |
parent | 15b19a7dbf433b1936eecd042ce7dedbb23220f9 (diff) | |
download | gcc-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.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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. */ |