[llvm-commits] [Patch] Use bitmaps for switch lookup tables that fit in registers

Hans Wennborg hans at chromium.org
Tue Sep 25 09:51:11 PDT 2012


On Mon, Sep 24, 2012 at 3:12 PM, Hans Wennborg <hans at chromium.org> wrote:
> On Fri, Sep 21, 2012 at 8:20 PM, Sean Silva <silvas at purdue.edu> wrote:
>> LGTM.
>
> Thanks!
>
>> How often is the bitmap case triggering when building, e.g. LLVM/Clang
>> or another large project? Also, are you seeing any binary size
>> improvements?
>
> I did a Clang build with this last week; the transformation fired 295
> times and reduced the binary size by 8328 bytes. That's not much of an
> overall reduction, but at least it's a decent reduction per switch
> where it fires.
>
> Chromium showed similar numbers: the transformation fired 140 times
> and binary size reduction was 4424 bytes.
>
> In both cases, 99% of the bitmaps consisted of i1 values; the rest
> consisted of i8 values.
>
> Does anyone else have comments? OK to commit?

If there are no more comments on the patches (attached again for
convenience), I'd like to go ahead and commit tomorrow.

Thanks,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001_switch_lookup_table2.patch
Type: application/octet-stream
Size: 10023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120925/c9c159a2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 002_switch_bitmap3.patch
Type: application/octet-stream
Size: 15568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120925/c9c159a2/attachment-0001.obj>


More information about the llvm-commits mailing list