This is the mail archive of the gcc@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: Short Displacement Problems.


> 
> > In my experiments I've been simply using ADRESSOF as kind of "ticket for
> > stack slot" and it appears to work pretty well up to the reload.  Major
> > problem is that lowering the code may result in CSEable expressions.
> 
> Right, but the problem is that ADDRESSOF doesn't work in general for
> structs.  The result is a huge penalty in C++ for temporary objects
> with more than one data member, compared to with one.

In my simple minded patch it did - I simply assigned ADDRESSOF for a
struct (and each object on the stack) and purge_adressof homed the
structure on stack when addressof reference survived.  At least we
didn't allocate stack slots for structs never used.
But what we really need is scalar replacement I guess and that would
take more work.

Honza
> 
> Stack slot assignment probably isn't worth the bother unless it works
> for structs, not just objects that have a mode that GCC knows about.


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