summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-02-23 08:42:06 +0000
committerCraig Topper <craig.topper@gmail.com>2012-02-23 08:42:06 +0000
commit9d91c5d31c6758124559c0916d852295f47a2bec (patch)
tree252b0abf241720f073eb8a1c3b76ffdd0acc579d /include
parent9778ad51ee1d2a604b6cc4bece336d2bc4bfbe20 (diff)
downloadllvm-9d91c5d31c6758124559c0916d852295f47a2bec.tar.gz
llvm-9d91c5d31c6758124559c0916d852295f47a2bec.tar.bz2
llvm-9d91c5d31c6758124559c0916d852295f47a2bec.tar.xz
Remove 'if' from getSuperRegisters, getSubRegisters, and getOverlaps that were added in r151038.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCRegisterInfo.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/llvm/MC/MCRegisterInfo.h b/include/llvm/MC/MCRegisterInfo.h
index 0ffc73c79e..b1f494277c 100644
--- a/include/llvm/MC/MCRegisterInfo.h
+++ b/include/llvm/MC/MCRegisterInfo.h
@@ -107,9 +107,9 @@ public:
///
struct MCRegisterDesc {
const char *Name; // Printable name for the reg (for debugging)
- int Overlaps; // Overlapping registers, described above
- int SubRegs; // Sub-register set, described above
- int SuperRegs; // Super-register set, described above
+ unsigned Overlaps; // Overlapping registers, described above
+ unsigned SubRegs; // Sub-register set, described above
+ unsigned SuperRegs; // Super-register set, described above
};
/// MCRegisterInfo base class - We assume that the target defines a static
@@ -213,7 +213,6 @@ public:
///
const unsigned *getAliasSet(unsigned RegNo) const {
// The Overlaps set always begins with Reg itself.
- if (get(RegNo).Overlaps < 0) return 0;
return Overlaps + get(RegNo).Overlaps + 1;
}
@@ -223,7 +222,6 @@ public:
/// These are exactly the registers in { x | regsOverlap(x, Reg) }.
///
const unsigned *getOverlaps(unsigned RegNo) const {
- if (get(RegNo).Overlaps < 0) return 0;
return Overlaps + get(RegNo).Overlaps;
}
@@ -233,7 +231,6 @@ public:
/// relations. e.g. X86::RAX's sub-register list is EAX, AX, AL, AH.
///
const unsigned *getSubRegisters(unsigned RegNo) const {
- if (get(RegNo).SubRegs < 0) return 0;
return SubRegs + get(RegNo).SubRegs;
}
@@ -243,7 +240,6 @@ public:
/// relations. e.g. X86::AL's super-register list is AX, EAX, RAX.
///
const unsigned *getSuperRegisters(unsigned RegNo) const {
- if (get(RegNo).SuperRegs < 0) return 0;
return SuperRegs + get(RegNo).SuperRegs;
}