[PATCH] Introduce bitset metadata format and bitset lowering pass.
Kostya Serebryany
kcc at google.com
Wed Feb 18 14:50:07 PST 2015
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:175
@@ +174,3 @@
+
+ Int1Ty = Type::getInt1Ty(M.getContext());
+ Int8Ty = Type::getInt8Ty(M.getContext());
----------------
You can get all of these, except for IntPtrTy, from the IRBuilder. Just FYI, this way is also fine, I think.
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:189
@@ +188,3 @@
+
+BitSetInfo LowerBitSets::buildBitSet(
+ MDString *BitSet,
----------------
I would add comments for every non-trivial function.
In most cases, I understand what these things are doing, other readers (including myself in 6 months) will probably be puzzled.
================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:292
@@ +291,3 @@
+ Value *Bit;
+ if (BSI.Bits.size() <= 8) {
+ // If the bit set is sufficiently small, we can avoid a load by bit testing
----------------
split into a separate function?
http://reviews.llvm.org/D7288
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list