[llvm] r326467 - AMDGPU/GlobalISel: Add copyCost for VGPR->SGPR copies
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 1 11:09:25 PST 2018
Author: arsenm
Date: Thu Mar 1 11:09:25 2018
New Revision: 326467
URL: http://llvm.org/viewvc/llvm-project?rev=326467&view=rev
Log:
AMDGPU/GlobalISel: Add copyCost for VGPR->SGPR copies
Patch by Tom Stellard
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp?rev=326467&r1=326466&r2=326467&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp Thu Mar 1 11:09:25 2018
@@ -50,10 +50,13 @@ AMDGPURegisterBankInfo::AMDGPURegisterBa
}
-unsigned AMDGPURegisterBankInfo::copyCost(const RegisterBank &A,
- const RegisterBank &B,
- unsigned Size) const {
- return RegisterBankInfo::copyCost(A, B, Size);
+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();
+ return RegisterBankInfo::copyCost(Dst, Src, Size);
}
const RegisterBank &AMDGPURegisterBankInfo::getRegBankFromRegClass(
More information about the llvm-commits
mailing list