This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]