mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
allow regs to be in multiple reg classes
llvm-svn: 23540
This commit is contained in:
parent
2aaaf81c9e
commit
7be456ae2f
@ -101,8 +101,6 @@ void RegisterInfoEmitter::run(std::ostream &OS) {
|
||||
const std::vector<CodeGenRegisterClass> &RegisterClasses =
|
||||
Target.getRegisterClasses();
|
||||
|
||||
std::set<Record*> RegistersFound;
|
||||
|
||||
// Loop over all of the register classes... emitting each one.
|
||||
OS << "namespace { // Register classes...\n";
|
||||
|
||||
@ -121,10 +119,6 @@ void RegisterInfoEmitter::run(std::ostream &OS) {
|
||||
<< "[] = {\n ";
|
||||
for (unsigned i = 0, e = RC.Elements.size(); i != e; ++i) {
|
||||
Record *Reg = RC.Elements[i];
|
||||
if (RegistersFound.count(Reg))
|
||||
throw "Register '" + Reg->getName() +
|
||||
"' included in multiple register classes!";
|
||||
RegistersFound.insert(Reg);
|
||||
OS << getQualifiedName(Reg) << ", ";
|
||||
|
||||
// Keep track of which regclasses this register is in.
|
||||
@ -232,18 +226,8 @@ void RegisterInfoEmitter::run(std::ostream &OS) {
|
||||
unsigned SpillAlign = Reg.DeclaredSpillAlignment;
|
||||
for (; I != E; ++I) { // For each reg class this belongs to.
|
||||
const CodeGenRegisterClass *RC = I->second;
|
||||
if (SpillSize == 0)
|
||||
SpillSize = RC->SpillSize;
|
||||
else if (SpillSize != RC->SpillSize)
|
||||
throw "Spill size for regclass '" + RC->getName() +
|
||||
"' doesn't match spill sized already inferred for register '" +
|
||||
Reg.getName() + "'!";
|
||||
if (SpillAlign == 0)
|
||||
SpillAlign = RC->SpillAlignment;
|
||||
else if (SpillAlign != RC->SpillAlignment)
|
||||
throw "Spill alignment for regclass '" + RC->getName() +
|
||||
"' doesn't match spill sized already inferred for register '" +
|
||||
Reg.getName() + "'!";
|
||||
SpillSize = std::max(SpillSize, RC->SpillSize);
|
||||
SpillAlign = std::max(SpillAlign, RC->SpillAlignment);
|
||||
}
|
||||
|
||||
OS << SpillSize << ", " << SpillAlign << " },\n";
|
||||
|
Loading…
Reference in New Issue
Block a user