This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More on c-gimplify.c:gimplify_decl_stmt
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 6 Jun 04 18:03:37 EDT
- Subject: Re: More on c-gimplify.c:gimplify_decl_stmt
More thoughts:
If we don't use get_inner_reference, we have to deal with PLACEHOLDER_EXPR.
The whole point of get_inner_reference is that it knows how to deal with
PLACEHOLDER_EXPR and all the other nonsense that's involved in computing
addresses. There's no point in having this knowlege elsewhere.
So how about this idea:
We have a node called something like REFEREFENCE_EXPR. It has three
operands. The first is what get_inner_reference returns for the inner
value. It's an aggregate and a GIMPLE object. The second operand is
the number of bytes offset from the value. It's been gimplified in
the usual manner. Since it was what get_inner_reference returns, all
such things as PLACEHOLDER_EXPRs have been taken care of. The third
operand is the original tree of _REF operations, so that things like
loop optimizers can deduce things about the loops in question.
The tricky part here is that the indexes in the original _REF tree will
be a subset of the gimplified operations in the second operand.