This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] TREE_ADDRESSABLE versus ARRAY_TYPE
On Mon, 2004-01-12 at 04:56, Richard Henderson wrote:
> On Mon, Jan 12, 2004 at 10:40:04AM +0100, Jan Hubicka wrote:
> > For part of compiler TREE_ADDRESABLE flag means "address of this object
> > has been taken" while elsewhere it means "this object must live in
> > memory after RTL expansion". It seems resonable to split these
> > meanings into different flags.
>
> I'm comfortable with ARRAY_REF with non-constant index imply
> addressability. If Diego *really* cares otherwise...
>
We need to have a way of telling whether an ARRAY_REF needs a mem slot
in needs_to_live_in_memory. Right now, we're simply returning true for
any ARRAY_TYPE.
If we can reliably set TREE_ADDRESSABLE *only* on those arrays that
truly need to live in memory, then we could change the test to
(TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE && TREE_ADDRESSABLE (t))
Diego.