[llvm-dev] Different internal representation of SwitchInst
Chris Lattner via llvm-dev
llvm-dev at lists.llvm.org
Fri May 24 23:01:50 PDT 2019
This sounds like a great improvement to me Shawn!
-Chris
> On May 23, 2019, at 7:29 AM, Shawn Landden via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> SwitchInst is currently represented as paired operands, which is
> internally a linked-list. This is not ideal, as these types are fixed
> (APInt and BasicBlock), and there is also code of dubious quality that
> doesn't really get that this is a linked list, like from
> SwitchInst:removeCase:
>
> OL[NumOps-2].set(nullptr);
> OL[NumOps-2+1].set(nullptr);
>
> I've already done quite a bit of work on the SwitchInst, and have much
> more planned. I think the cases would be better represented by a
> SmallArray<std::pair<APInt, BasicBlock*>, 4>.
>
> Before I get time to jump in implement this, assuming I can probably
> keep most of the interfaces, is there any reason this wouldn't work?
>
> -Shawn Landden
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list