Skip to content
  • Jakob Stoklund Olesen's avatar
    Remove MachineRegisterInfo::getLastVirtReg(), it was giving wrong results · d82ac375
    Jakob Stoklund Olesen authored
    when no virtual registers have been allocated.
    
    It was only used to resize IndexedMaps, so provide an IndexedMap::resize()
    method such that
    
     Map.grow(MRI.getLastVirtReg());
    
    can be replaced with the simpler
    
     Map.resize(MRI.getNumVirtRegs());
    
    This works correctly when no virtuals are allocated, and it bypasses the to/from
    index conversions.
    
    llvm-svn: 123130
    d82ac375
Loading