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: [PATCH] Dissociate store_expr's temp from exp so that it is not marked as addressable


On Tue, 3 Apr 2012, Eric Botcazou wrote:

> > Yes, either way I suppose.  The following also looks dangerous to me:
> >
> >         /* If OFFSET is making OP0 more aligned than BIGGEST_ALIGNMENT,
> >            record its alignment as BIGGEST_ALIGNMENT.  */
> >         if (MEM_P (op0) && bitpos == 0 && offset != 0
> >             && is_aligning_offset (offset, tem))
> >           set_mem_align (op0, BIGGEST_ALIGNMENT);
> >
> > Maybe we can fall through most of the rest of the function if we
> > canonicalized in the above way?  Eric?
> 
> Probably not, I'm afraid.  I agree that the above call to set_mem_align is 
> potentially problematic if we previously allocated the temp.  Moreover, I 
> think that the other temp allocation around line 9840 is problematic too.
> 
> On the other hand, we could avoid skipping set_mem_attributes entirely by 
> passing the type instead of the expression.
> 
> So I'd set a flag for the first temp allocation, skip the set_mem_align call if 
> it is set and pass the type instead of the expression in the final call to 
> set_mem_attributes if it is set.  And I'd handle the second temp allocation 
> independently and pass the type here too.

Yeah, that sounds reasonable.

Richard.


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