final cleanups.

llvm-svn: 45644
This commit is contained in:
Chris Lattner 2008-01-06 01:21:51 +00:00
parent 4eecc7c085
commit e0f76407f9
2 changed files with 8 additions and 9 deletions

View File

@ -19,8 +19,8 @@
#include <iostream>
using namespace llvm;
void InstrInfoEmitter::printDefList(const std::vector<Record*> &Uses,
unsigned Num, std::ostream &OS) const {
static void PrintDefList(const std::vector<Record*> &Uses,
unsigned Num, std::ostream &OS) {
OS << "static const unsigned ImplicitList" << Num << "[] = { ";
for (unsigned i = 0, e = Uses.size(); i != e; ++i)
OS << getQualifiedName(Uses[i]) << ", ";
@ -163,12 +163,12 @@ void InstrInfoEmitter::run(std::ostream &OS) {
std::vector<Record*> Uses = Inst->getValueAsListOfDefs("Uses");
if (!Uses.empty()) {
unsigned &IL = EmittedLists[Uses];
if (!IL) printDefList(Uses, IL = ++ListNumber, OS);
if (!IL) PrintDefList(Uses, IL = ++ListNumber, OS);
}
std::vector<Record*> Defs = Inst->getValueAsListOfDefs("Defs");
if (!Defs.empty()) {
unsigned &IL = EmittedLists[Defs];
if (!IL) printDefList(Defs, IL = ++ListNumber, OS);
if (!IL) PrintDefList(Defs, IL = ++ListNumber, OS);
}
}

View File

@ -41,22 +41,21 @@ public:
private:
typedef std::map<std::vector<std::string>, unsigned> OperandInfoMapTy;
void printDefList(const std::vector<Record*> &Uses, unsigned Num,
std::ostream &OS) const;
void emitRecord(const CodeGenInstruction &Inst, unsigned Num,
Record *InstrInfo,
std::map<std::vector<Record*>, unsigned> &EL,
const OperandInfoMapTy &OpInfo,
std::ostream &OS);
void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,
std::ostream &OS);
// Itinerary information.
void GatherItinClasses();
unsigned getItinClassNumber(const Record *InstRec);
// Operand information.
void EmitOperandInfo(std::ostream &OS, OperandInfoMapTy &OperandInfoIDs);
std::vector<std::string> GetOperandInfo(const CodeGenInstruction &Inst);
void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,
std::ostream &OS);
};
} // End llvm namespace