[LLVMdev] [PATCH] BasicBlock::getFirstNonPHI

Vladimir Prus ghost at cs.msu.su
Sun Jun 4 02:41:20 PDT 2006


Hi,
everytime one has to add instruction at the beginning of a basic block, one
has to skip past PHI nodes that are already there. How about adding a new
method to BasicBlock, to get that first non-PHI instruction? So, adding an
instruction will be as simple as:

      new SomeInstruction(............., BB->getFirstNonPHI())

Patch attached. Comments?

- Volodya
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BasicBlock.diff
Type: text/x-diff
Size: 1679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060604/de97f530/attachment.diff>


More information about the llvm-dev mailing list