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: Dependency confusion in sched-deps


Hi,

On Thu, 5 Dec 2013, Maxim Kuvyrkov wrote:

> Output dependency is the right type (write after write).  Anti 
> dependency is write after read, and true dependency is read after write.
> 
> Dependency type plays a role for estimating costs and latencies between 
> instructions (which affects performance), but using wrong or imprecise 
> dependency type does not affect correctness.

In the context of GCC and the middle ends memory model this statement is 
not correct.  For some dependency types we're using type based aliasing to 
disambiguate, i.e ignore that dependency, which for others we don't.  In 
particular a read-after-write memory-access dependency can be ignored if 
type info says they can't alias (because a program where both _would_ 
access the same memory would be invalid according to our mem model), but 
for write-after-read or write-after-write we cannot do that disambiguation 
(because the last write overrides the dynamic type of the memory cell even 
if it was incompatible with the one before).


Ciao,
Michael.


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