Index: src/hydrogen-gvn.h |
diff --git a/src/hydrogen-gvn.h b/src/hydrogen-gvn.h |
index 66224e43381ac75c944bbf18691509341513edce..64a0fec76bf7db030ac9f09c34bb3a4af7bfbd27 100644 |
--- a/src/hydrogen-gvn.h |
+++ b/src/hydrogen-gvn.h |
@@ -36,46 +36,6 @@ |
namespace v8 { |
namespace internal { |
-// Simple sparse set with O(1) add, contains, and clear. |
-class SparseSet { |
- public: |
- SparseSet(Zone* zone, int capacity) |
- : capacity_(capacity), |
- length_(0), |
- dense_(zone->NewArray<int>(capacity)), |
- sparse_(zone->NewArray<int>(capacity)) { |
-#ifndef NVALGRIND |
- // Initialize the sparse array to make valgrind happy. |
- memset(sparse_, 0, sizeof(sparse_[0]) * capacity); |
-#endif |
- } |
- |
- bool Contains(int n) const { |
- ASSERT(0 <= n && n < capacity_); |
- int d = sparse_[n]; |
- return 0 <= d && d < length_ && dense_[d] == n; |
- } |
- |
- bool Add(int n) { |
- if (Contains(n)) return false; |
- dense_[length_] = n; |
- sparse_[n] = length_; |
- ++length_; |
- return true; |
- } |
- |
- void Clear() { length_ = 0; } |
- |
- private: |
- int capacity_; |
- int length_; |
- int* dense_; |
- int* sparse_; |
- |
- DISALLOW_COPY_AND_ASSIGN(SparseSet); |
-}; |
- |
- |
// Perform common subexpression elimination and loop-invariant code motion. |
class HGlobalValueNumberingPhase : public HPhase { |
public: |
@@ -118,7 +78,7 @@ class HGlobalValueNumberingPhase : public HPhase { |
// Used when collecting side effects on paths from dominator to |
// dominated. |
- SparseSet visited_on_paths_; |
+ BitVector visited_on_paths_; |
DISALLOW_COPY_AND_ASSIGN(HGlobalValueNumberingPhase); |
}; |