[PATCH] LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.

Kostya Serebryany kcc at google.com
Mon Mar 2 13:51:27 PST 2015

Comment at: include/llvm/Transforms/IPO/LowerBitSets.h:34
@@ -35,1 +33,3 @@
+  // The indices of the set bits in the bitset.
+  std::set<uint64_t> Bits;
Is this better than unordered_set?
(I don't know, just asking)

Comment at: include/llvm/Transforms/IPO/LowerBitSets.h:183
@@ +182,3 @@
+  /// set. AllocByteOffset is set to the offset within the byte array and
+  /// AllocMask is set to the bitmask for those bits. This uses the LPT
+  /// multiprocessor scheduling algorithm to lay out the bits efficiently;
LPT == longest process time? 
Maybe mention the full name here? 

Comment at: lib/Transforms/IPO/LowerBitSets.cpp:34
@@ -33,3 +33,3 @@
-STATISTIC(NumBitSetsCreated, "Number of bitsets created");
+STATISTIC(NumByteArraysCreated, "Number of byte arrays created");
 STATISTIC(NumBitSetCallsLowered, "Number of bitset calls lowered");
It would be interesting to see more details stats here, 
e.g. how many bits were packed into how many bytes.



More information about the llvm-commits mailing list