mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 03:59:12 +00:00
final cleanups.
llvm-svn: 45644
This commit is contained in:
parent
4eecc7c085
commit
e0f76407f9
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user