Index: src/data-flow.h |
diff --git a/src/data-flow.h b/src/data-flow.h |
index 5c214ae8319a8bb332b3ed1fb722b6b7d2cacf7d..58ef34781ee5cc14bcf625c8e289d7acc4e48717 100644 |
--- a/src/data-flow.h |
+++ b/src/data-flow.h |
@@ -164,6 +164,15 @@ class BitVector: public ZoneObject { |
return true; |
} |
+ int Count() const { |
+ int count = 0; |
+ for (int i = 0; i < data_length_; i++) { |
+ int data = data_[i]; |
+ if (data != 0) count += CompilerIntrinsics::CountSetBits(data); |
+ } |
+ return count; |
+ } |
+ |
int length() const { return length_; } |
#ifdef DEBUG |