unsigned AMDGPURegisterBankInfo::copyCost(const RegisterBank &Dst, const RegisterBank &Src, unsigned Size) const { if (Dst.getID() == AMDGPU::SGPRRegBankID && Src.getID() == AMDGPU::VGPRRegBankID) return std::numeric_limits<unsigned>::max(); // SGPRRegBank with size 1 is actually vcc or another 64-bit sgpr written by // the valu. if (Size == 1 && Dst.getID() == AMDGPU::SCCRegBankID && Src.getID() == AMDGPU::SGPRRegBankID) return std::numeric_limits<unsigned>::max(); return RegisterBankInfo::copyCost(Dst, Src, Size); }
bool RegisterBank::operator==(const RegisterBank &OtherRB) const { // There must be only one instance of a given register bank alive // for the whole compilation. // The RegisterBankInfo is supposed to enforce that. assert((OtherRB.getID() != getID() || &OtherRB == this) && "ID does not uniquely identify a RegisterBank"); return &OtherRB == this; }