Proposal for reference annotations
Richard Henderson
rth@redhat.com
Wed Jun 23 22:29:00 GMT 2004
On Wed, Jun 23, 2004 at 04:11:37PM -0400, Richard Kenner wrote:
> So my proposal is that we add an annotation mechanism for ARRAY_REF,
> ARRAY_RANGE_REF, and COMPONENT_REF. Because in most cases these fields will
> be constants and usually the same for many nodes, we set up a hash table
> mechanism like MEM_ATTRS and have the rule that you need to make a new one in
> order to modify one.
Where are you going to put this annotation? If on the node, then
you're no different than the current state that Mark hates. If in
a look-aside datastructure, then you're going to require *every*
examination of a reference within the optimizer to do a search?
Further, if you share these, then putting the lower bound, stride,
offset, whathaveyou in SSA form will be impossible[1]. You'll have
in effect EXACTLY reconstructed the situation with the DECL/TYPE_SIZE
data that caused us to want to add the extra ref arguments in the
first place.
I see no advantage to be gained from this proposal.
r~
[1] get_expr_operands finds addresses of operands, and optimizers assume
that they can replace operands just by storing to the address. I suppose
you could share iff everything is constant.
More information about the Gcc
mailing list