[cfe-dev] [RFC] volatile mem* builtins

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Fri May 8 12:54:33 PDT 2020


On Fri, May 08, 2020 at 03:33:18PM -0400, James Y Knight wrote:
> E.g. you may want to memcpy data out of a device's buffer, and then do a
> volatile write to tell the device you're done with the buffer. Here, you
> want the memcpy to be volatile so it cannot be reordered across the "done"
> write. But, other than ensuring the correct ordering w.r.t. the subsequent
> volatile write, it's quite irrelevant exactly how the data is read from the
> buffer -- doing it in the most efficient way is desirable.

I was wondering whether it might make sense to make this a memory
ordering constraint instead or a barrier.

Joerg


More information about the cfe-dev mailing list