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: [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))

What is not completely clear to me is why Gimple code needs to know that
the array must be output to memory in the end.
It seems to me that all passes (like tail call discovery or aliasing)
don't care and all needs to know that address has not been taken so the
accesses to this does not alias any idirect accesses.
SRA needs special care for nonconstant references as it can't fully
scalarize the array, but it can use the discover_nonconstant.* bits.

Honza
> 
> 
> Diego.


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