[llvm-commits] [llvm] r150076 - in /llvm/trunk: include/llvm/MC/MCRegisterInfo.h utils/TableGen/RegisterInfoEmitter.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Feb 8 06:43:53 PST 2012
Author: d0k
Date: Wed Feb 8 08:43:53 2012
New Revision: 150076
URL: http://llvm.org/viewvc/llvm-project?rev=150076&view=rev
Log:
Value initialize MCRegisterClasses. Not sure how could miss this during the MCTargetDesc refactor.
Modified:
llvm/trunk/include/llvm/MC/MCRegisterInfo.h
llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
Modified: llvm/trunk/include/llvm/MC/MCRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCRegisterInfo.h?rev=150076&r1=150075&r2=150076&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCRegisterInfo.h Wed Feb 8 08:43:53 2012
@@ -27,7 +27,7 @@
public:
typedef const unsigned* iterator;
typedef const unsigned* const_iterator;
-private:
+
unsigned ID;
const char *Name;
const unsigned RegSize, Alignment; // Size & Alignment of register in bytes
@@ -36,17 +36,6 @@
const iterator RegsBegin, RegsEnd;
const unsigned char *const RegSet;
const unsigned RegSetSize;
-public:
- MCRegisterClass(unsigned id, const char *name,
- unsigned RS, unsigned Al, int CC, bool Allocable,
- iterator RB, iterator RE, const unsigned char *Bits,
- unsigned NumBytes)
- : ID(id), Name(name), RegSize(RS), Alignment(Al), CopyCost(CC),
- Allocatable(Allocable), RegsBegin(RB), RegsEnd(RE), RegSet(Bits),
- RegSetSize(NumBytes) {
- for (iterator i = RegsBegin; i != RegsEnd; ++i)
- assert(contains(*i) && "Bit field corrupted.");
- }
/// getID() - Return the register class ID number.
///
Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=150076&r1=150075&r2=150076&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Wed Feb 8 08:43:53 2012
@@ -367,7 +367,7 @@
for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) {
const CodeGenRegisterClass &RC = *RegisterClasses[rc];
- OS << " MCRegisterClass(" << RC.getQualifiedName() + "RegClassID" << ", "
+ OS << " { " << RC.getQualifiedName() + "RegClassID" << ", "
<< '\"' << RC.getName() << "\", "
<< RC.SpillSize/8 << ", "
<< RC.SpillAlignment/8 << ", "
@@ -376,7 +376,7 @@
<< RC.getName() << ", " << RC.getName() << " + "
<< RC.getOrder().size() << ", "
<< RC.getName() << "Bits, sizeof(" << RC.getName() << "Bits)"
- << "),\n";
+ << " },\n";
}
OS << "};\n\n";
More information about the llvm-commits
mailing list