This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal for reference annotations
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 23 Jun 2004 15:27:00 -0700
- Subject: Re: Proposal for reference annotations
- References: <10406232011.AA20970@vlsi1.ultra.nyu.edu>
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.