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: Chris Lattner <sabre at nondot dot org>
- To: law at redhat dot com
- 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 13:44:58 -0500 (CDT)
- Subject: Re: [tree-ssa]: GIMPLE lowering array references too early?
On Tue, 29 Jul 2003 law@redhat.com wrote:
> For code of that style the compiler lowers to pointer notation as it's
> generating the tree IL. It'd be *far* better if it kept the existing
> array notation for this case. We have the toplevel object (a pointer)
> and an index, rather than generating pointer code we should be generating
> a suitable ARRAY_REF.
I understand, and totally agree. :)
> >Given the right people working on the problem, and enough interest, do you
> >think it's possible to "fix it right" in the places that break downstream?
> More likely the solution is actually generate the correct ARRAY_REF/ARRAY_TYPE
> structures to begin with. As I said, I'm pretty sure the failures where
> me simply generating the wrong tree nodes.
The problem is that there _is no array_ being reference here. It seems
like it would be easier to adjust code using ARRAY_REF's to allow either
an ARRAY_TYPE or POINTER_TYPE operand...
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/