[llvm-commits] Case Ranges: 'switchr' is supported by llc now!
Stepan Dyatkovskiy
stpworld at narod.ru
Thu Nov 8 01:59:51 PST 2012
Hi all!
Please find the latest patches that adds support for new 'switchr'
instruction (switch on case ranges).
Latest patch contains the next changes relative to the previous
'switchr' patches:
-- SwitchRInst::[Const]CaseIt::getClusterAndGoNext - removed.
-- Added restriction for SwitchRInst constructors: "Cases" collection
must contain non-empty, non-overlapped, ascending ordered
range+successor pairs.
-- SwitchRInst::addCase automatically merges cases if possible. So on
output you got optimized switchr always. See switchr.ll regression test
as example.
-- LLParser: added diagnostics for switchr instruction for case when
cases are overlapped. It also sort the cases before addCase operation.
-- SelectionDAGBuilder now supports SwitchRInst! That means that ./llc
produces *valid* code for IR with 'switchr' instruction. See
switchr-llc-test.ll regression test for details.
There are two patches:
-- Patch with instruction itself.
-- Patch with regression tests.
Note, 'switchr' patch doesn't affect existing functionality. Since it is
new instruction, not an upd for any existing instructions.
-Stepan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switchr-2012-11-08.patch
Type: text/x-patch
Size: 63812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121108/fc790a3c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switchr-2012-11-08-tests.patch
Type: text/x-patch
Size: 7575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121108/fc790a3c/attachment-0001.bin>
More information about the llvm-commits
mailing list