diff options
| author | Craig Topper <craig.topper@gmail.com> | 2012-02-23 08:42:06 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2012-02-23 08:42:06 +0000 |
| commit | 243582995a9eefa909972b0747c204320332fab8 (patch) | |
| tree | 36072f133f46c7edf00b135dbe359f81411345c8 | |
| parent | c899892485ac8a1efee322a0dc97cbd9639fdb7e (diff) | |
| download | bcm5719-llvm-243582995a9eefa909972b0747c204320332fab8.tar.gz bcm5719-llvm-243582995a9eefa909972b0747c204320332fab8.zip | |
Remove 'if' from getSuperRegisters, getSubRegisters, and getOverlaps that were added in r151038.
llvm-svn: 151246
| -rw-r--r-- | llvm/include/llvm/MC/MCRegisterInfo.h | 10 | ||||
| -rw-r--r-- | llvm/utils/TableGen/RegisterInfoEmitter.cpp | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/llvm/include/llvm/MC/MCRegisterInfo.h b/llvm/include/llvm/MC/MCRegisterInfo.h index 0ffc73c79ee..b1f494277ce 100644 --- a/llvm/include/llvm/MC/MCRegisterInfo.h +++ b/llvm/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; } diff --git a/llvm/utils/TableGen/RegisterInfoEmitter.cpp b/llvm/utils/TableGen/RegisterInfoEmitter.cpp index e46426071ad..d33b0b229d5 100644 --- a/llvm/utils/TableGen/RegisterInfoEmitter.cpp +++ b/llvm/utils/TableGen/RegisterInfoEmitter.cpp @@ -312,7 +312,7 @@ RegisterInfoEmitter::runMCDesc(raw_ostream &OS, CodeGenTarget &Target, OS << "extern const MCRegisterDesc " << TargetName << "RegDesc[] = { // Descriptors\n"; - OS << " { \"NOREG\", -1, -1, -1 },\n"; + OS << " { \"NOREG\", 0, 0, 0 },\n"; // Now that register alias and sub-registers sets have been emitted, emit the // register descriptors now. |

