Diff Detail
Unit Tests
Time | Test | |
---|---|---|
60,030 ms | x64 debian > MLIR.Examples/standalone::test.toy |
Event Timeline
inaccessiblemem takes an access "kinds" which changes the behavior a lot. Is nosync implied by inaccessiblemem: none, or by inaccessiblemem: write, or both?
That said, we have nosync, people should just add it. This patch would cause all places that interpret nosync to also look for other things, which is not helpful at all.
If you want this behavior w/o the complex semantic, add nosync to all intrinsics and known functions we have right now. The rest is deduction.
TBH I find the semantics of nosync to be unclear to the point of uselessness, and I'm not sure whether this patch helps clarify them any.
I think the two clarifications to nosync that would help are:
- The memory effects of a synchronizing operation include all memory effects that the synchronization can make visible. For example, a synchronizing operation that can make previous writes to a location visible must have a write memory effect for that location.
- A synchronizing operation that imposes an ordering constraint with other synchronizing operations must perform a read and write to inaccessible memory.
I think this matches how LLVM models synchronization, but I was never able to get really satisfactory answer to this.