[llvm-commits] New pass for review

Anton Korobeynikov asl at math.spbu.ru
Wed Feb 28 10:45:51 PST 2007


Hello, Everyone.

Please find new optimization pass for LLVM attached. Actually, it
implements llvm-to-llvm transformation of switches, lowering their
"complexity" (in terms of comparisons/jumps needed). It does techniques
listed in PR926:
1. MRST for sparse switches (they are converted in the series of
switches suitable for jump table emission)
2. Shift/And technique for small switches with few destinations.

Tested with:

1. llvm-test
2. 1) llvm-gcc bootstraped
   2) Mozilla build with bootstrapped llvm-gcc

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssr.diff
Type: text/x-patch
Size: 2067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070228/fc9681fe/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwitchStrengthReduce.cpp
Type: text/x-c++src
Size: 24138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070228/fc9681fe/attachment.cpp>


More information about the llvm-commits mailing list