diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-16 21:13:08 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-16 21:13:08 +0000 |
commit | 80f0648113a67e5f40ab1c19bed50d37262dbfdf (patch) | |
tree | a6887d7a4c296d5e39f29a2367845311f7100e89 /gcc/tree-ssa-ccp.c | |
parent | 88a09153515cca1388a7284174c5ff5ae4b93cb0 (diff) | |
download | ppe42-gcc-80f0648113a67e5f40ab1c19bed50d37262dbfdf.tar.gz ppe42-gcc-80f0648113a67e5f40ab1c19bed50d37262dbfdf.zip |
* tree-def (WITH_SIZE_EXPR): New.
* explow.c (expr_size, int_expr_size): Handle WITH_SIZE_EXPR.
* expr.c (expand_expr_real_1): Likewise.
* gimplify.c (maybe_with_size_expr): New.
(gimplify_arg, gimplify_modify_expr): Use it.
(gimplify_modify_expr_to_memcpy): Take size parameter.
(gimplify_modify_expr_to_memset): Likewise.
(gimplify_expr): Handle WITH_SIZE_EXPR.
* tree-alias-common.c (find_func_aliases): Likewise.
* tree-eh.c (tree_could_trap_p): Likewise.
(tree_could_throw_p): Likewise.
* tree-gimple.c (is_gimple_lvalue): Likewise.
(get_call_expr_in): Likewise.
* tree-inline.c (estimate_num_insns_1): Likewise.
(expand_calls_inline): Likewise.
* tree-nested.c (convert_call_expr): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-sra.c (sra_walk_expr): Likewise.
* tree-ssa-alias.c (add_pointed_to_expr): Likewise.
* tree-ssa-ccp.c (get_rhs, set_rhs): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-tailcall.c (find_tail_calls): Likewise.
* calls.c (expand_call): Reset old_stack_allocated after
calling emit_stack_restore.
* gcc.c-torture/compile/20020210-1.c: Remove XFAIL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 7f28a9f9e93..0c35717531d 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2085,13 +2085,16 @@ get_rhs (tree stmt) { case RETURN_EXPR: stmt = TREE_OPERAND (stmt, 0); - if (stmt) - return get_rhs (stmt); - else - return NULL; + if (!stmt || TREE_CODE (stmt) != MODIFY_EXPR) + return stmt; + /* FALLTHRU */ case MODIFY_EXPR: - return TREE_OPERAND (stmt, 1); + stmt = TREE_OPERAND (stmt, 1); + if (TREE_CODE (stmt) == WITH_SIZE_EXPR) + return TREE_OPERAND (stmt, 0); + else + return stmt; case COND_EXPR: return COND_EXPR_COND (stmt); @@ -2143,6 +2146,9 @@ set_rhs (tree *stmt_p, tree expr) /* FALLTHRU */ case MODIFY_EXPR: + op = TREE_OPERAND (stmt, 1); + if (TREE_CODE (op) == WITH_SIZE_EXPR) + stmt = op; TREE_OPERAND (stmt, 1) = expr; break; |