[llvm-commits] Final SwitchInst for PR1255: case-ranges.

Stepan Dyatkovskiy stpworld at narod.ru
Mon Jul 16 01:46:47 PDT 2012


ping.

Stepan Dyatkovskiy wrote:
> Hi all.
> Please find the patch that converts current SwitchInst into one that
> supports case-ranges. This patch is not compilable, since I removed all
> backward compatibility layer. This is how I see the final SwitchInst.
>
> Main features
>   - Case value is the subset of integers, based on APInt values
> (implemented as IntegersSubset). IntegersSubset uses packed data
> representation. It has two collections: flat numbers collection, and
> collection of pairs with indices (pointers) to the flat numbers collection.
>   - To construct/modify subsets for SwitchInst IntegersSubsetMapping was
> introduced. It uses unpacked data representation and stores SwitchInst
> data as set of clusters. Cluster is integer range + successor.
>   - Case value removed from instruction operands list. We needn't
> User-Use concept here, since it is just a case value, it will always
> constant, and case value couldn't reused with another instructions/values.
>
> P.S.:  Patch contains a lot of changes. Probably you want to apply it
> locally and look at final instruction class.
>
> P.S.2: I also have patch with backward compatibility level. It is
> compilable and passes regression tests and test-suite tests.
>
> Thanks!
>
> -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