[llvm-commits] [LLVM] SwitchInst PATCH: Changes in semantics and usage.

Stepan Dyatkovskiy STPWORLD at narod.ru
Thu Jan 19 10:33:19 PST 2012


Hi all. I updated patch. I edited implementation of SwitchInst::addCase.
Here next code is used: 
  OperandList[OpNo] = OnVal;
  OperandList[OpNo+1] = Dest;
But instead it means:
  setCaseValue(NewCaseIdx, OnVal);
  setCaseSuccessor(NewCaseIdx, Dest);
So I made correspond replacement.

Please find the modified patch in attachment.

-Stepan.

16.01.2012, 21:48, "Stepan Dyatkovskiy" <STPWORLD at narod.ru>:
> Ping.
>
> 15.01.2012, 15:54, "Stepan Dyatkovskiy" <STPWORLD at narod.ru>:
>
>>  Hi all.
>>  I refactored SwitchInst a little bit. The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: si-cleanup.patch
Type: text/x-patch
Size: 39594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120119/edd2f7dd/attachment.bin>


More information about the llvm-commits mailing list