[llvm-commits] Case ranges: reject IntegersSubset, return old switch, add new switch-with-ranges instruction

Stepan Dyatkovskiy stpworld at narod.ru
Wed Oct 31 22:34:22 PDT 2012


Hi guys. I think we need reject IntegersSubset usage, and return classic 
switch by now. The most painful place is Reader code, since currently it 
contains support to some middle-staged format.

Even more, I'm definitely sure that we should *not* apply new prototype 
with old strategy: 1. Replace switch with new one + backward 
compatibility. 2. Update passes one by one. IMHO it is heavy way.

I propose to introduce *new* instruction, with minimal support:
1. Parser, Printer, Reader, Writer.
2. LowerSwitch.

Then we can add optimization passes.
This approach gives us some freedom with new instruction experiments 
keeping main code untouched.

Instruction will marked as very experimental and unstable, so no-one 
will use it in serious projects till some moment.

-Stepan.



More information about the llvm-commits mailing list