Order of values

Hi
   if I have group of instructions that belong to same basic block,
how can I determine which of these occurs the last ?

thanks
Shrey

shreyas krishnan <shreyas76@gmail.com> writes:

   if I have group of instructions that belong to same basic block,
how can I determine which of these occurs the last ?

See BasicBlock::getInstList, which returns a reference to the list of
intructions that the BasicBlock holds. You can walk that list the same
way as std::list.

Hi
    if I have group of instructions that belong to same basic block,
how can I determine which of these occurs the last ?

You can use the getTerminator() instruction of the basic block. It is always the last instruction in the basic block, and aside from merging instructions and delay slots and other code generator fun, it should always be the last one that is logically executed.

-- John T.