projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
There is no EndPtr anymore - reinterpret the original comment in terms
[oota-llvm.git]
/
utils
/
TableGen
/
InstrInfoEmitter.h
diff --git
a/utils/TableGen/InstrInfoEmitter.h
b/utils/TableGen/InstrInfoEmitter.h
index 27cf429fb91e6b25e9678492d056eeab2babec7c..abb1c6bc188cbd94e9ee7c15cb9ec6153dcdb0ea 100644
(file)
--- a/
utils/TableGen/InstrInfoEmitter.h
+++ b/
utils/TableGen/InstrInfoEmitter.h
@@
-16,6
+16,7
@@
#define INSTRINFO_EMITTER_H
#include "TableGenBackend.h"
#define INSTRINFO_EMITTER_H
#include "TableGenBackend.h"
+#include "CodeGenDAGPatterns.h"
#include <vector>
#include <map>
#include <vector>
#include <map>
@@
-28,30
+29,36
@@
class CodeGenInstruction;
class InstrInfoEmitter : public TableGenBackend {
RecordKeeper &Records;
class InstrInfoEmitter : public TableGenBackend {
RecordKeeper &Records;
-
bool IsItineraries
;
+
CodeGenDAGPatterns CDP
;
std::map<std::string, unsigned> ItinClassMap;
public:
std::map<std::string, unsigned> ItinClassMap;
public:
- InstrInfoEmitter(RecordKeeper &R) : Records(R),
IsItineraries(false) {
}
+ InstrInfoEmitter(RecordKeeper &R) : Records(R),
CDP(R) {
}
// run - Output the instruction set description, returning true on failure.
// run - Output the instruction set description, returning true on failure.
- void run(
std::
ostream &OS);
+ void run(
raw_
ostream &OS);
- // runEnums - Print out enum values for all of the instructions.
- void runEnums(std::ostream &OS);
private:
private:
- void printDefList(const std::vector<Record*> &Uses, unsigned Num,
- std::ostream &OS) const;
+ typedef std::map<std::vector<std::string>, unsigned> OperandInfoMapTy;
+
void emitRecord(const CodeGenInstruction &Inst, unsigned Num,
Record *InstrInfo,
std::map<std::vector<Record*>, unsigned> &EL,
void emitRecord(const CodeGenInstruction &Inst, unsigned Num,
Record *InstrInfo,
std::map<std::vector<Record*>, unsigned> &EL,
- std::map<std::vector<std::string>, unsigned> &OpInfo,
- std::ostream &OS);
+ std::map<Record*, unsigned> &BM,
+ const OperandInfoMapTy &OpInfo,
+ raw_ostream &OS);
+
+ // Itinerary information.
void GatherItinClasses();
void GatherItinClasses();
- unsigned ItinClassNumber(std::string ItinName);
- void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,
- std::ostream &OS);
+ unsigned getItinClassNumber(const Record *InstRec);
+
+ // Operand information.
+ void EmitOperandInfo(raw_ostream &OS, OperandInfoMapTy &OperandInfoIDs);
std::vector<std::string> GetOperandInfo(const CodeGenInstruction &Inst);
std::vector<std::string> GetOperandInfo(const CodeGenInstruction &Inst);
+
+ void DetectRegisterClassBarriers(std::vector<Record*> &Defs,
+ const std::vector<CodeGenRegisterClass> &RCs,
+ std::vector<Record*> &Barriers);
};
} // End llvm namespace
};
} // End llvm namespace