[llvm] r248655 - AMDGPU: Don't handle invalid reg classes in helper functions
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 21:53:31 PDT 2015
Author: arsenm
Date: Fri Sep 25 23:53:30 2015
New Revision: 248655
URL: http://llvm.org/viewvc/llvm-project?rev=248655&view=rev
Log:
AMDGPU: Don't handle invalid reg classes in helper functions
No tests hit these and it would be better to have checks like
this explicit where they are used.
Modified:
llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.h
Modified: llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.h?rev=248655&r1=248654&r2=248655&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIRegisterInfo.h Fri Sep 25 23:53:30 2015
@@ -48,17 +48,11 @@ public:
/// \returns true if this class contains only SGPR registers
bool isSGPRClass(const TargetRegisterClass *RC) const {
- if (!RC)
- return false;
-
return !hasVGPRs(RC);
}
/// \returns true if this class ID contains only SGPR registers
bool isSGPRClassID(unsigned RCID) const {
- if (static_cast<int>(RCID) == -1)
- return false;
-
return isSGPRClass(getRegClass(RCID));
}
More information about the llvm-commits
mailing list