[LLVMdev] Program order in inst_iterator?

Anirudh Sivaraman sk.anirudh at gmail.com
Mon Jun 15 11:05:27 PDT 2015


On Mon, Jun 15, 2015 at 10:50 AM, mats petersson <mats at planetcatfish.com> wrote:
> It will iterate over the instructions in the order that they are stored in
> the module/function/basicblock that they belong to. And that SHOULD,
> assuming llvm-dis does what it is expected to do, be the same order.
>

Thanks for the reply. What about instruction ordering across basic
blocks? Let's say instructions IA and IB belong to basic blocks BBa
and BBb, where BBa is before BBb in program order. Then, will IA be
printed before IB?

Anirudh

> --
> Mats
>
> On 15 June 2015 at 18:10, Anirudh Sivaraman <sk.anirudh at gmail.com> wrote:
>>
>> Does inst_iterator
>>
>> (http://llvm.org/docs/ProgrammersManual.html#iterating-over-the-instruction-in-a-function)
>> guarantee that the iterated instructions are in program order: the
>> order of instructions printed by llvm-dis?
>>
>> Thanks in advance,
>> Anirudh
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>



More information about the llvm-dev mailing list