[PATCH] D28817: Add SparseBitVector::find_last()
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 11:33:07 PST 2017
dberlin added inline comments.
================
Comment at: llvm/include/llvm/ADT/SparseBitVector.h:141
+ return Idx * BITWORD_SIZE + BITWORD_SIZE -
+ countLeadingZeros(Bits[Idx]) - 1;
+ }
----------------
Don't you really just want counttrailingzeros, and the index is bitword_size - count trailing zeros?
Repository:
rL LLVM
https://reviews.llvm.org/D28817
More information about the llvm-commits
mailing list