mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
start filling in the switch stmt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1001,8 +1001,24 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
|
||||
<< " case ISD::AssertZext:\n"
|
||||
<< " return Select(N->getOperand(0));\n";
|
||||
|
||||
|
||||
// Group the patterns by their top-level opcodes.
|
||||
std::map<Record*, std::vector<PatternToMatch*> > PatternsByOpcode;
|
||||
for (unsigned i = 0, e = PatternsToMatch.size(); i != e; ++i)
|
||||
PatternsByOpcode[PatternsToMatch[i].first->getOperator()]
|
||||
.push_back(&PatternsToMatch[i]);
|
||||
|
||||
for (std::map<Record*, std::vector<PatternToMatch*> >::iterator
|
||||
PBOI = PatternsByOpcode.begin(), E = PatternsByOpcode.end(); PBOI != E;
|
||||
++PBOI) {
|
||||
const SDNodeInfo &OpcodeInfo = getSDNodeInfo(PBOI->first);
|
||||
std::vector<PatternToMatch*> &Patterns = PBOI->second;
|
||||
|
||||
OS << " case " << OpcodeInfo.getEnumName() << ":\n";
|
||||
|
||||
OS << " break;\n";
|
||||
}
|
||||
|
||||
|
||||
OS << " } // end of big switch.\n\n"
|
||||
<< " std::cerr << \"Cannot yet select: \";\n"
|
||||
<< " N->dump();\n"
|
||||
|
Reference in New Issue
Block a user