[llvm-commits] [llvm] r45644 - in /llvm/trunk/utils/TableGen: InstrInfoEmitter.cpp InstrInfoEmitter.h
Chris Lattner
sabre at nondot.org
Sat Jan 5 17:21:51 PST 2008
Author: lattner
Date: Sat Jan 5 19:21:51 2008
New Revision: 45644
URL: http://llvm.org/viewvc/llvm-project?rev=45644&view=rev
Log:
final cleanups.
Modified:
llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
llvm/trunk/utils/TableGen/InstrInfoEmitter.h
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=45644&r1=45643&r2=45644&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Sat Jan 5 19:21:51 2008
@@ -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 @@
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);
}
}
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.h?rev=45644&r1=45643&r2=45644&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.h (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.h Sat Jan 5 19:21:51 2008
@@ -41,22 +41,21 @@
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
More information about the llvm-commits
mailing list