[PATCH] D11856: LowerBitSets: Extend pass to support functions as bitset members.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 17:27:36 PDT 2015


kcc added a comment.

I think I will soon run out of comments. :)


================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:672
@@ +671,3 @@
+
+  ConstantInt *Jmp = ConstantInt::get(Int8Ty, 0xe9);
+
----------------
instead of 0xe9, 8, 5, and 0xcc in this function please define something like
  static const int kIntCode = 0xcc;
  static const int kJmpCode = 0xe9;

  static const int kOffsetDispSize = 4;
  ... 

 use getJumpTableEntrySize instead of '8'

================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:703
@@ +702,3 @@
+void LowerBitSets::buildBitSetsFromFunctions(ArrayRef<Metadata *> BitSets,
+                                             ArrayRef<Function *> Globals) {
+  // Unlike the global bitset builder, the function bitset builder cannot
----------------
Should this be named "Functions"?

================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:739
@@ +738,3 @@
+  // To create a jump table for these functions, we pick one function
+  // arbitrarily (say, f) and instruct the LLVM code generator to output a jump
+  // table immediately before f's instructions. This is done by representing the
----------------
Is this part of comment still relevant? 


http://reviews.llvm.org/D11856





More information about the llvm-commits mailing list