[PATCH] D34885: Add element atomic memset intrinsic

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 06:14:46 PDT 2017


reames added a comment.

Daniel, and I ended up talking about this one a decent amount offline with one of our other non-LLVM compiler folks.  Our conclusions was that the more generic fill pattern isn't really any more common in Java than it is in C/C++.  The overwhelmingly most important pattern we want to catch is just zero-initialization of a block of memory,  (i.e. atomic bzero) which is covered by the current proposal.

My take here is that we should move forward with the current design.  If we decide we want to generalize at some point we can, but there's no reason to block the addition of the element wise atomic code on that generalization decision.  It looks like we're probably not going to want to generalize this in the near future given the work required that Eli worked out and the low perceived profitability.

Eli's point about not having a compiler-rt implementation for these is sound and something I hadn't previously considered.  We should at minimum file a bug for that.  :)  It might be reasonable to provide a simple implementation just to make sure the whole system works end to end as well.

Unless anyone objects to this, I intend to LGTM this and move forward with the original approach.  Any concerns?


https://reviews.llvm.org/D34885





More information about the llvm-commits mailing list