- OS << Num << ",\t" << MinOperands << ",\t\"";
-
- if (Inst.Name.empty())
- OS << Inst.TheDef->getName();
- else
- OS << Inst.Name;
-
- unsigned ItinClass = !IsItineraries ? 0 :
- ItinClassNumber(Inst.TheDef->getValueAsDef("Itinerary")->getName());
-
- OS << "\",\t" << ItinClass << ", 0";
-
- // Try to determine (from the pattern), if the instruction is a store.
- bool isStore = false;
- if (dynamic_cast<ListInit*>(Inst.TheDef->getValueInit("Pattern"))) {
- ListInit *LI = Inst.TheDef->getValueAsListInit("Pattern");
- if (LI && LI->getSize() > 0) {
- DagInit *Dag = (DagInit *)LI->getElement(0);
- DefInit *OpDef = dynamic_cast<DefInit*>(Dag->getOperator());
- if (OpDef) {
- Record *Operator = OpDef->getDef();
- if (Operator->isSubClassOf("SDNode")) {
- const std::string Opcode = Operator->getValueAsString("Opcode");
- if (Opcode == "ISD::STORE" || Opcode == "ISD::TRUNCSTORE")
- isStore = true;
- }
- }
- }
- }
+ OS << Num << ",\t" << MinOperands << ",\t"
+ << Inst.NumDefs << ",\t" << getItinClassNumber(Inst.TheDef)
+ << ",\t\"" << Inst.TheDef->getName() << "\", 0";