[llvm-commits] CodeGen patch: Use getNumBlockIDs() to set the limit on block IDs in EdgeBundles.cpp.
ganna at apple.com
Wed Jun 15 16:02:32 PDT 2011
Submitting the attached patch for review.
Function::getNumBlockIDs() should be used instead of Function::size() to set the upper limit on the block IDs.
EdgeBundles code assumes that block numbers are all less then MF->size(). Which is not true if a basic block gets removed (simplified away). See the attached test. In this case, SelectionDAGBuilder::visitBr() calls llvm::MachineFunction::removeFromMBBNumbering(), which introduces the hole in numbering leading to an assert in llc.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4000 bytes
Desc: not available
More information about the llvm-commits