[PATCH] D55427: [libcxx] Call __count_bool_true for bitset count

Adhemerval Zanella via Phabricator reviews at reviews.llvm.org
Fri Jan 11 02:40:24 PST 2019


zatrazz marked 2 inline comments as done.
zatrazz added inline comments.


================
Comment at: include/bitset:994
 {
-    return static_cast<size_t>(_VSTD::count(base::__make_iter(0), base::__make_iter(_Size), true));
+    return static_cast<size_t>(_VSTD::__count_bool_true(base::__make_iter(0), _Size));
 }
----------------
mclow.lists wrote:
> Don't think we need the `__VSTD::` here any more; no one should be defining their own `__count_bool_true`.
I will remove it, thank.


================
Comment at: include/bitset:1002
 {
     return _VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
 }
----------------
mclow.lists wrote:
> Have you investigated the codegen here? It seems to me that the same arguments (vectorization, alignment, etc) would apply to `operator==` as well.
Good call, I will investigate it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55427/new/

https://reviews.llvm.org/D55427





More information about the libcxx-commits mailing list