llvm.org GIT mirror llvm / 8130332
start filling in the switch stmt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23412 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 14 years ago
2 changed file(s) with 20 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
10001000 << " case ISD::AssertZext:\n"
10011001 << " return Select(N->getOperand(0));\n";
10021002
1003
1004
1003 // Group the patterns by their top-level opcodes.
1004 std::map > PatternsByOpcode;
1005 for (unsigned i = 0, e = PatternsToMatch.size(); i != e; ++i)
1006 PatternsByOpcode[PatternsToMatch[i].first->getOperator()]
1007 .push_back(&PatternsToMatch[i]);
1008
1009 for (std::map >::iterator
1010 PBOI = PatternsByOpcode.begin(), E = PatternsByOpcode.end(); PBOI != E;
1011 ++PBOI) {
1012 const SDNodeInfo &OpcodeInfo = getSDNodeInfo(PBOI->first);
1013 std::vector &Patterns = PBOI->second;
1014
1015 OS << " case " << OpcodeInfo.getEnumName() << ":\n";
1016
1017 OS << " break;\n";
1018 }
1019
1020
10051021 OS << " } // end of big switch.\n\n"
10061022 << " std::cerr << \"Cannot yet select: \";\n"
10071023 << " N->dump();\n"
324324 /// PatternsToMatch - All of the things we are matching on the DAG. The first
325325 /// value is the pattern to match, the second pattern is the result to
326326 /// emit.
327 std::vector > PatternsToMatch;
327 typedef std::pair PatternToMatch;
328 std::vector PatternsToMatch;
328329 public:
329330 DAGISelEmitter(RecordKeeper &R) : Records(R) {}
330331