questions
Jim Wilson
wilson@tuliptree.org
Sun Aug 10 07:22:00 GMT 2003
The Deus wrote:
> 1) pointers/references
> I can't understand how are used the nodes indirectref, nop, convert,
> mustnotthow, nonlvalue, addr.
nonlvalue is for semantic checking. If language rules don't allow a
value to be an lvalue, then it is wrapped in nonvalue. nop is used for
type conversions that don't change the value. convert is used for type
conversions that do change the value.
> I have done some tests with pointers and references. I can't know when the
> node describe the unreference action or address computing action.
> indirect seems to be like * C operator and addr seems to be like & C
> operator but it's not true.
Yes, it is true. Why do you think it isn't?
> 2) plus operator
> if i write the expression "a.y", the internal GCC represention is sometimes
> a set of nodes using 'plus' node instead of a single 'ComponentRef' node.
This is an "optimization" that simplies trees before RTL generation.
Traditionally, we didn't do much optimization at the tree level other
than constant folding, so it wasn't necessary to preserve component refs.
You might want to check out the tree-ssa branch. They are trying to
perform a lot of optimizations at the tree (gimple) level, so they have
an interest in preserving info useful to high level optimizers like
component refs.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list