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

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 16:21:59 PDT 2015


pcc added inline comments.

================
Comment at: lib/Transforms/IPO/LowerBitSets.cpp:725
@@ +724,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
----------------
kcc wrote:
> Why do we do this? 
> 
> Yes, this will reduce the size of the jump table by 8 bytes, 
> but is this optimization worth the extra complexity? 
> We must try to be as simple as possible 
> 
The motivation wasn't so much optimization but the fact that the jump table is guaranteed to appear in an executable section if we do this. However, if it would work just to set the section name it may be best to do that instead (and fix it if not). Let me take a look.


http://reviews.llvm.org/D11856





More information about the llvm-commits mailing list