This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Removing the use of CONSTRUCTOR for Vectors
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 16 Sep 2006 22:23:54 -0700
- Subject: Removing the use of CONSTRUCTOR for Vectors
I just got crazy idea, since we really don't like CONSTRUCTOR that much
and we already know the lengths of Vectors, we can have a VECTOR_EXPR
which we could then use instead of CONSTRUCTORs.
This would also save some memory as then we don't need a real
VEC(constructor_elt) but more like what TREE_VEC is.
So we have:
struct tree_vector GTY(())
{
struct tree_common common;
tree ((length ("TYPE_VECTOR_SUBPARTS (TREE_TYPE ((tree)&%h))")))
elements[1];
};
This will be the structure for both VECTOR_CST and VECTOR_EXPR.
What do people think about this idea?
Thanks,
Andrew Pinski