This is the mail archive of the 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: Source of Ada bootstrap failure on x86

    ! 	  /* We do *not* set_mem_attributes here, because incoming arguments
    ! 	     may overlap with sibling call outgoing arguments and we cannot
    ! 	     allow reordering of reads from function arguments with stores
    ! 	     to outgoing arguments of sibling calls.  We do, however, want
    ! 	     to record the alignment of the stack slot.  */

I think this comment misses the real point, which has nothing to do
with overlapping of incoming and outgoing arguments.  The problem is that
we are reusing the same stack slot with different attributes and that's
incorrect because that's saying those stores can't conflict and of course
they can.

I'd write this as:

	/* We *cannot* call set_mem_attributes here because we will likely
	   be reusing this stack slot for operands of other types and those
	   stores may be erroneously marked as not conflicting with this one
	   if the types do not alias.   We could use a dedicated alias set
	   just for outgoing arguments, but sibcall outgoing arguments may
	   overlap with incoming arguments.

	   ??? We may have a problem with that overlap anyway, since loads
	   from incoming args may be /u but these stores will not and those
	   may be improperly reordered.  */

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