[PATCH] D23384: Use a byte array as an internal buffer of BitVector.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 17:35:47 PDT 2016


ruiu added inline comments.

================
Comment at: include/llvm/ADT/BitVector.h:45
@@ +44,3 @@
+  // Words are in the little endian order on all platforms.
+  MutableArrayRef<Word> Words;
+
----------------
zturner wrote:
> Since words are always little endian, why not make the type of Word be `support::ulittle32_t`
But in many cases you don't actually care about endianness. For example, for count(), only the number of 1s matters. You don't need to swap bytes. So I think using ulittle32_t is inefficient.


https://reviews.llvm.org/D23384





More information about the llvm-commits mailing list