llvm.org GIT mirror llvm / 5fbe275
final cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45644 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
2 changed file(s) with 8 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
1818 #include
1919 using namespace llvm;
2020
21 void InstrInfoEmitter::printDefList(const std::vector &Uses,
22 unsigned Num, std::ostream &OS) const {
21 static void PrintDefList(const std::vector &Uses,
22 unsigned Num, std::ostream &OS) {
2323 OS << "static const unsigned ImplicitList" << Num << "[] = { ";
2424 for (unsigned i = 0, e = Uses.size(); i != e; ++i)
2525 OS << getQualifiedName(Uses[i]) << ", ";
162162 std::vector Uses = Inst->getValueAsListOfDefs("Uses");
163163 if (!Uses.empty()) {
164164 unsigned &IL = EmittedLists[Uses];
165 if (!IL) printDefList(Uses, IL = ++ListNumber, OS);
165 if (!IL) PrintDefList(Uses, IL = ++ListNumber, OS);
166166 }
167167 std::vector Defs = Inst->getValueAsListOfDefs("Defs");
168168 if (!Defs.empty()) {
169169 unsigned &IL = EmittedLists[Defs];
170 if (!IL) printDefList(Defs, IL = ++ListNumber, OS);
170 if (!IL) PrintDefList(Defs, IL = ++ListNumber, OS);
171171 }
172172 }
173173
4040 private:
4141 typedef std::map, unsigned> OperandInfoMapTy;
4242
43 void printDefList(const std::vector &Uses, unsigned Num,
44 std::ostream &OS) const;
4543 void emitRecord(const CodeGenInstruction &Inst, unsigned Num,
4644 Record *InstrInfo,
4745 std::map, unsigned> &EL,
4846 const OperandInfoMapTy &OpInfo,
4947 std::ostream &OS);
48 void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,
49 std::ostream &OS);
5050
51 // Itinerary information.
5152 void GatherItinClasses();
5253 unsigned getItinClassNumber(const Record *InstRec);
5354
55 // Operand information.
5456 void EmitOperandInfo(std::ostream &OS, OperandInfoMapTy &OperandInfoIDs);
5557 std::vector GetOperandInfo(const CodeGenInstruction &Inst);
56
57 void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,
58 std::ostream &OS);
5958 };
6059
6160 } // End llvm namespace