diff options
author | Richard Henderson <rth@redhat.com> | 2004-07-27 18:17:00 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-07-27 18:17:00 -0700 |
commit | e847cc68ebc1e2a961941e75ae613fec9f90463b (patch) | |
tree | 0c30f61b19cf213402a8b9492ba3424c41e1602b /gcc/tree-gimple.c | |
parent | b91accd685798cd0cb4f775bfcdcc40c18efbdb6 (diff) | |
download | gcc-e847cc68ebc1e2a961941e75ae613fec9f90463b.zip gcc-e847cc68ebc1e2a961941e75ae613fec9f90463b.tar.gz gcc-e847cc68ebc1e2a961941e75ae613fec9f90463b.tar.bz2 |
gimplify.c (is_gimple_addr_expr_arg_or_indirect): Remove.
* gimplify.c (is_gimple_addr_expr_arg_or_indirect): Remove.
(gimplify_modify_expr, gimplify_addr_expr, gimplify_expr): Use
is_gimple_addressable.
* tree-gimple.c (is_gimple_addressable): Rename from
is_gimple_addr_expr_arg; accept INDIRECT_REF.
(is_gimple_lvalue): Don't test INDIRECT_REF directly.
* tree-gimple.h, tree-sra.c, tree-ssa-loop-im.c: Update for
rename to is_gimple_addressable.
From-SVN: r85243
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r-- | gcc/tree-gimple.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c index 3d2fff8..4f26a08 100644 --- a/gcc/tree-gimple.c +++ b/gcc/tree-gimple.c @@ -118,16 +118,17 @@ Boston, MA 02111-1307, USA. */ addr-expr-arg: ID | compref - with-size-arg: addr-expr-arg + addressable : addr-expr-arg | indirectref + + with-size-arg: addressable | call-stmt indirectref : INDIRECT_REF op0 -> val - lhs : addr-expr-arg + lhs : addressable | bitfieldref - | indirectref | WITH_SIZE_EXPR op0 -> with-size-arg op1 -> val @@ -300,8 +301,7 @@ is_gimple_constructor_elt (tree t) bool is_gimple_lvalue (tree t) { - return (is_gimple_addr_expr_arg (t) - || TREE_CODE (t) == INDIRECT_REF + return (is_gimple_addressable (t) || TREE_CODE (t) == WITH_SIZE_EXPR /* These are complex lvalues, but don't have addresses, so they go here. */ @@ -317,13 +317,15 @@ is_gimple_condexpr (tree t) || TREE_CODE_CLASS (TREE_CODE (t)) == '<'); } -/* Return true if T is a valid operand for ADDR_EXPR. */ +/* Return true if T is something whose address can be taken. */ bool -is_gimple_addr_expr_arg (tree t) +is_gimple_addressable (tree t) { return (is_gimple_id (t) || handled_component_p (t) - || TREE_CODE (t) == REALPART_EXPR || TREE_CODE (t) == IMAGPART_EXPR); + || TREE_CODE (t) == REALPART_EXPR + || TREE_CODE (t) == IMAGPART_EXPR + || TREE_CODE (t) == INDIRECT_REF); } /* Return true if T is function invariant. Or rather a restricted |