Index: llvm/trunk/utils/TableGen/CodeGenRegisters.cpp =================================================================== --- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp +++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp @@ -21,7 +21,6 @@ #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/SparseBitVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" @@ -1635,9 +1634,10 @@ static bool normalizeWeight(CodeGenRegister *Reg, std::vector &UberSets, std::vector &RegSets, - SparseBitVector<> &NormalRegs, + BitVector &NormalRegs, CodeGenRegister::RegUnitList &NormalUnits, CodeGenRegBank &RegBank) { + NormalRegs.resize(std::max(Reg->EnumValue + 1, NormalRegs.size())); if (NormalRegs.test(Reg->EnumValue)) return false; NormalRegs.set(Reg->EnumValue); @@ -1711,7 +1711,7 @@ Changed = false; for (auto &Reg : Registers) { CodeGenRegister::RegUnitList NormalUnits; - SparseBitVector<> NormalRegs; + BitVector NormalRegs; Changed |= normalizeWeight(&Reg, UberSets, RegSets, NormalRegs, NormalUnits, *this); }