[LLVMdev] instr_iterator

Akira Hatanaka ahatanak at gmail.com
Thu Oct 25 19:01:22 PDT 2012


Is it safe or legal to call isInsideBundle even when I == E?

MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI() {
  instr_iterator I = instr_begin(), E = instr_end();
  while (I != E && I->isPHI())
    ++I;
  assert(!I->isInsideBundle() && "First non-phi MI cannot be inside a
bundle!");
  return I;
}

I am seeing an assert when I run llc.
The code is in lib/CodeGen/MachineBasicBlock.cpp:145.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121025/6e7238e1/attachment.html>


More information about the llvm-dev mailing list