Proposed location for variable sizes etc in ARRAY_REF and COMPONENT_REF
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Wed Jun 23 03:07:00 GMT 2004
No. They don't exist early enough. Nor are they terribly stable.
Well they don't exist *at all* now: we just have annotations for other
types of trees. Why can't they be allocated during gimplification?
Who's going to change them?
> I *really* don't like the idea of two tree codes ...
Why not? All the ugly stuff should be hidden behind the
accessors that you wrote. It's just a matter of putting
both codes in any switch statement (or whatever).
It's the "wherever" that bothers me. It's a maintanence burden for people to
know that whenever they have to test for one they have to test for the other.
These kinds of things tend to rot.
For example, nearly every time you check for ARRAY_REF, you also have to
check for ARRAY_RANGE_REF. However, nearly all of the tree-*.c files didn't
do this. We're looking at the same situation if we add new nodes.
Yes, we'll always use the full nodes for the tree optimizers, but that still
leaves a lot of code.
I view having two tree nodes as a last resort. Another option is to make a
hash table for the nodes and store the data there. But I was looking for
something more direct and saw the annotation field that's currently unused in
those node types.
More information about the Gcc
mailing list