[PATCH] Introduce bitset metadata format and bitset lowering pass.
Kostya Serebryany
kcc at google.com
Thu Feb 5 16:10:48 PST 2015
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:115
@@ +114,3 @@
+
+LowerBitSets::BitSetInfo LowerBitSets::buildBitSet(
+ Module &M,
----------------
I wonder if this thing is unit-testable separately?
We are not doing these things frequently, but I think we should.
E.g. see ASanStackFrameLayoutTest.cpp
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:121
@@ +120,3 @@
+
+ std::vector<uint64_t> Offsets;
+ uint64_t Min = std::numeric_limits<uint64_t>::max(), Max = 0;
----------------
SmallVector, here and maybe in other places.
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:210
@@ +209,3 @@
+ // also conveniently gives us a bit offset to use during the load from
+ // the bitset.
+ Value *OffsetSHR =
----------------
Clever!
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:222
@@ +221,3 @@
+ TerminatorInst *Term = SplitBlockAndInsertIfThen(OffsetInRange, CI, false);
+ IRBuilder<> ThenB(Term);
+
----------------
Do we really want a separate BB here?
On valid programs, i.e. in 99.9999% cases both checks will pass, so it might be better to do this w/o branches.
http://reviews.llvm.org/D7288
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list