[llvm-commits] Please review: Unittests for IntegersSubsetMapping
Stepan Dyatkovskiy
stpworld at narod.ru
Tue Jul 10 08:19:45 PDT 2012
Hi all. Please find the patch for review.
Patch contains unittests for IntegersSubsetMapping methods (4 unittests).
You can find some notes below. Also, the unittests itself also helps to
understand the purpose of these methods.
IntegersSubsetMapping represents SwitchInst cases as mapping of
integers-subset to BasicBlock:
IntegersSubset0 => Successor0
IntegersSubset1 => Successor1
IntegersSubset2 => Successor2
IntegersSubsetMapping::isOverlapped(RHS) - returns true if RHS mapping
overlaps this one.
The example of overlapped mappings:
LHS == { [0..5] => SomeSuccessor0 }
RHS == { [4..10] => SomeSuccessor1 }
IntegersSubsetMapping::detachCase(SomeSuccessor) - moves subset
associated with SomeSuccessor to the separated mapping.
IntegersSubsetMapping::removeCase - removes subset associated with
SomeSuccessor.
IntegersSubsetMapping::findSuccessor(IntegerValue) - finds the successor
that associated with subset that contains given value.
Thanks!
-Stepan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IntegersSubsetUnittests.patch
Type: text/x-patch
Size: 4513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120710/503ca514/attachment.bin>
More information about the llvm-commits
mailing list