[llvm] r222168 - [SimplifyCFG] Make the value type of the hole check bitmask a power-of-2.

Hans Wennborg hans at chromium.org
Mon Nov 17 14:27:57 PST 2014


On Mon, Nov 17, 2014 at 11:39 AM, Juergen Ributzka <juergen at apple.com> wrote:
> Author: ributzka
> Date: Mon Nov 17 13:39:56 2014
> New Revision: 222168
>
> URL: http://llvm.org/viewvc/llvm-project?rev=222168&view=rev
> Log:
> [SimplifyCFG] Make the value type of the hole check bitmask a power-of-2.
>
> When converting a switch to a lookup table we might have to generate a bitmaks
> to encode and check for holes in the original switch statement.
>
> The type of this mask depends on the number of switch statements, which can
> result in illegal types for pretty much all architectures.
>
> To avoid unnecessary type legalization and help FastISel this commit increases
> the size of the bitmask to next power-of-2 value when necessary.
>
> This fixes rdar://problem/18984639.

Can you elaborate on what's in the bug report?

I didn't realize illegal types had to avoided. Is the motivation for
this change that fast-isel would fall back?

Thanks,
Hans



More information about the llvm-commits mailing list