This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa]: GIMPLE lowering array references too early?
- From: law at redhat dot com
- To: Chris Lattner <sabre at nondot dot org>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, gcc at gcc dot gnu dot org, jason at redhat dot com, dnovillo at redhat dot com
- Date: Tue, 29 Jul 2003 11:56:31 -0600
- Subject: Re: [tree-ssa]: GIMPLE lowering array references too early?
- Reply-to: law at redhat dot com
In message <Pine.LNX.4.44.0307291246230.3531-100000@nondot.org>, Chris Lattner
writes:
>
>> On Tue, 29 Jul 2003, Daniel Berlin wrote:
>>> We used to keep array references around (instead of transforming into
>>> address arithmetic), the thinking being that loop opts want them.
>
>> This seems to be the fault of the c front end, not the gimplifier.
>> It only builds array_refs in certain cases.
>
>I have also observed this as well, and would like this to change. Does
>anyone know what the repercussions of changing the CFE would be? In
>particular, it now only generates an ARRAY_REF if the first operand is
>actually an array, and now it could generate it if the first operand was a
>pointer as well.
>
>Would this break everything?
It's a source of annoyance. I had started cobbling together some code to
do this, but things kept breaking downstream. Probably due to my lack of
knowledge about reform the ARRAY_REFs/ARRAY_TYPEs.
I've seen real codes which suffer because of the inconsistencies in how
we generate trees for array references depending on whether or not the
underlying type is a pointer or an array.
jeff