diff --git a/include/llvm/MC/MCRegisterInfo.h b/include/llvm/MC/MCRegisterInfo.h index 6edfc30b0aa..8d8c677c77e 100644 --- a/include/llvm/MC/MCRegisterInfo.h +++ b/include/llvm/MC/MCRegisterInfo.h @@ -41,7 +41,6 @@ public: const uint16_t RegsSize; const uint16_t RegSetSize; const uint16_t ID; - const uint16_t PhysRegSize; const int8_t CopyCost; const bool Allocatable; @@ -80,11 +79,6 @@ public: return contains(Reg1) && contains(Reg2); } - /// Return the size of the physical register in bytes. - unsigned getPhysRegSize() const { return PhysRegSize; } - /// Temporary function to allow out-of-tree targets to switch. - unsigned getSize() const { return getPhysRegSize(); } - /// getCopyCost - Return the cost of copying a value between two registers in /// this class. A negative number means the register class is very expensive /// to copy e.g. status flag register classes. diff --git a/lib/CodeGen/TargetInstrInfo.cpp b/lib/CodeGen/TargetInstrInfo.cpp index 963f8178b50..034ad9a4982 100644 --- a/lib/CodeGen/TargetInstrInfo.cpp +++ b/lib/CodeGen/TargetInstrInfo.cpp @@ -388,8 +388,7 @@ bool TargetInstrInfo::getStackSlotRange(const TargetRegisterClass *RC, return true; } unsigned BitSize = TRI->getSubRegIdxSize(SubIdx); - // Convert bit size to byte size to be consistent with - // MCRegisterClass::getSize(). + // Convert bit size to byte size. if (BitSize % 8) return false; diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index 532426c3fe9..7c38dc55e81 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -1075,14 +1075,10 @@ RegisterInfoEmitter::runMCDesc(raw_ostream &OS, CodeGenTarget &Target, for (const auto &RC : RegisterClasses) { assert(isInt<8>(RC.CopyCost) && "Copy cost too large."); - uint32_t RegSize = 0; - if (RC.RSI.isSimple()) - RegSize = RC.RSI.getSimple().RegSize; OS << " { " << RC.getName() << ", " << RC.getName() << "Bits, " << RegClassStrings.get(RC.getName()) << ", " << RC.getOrder().size() << ", sizeof(" << RC.getName() << "Bits), " << RC.getQualifiedName() + "RegClassID" << ", " - << RegSize/8 << ", " << RC.CopyCost << ", " << ( RC.Allocatable ? "true" : "false" ) << " },\n"; }