[llvm-commits] [LLVM, SwitchInst, case ranges] Auxiliary patch #1

Duncan Sands baldrick at free.fr
Fri Oct 28 05:19:52 PDT 2011


Hi Stepan, I have to ask: what are switch case ranges good for?  Will they
actually result in better code, or just more complexity in the optimizers
and code generators?  Sorry to ask at this late date.  I know I'm the one
that first suggested adding case ranges, but I've since come to wonder
whether they are really useful.

Ciao, Duncan.

> Hi all. The main discussion branch of this feature is here:
> http://llvm.org/bugs/show_bug.cgi?id=1255
>
> We need change SwitchInst internals: replace case value type from "ConstantInt"
> to "APInt", then move case values out from operands collection. To do that we
> need add APInt::isInitialized feature. We also need extend SmallSet class adding
> Compare parameter to this template:
> template <typename T, unsigned N, typename C = std::less<T> >
>
> Please find attached patches for review.
>
> Regards,
> Stepan.
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list