summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenSchedule.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenSchedule.h')
-rw-r--r--llvm/utils/TableGen/CodeGenSchedule.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.h b/llvm/utils/TableGen/CodeGenSchedule.h
index 388249622b1..8379a929ee7 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.h
+++ b/llvm/utils/TableGen/CodeGenSchedule.h
@@ -235,9 +235,13 @@ struct CodeGenProcModel {
// List of Register Files.
std::vector<CodeGenRegisterFile> RegisterFiles;
+ // Optional Retire Control Unit definition.
+ Record *RetireControlUnit;
+
CodeGenProcModel(unsigned Idx, std::string Name, Record *MDef,
Record *IDef) :
- Index(Idx), ModelName(std::move(Name)), ModelDef(MDef), ItinsDef(IDef) {}
+ Index(Idx), ModelName(std::move(Name)), ModelDef(MDef), ItinsDef(IDef),
+ RetireControlUnit(nullptr) {}
bool hasItineraries() const {
return !ItinsDef->getValueAsListOfDefs("IID").empty();
@@ -248,7 +252,7 @@ struct CodeGenProcModel {
}
bool hasExtraProcessorInfo() const {
- return !RegisterFiles.empty();
+ return RetireControlUnit || !RegisterFiles.empty();
}
unsigned getProcResourceIdx(Record *PRDef) const;
@@ -436,8 +440,12 @@ private:
void collectSchedClasses();
+ void collectRetireControlUnits();
+
void collectRegisterFiles();
+ void collectOptionalProcessorInfo();
+
std::string createSchedClassName(Record *ItinClassDef,
ArrayRef<unsigned> OperWrites,
ArrayRef<unsigned> OperReads);
OpenPOWER on IntegriCloud