[PATCH] D24991: Inline hot functions in libcxx shared_ptr implementation.
Sebastian Pop via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 26 09:48:14 PDT 2016
sebpop marked 2 inline comments as done.
sebpop added inline comments.
================
Comment at: libcxx/include/memory:3802
+{
+ return __libcpp_atomic_add(&t, 1, _AO_Relaxed);
+}
----------------
EricWF wrote:
> Why add `increment` and `decrement` at all? Just manually inline `__libcpp_atomic_add` at the callsites.
I like the idea to manually inline the inc and dec functions.
What should we do with the NOTE: above?
// NOTE: Relaxed and acq/rel atomics (for increment and decrement respectively)
// should be sufficient for thread safety.
// See https://llvm.org/bugs/show_bug.cgi?id=22803
should we just go ahead and remove the note, or you want to have it where inc/dec are called? (about a dozen places.)
https://reviews.llvm.org/D24991
More information about the cfe-commits
mailing list