diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-30 01:33:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-30 01:33:48 +0000 |
commit | 0d0b73e9f83c45c7cba28d57564567025c7ee014 (patch) | |
tree | 61a39651c69860c3ee35185c72bca0239e3ef511 /utils | |
parent | b48d2cf5eb4a2576314490e43bef0ac0d87732b2 (diff) | |
download | external_llvm-0d0b73e9f83c45c7cba28d57564567025c7ee014.zip external_llvm-0d0b73e9f83c45c7cba28d57564567025c7ee014.tar.gz external_llvm-0d0b73e9f83c45c7cba28d57564567025c7ee014.tar.bz2 |
allow regs to be in multiple reg classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/RegisterInfoEmitter.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index caae2f0..10ff3f3 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -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"; |