diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-28 01:17:00 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-28 01:17:00 +0000 |
| commit | c2514472e15476dac16d57406e535ccc2ed0fa08 (patch) | |
| tree | 0c30f61b19cf213402a8b9492ba3424c41e1602b /gcc/tree-gimple.c | |
| parent | aa0be1ca428fb600c08a6156e5fb4ea0fe0f98b6 (diff) | |
| download | ppe42-gcc-c2514472e15476dac16d57406e535ccc2ed0fa08.tar.gz ppe42-gcc-c2514472e15476dac16d57406e535ccc2ed0fa08.zip | |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85243 138bc75d-0d04-0410-961f-82ee72b054a4
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 3d2fff897ed..4f26a084fc0 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 |

