[llvm-commits] CodeGen patch: Use getNumBlockIDs() to set the limit on block IDs in EdgeBundles.cpp.

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jun 15 16:43:18 PDT 2011


On Jun 15, 2011, at 4:02 PM, Anna Zaks wrote:

> 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.

Looks good, please commit.

Thanks,
/jakob




More information about the llvm-commits mailing list