[PATCH] D13045: AMDGPU: Don't handle invalid reg classes in helper functions
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 22:36:37 PDT 2015
arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.
No tests hit these and it would be better to have checks like this explicit where they are used.
http://reviews.llvm.org/D13045
Files:
lib/Target/AMDGPU/SIRegisterInfo.h
Index: lib/Target/AMDGPU/SIRegisterInfo.h
===================================================================
--- lib/Target/AMDGPU/SIRegisterInfo.h
+++ lib/Target/AMDGPU/SIRegisterInfo.h
@@ -48,17 +48,11 @@
/// \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));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13045.35344.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150922/22aa6701/attachment.bin>
More information about the llvm-commits
mailing list