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

Hans Wennborg hans at chromium.org
Wed Sep 26 02:49:31 PDT 2012


On Tue, Sep 25, 2012 at 5:51 PM, Hans Wennborg <hans at chromium.org> wrote:
> 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.

Landed r164682 and r164684.

Thanks,
Hans



More information about the llvm-commits mailing list