This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: alias.c:nonoverlapping_component_refs_p


On Mon, 3 Dec 2001, Daniel Berlin wrote:

> On a RECORD_TYPE, it should be safe.
> 
> As for Ada, the tree.def says:
> /* Struct in C, or record in Pascal.  */
> /* Special fields:
>    TYPE_FIELDS  chain of FIELD_DECLs for the fields of the struct,
>      and VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
>      types and enumerators.
>    A few may need to be added for Pascal.  */
> /* See the comment above, before ENUMERAL_TYPE, for how
>    forward references to struct tags are handled in C.  */
> DEFTREECODE (RECORD_TYPE, "record_type", 't', 0)
> 
> 
> If Ada has different semantics, it needs a different tree code, or some
> easy way to differentiate.

This is one place we need tree lowering.  Start with a language-specific
tree produced by the front end, then lower it to a language-independent
tree, without any language-specific tree codes (including some of those
presently language-independent that logically relate more to C) and with
ordering (sequence point) and aliasing constraints explicitly encoded.
Then move to the mid-level RTL that has been discussed, then to current
RTL, with some optimisations at each stage of transformation.  The front
end should work out at the lowering stage what the aliasing constraints
are.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]