More on c-gimplify.c:gimplify_decl_stmt
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Sun Jun 6 22:02:00 GMT 2004
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.
More information about the Gcc
mailing list