[llvm-commits] [llvm] r149481 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ lib/Analysis/ lib/Bitcode/Writer/ lib/CodeGen/SelectionDAG/ lib/ExecutionEngine/Interpreter/ lib/Target/CBackend/ lib/Target/CppBackend/ lib/Transforms/IPO/ lib/

Stepan Dyatkovskiy STPWORLD at narod.ru
Wed Mar 7 02:54:30 PST 2012


Sorry. I missed very important thing. To replace these methods I created case-iterator class. This patch allows to access case value and its successor via iterator, e.g.:
i.getCaseValue();
Iterators fully replaces accessing to cases via indexing. And because ResolveXXXX methods was removed.

-Stepan.

07.03.2012, 14:43, "Stepan Dyatkovskiy" <STPWORLD at narod.ru>:
> Hi Jay.
> The main point of last patches was to remove this methods. These methods was created to convert case and successor indices to/from operand indices. ResolveXXXXX methods have been removed due to its useless.
>
> -Stepan.
>
> 07.03.2012, 13:43, "Jay Foad" <jay.foad at gmail.com>:
>
>>  On 1 February 2012 07:49, Stepan Dyatkovskiy <stpworld at narod.ru> wrote:
>>>   4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
>>>   4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
>>>   4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.
>>  PHINode has similar methods with a completely different naming
>>  convention, getOperandNumForIncomingValue and
>>  getIncomingValueNumForOperand. (Note that they used to do something
>>  interesting; they became trivial in r133435 when PHINodes' operand
>>  layout was changed.)
>>
>>  Jay.



More information about the llvm-commits mailing list