summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenSchedule.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-09-15 00:19:59 +0000
committerAndrew Trick <atrick@apple.com>2012-09-15 00:19:59 +0000
commit33401e8469e94ffae4786199ff435269090b6f6c (patch)
treee77a4b69a6634b1ec5ef8294f8f83386e71c9ebe /llvm/utils/TableGen/CodeGenSchedule.h
parent766864963bdb84897d23daea2da1a53b94c57327 (diff)
downloadbcm5719-llvm-33401e8469e94ffae4786199ff435269090b6f6c.tar.gz
bcm5719-llvm-33401e8469e94ffae4786199ff435269090b6f6c.zip
TableGen subtarget parser. Handle new machine model.
Infer SchedClasses from variants defined by the target or subtarget. llvm-svn: 163952
Diffstat (limited to 'llvm/utils/TableGen/CodeGenSchedule.h')
-rw-r--r--llvm/utils/TableGen/CodeGenSchedule.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.h b/llvm/utils/TableGen/CodeGenSchedule.h
index 5e8b711fcbb..e9c8359410c 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.h
+++ b/llvm/utils/TableGen/CodeGenSchedule.h
@@ -83,6 +83,13 @@ struct CodeGenSchedRW {
#endif
};
+/// Represent a transition between SchedClasses induced by SchedWriteVariant.
+struct CodeGenSchedTransition {
+ unsigned ToClassIdx;
+ IdxVec ProcIndices;
+ RecVec PredTerm;
+};
+
/// Scheduling class.
///
/// Each instruction description will be mapped to a scheduling class. There are
@@ -116,6 +123,8 @@ struct CodeGenSchedClass {
// Sorted list of ProcIdx, where ProcIdx==0 implies any processor.
IdxVec ProcIndices;
+ std::vector<CodeGenSchedTransition> Transitions;
+
// InstReadWrite records associated with this class. Any Instrs that the
// definitions refer to that are not mapped to this class should be ignored.
RecVec InstRWs;
@@ -308,6 +317,7 @@ public:
void findRWs(const RecVec &RWDefs, IdxVec &Writes, IdxVec &Reads) const;
void findRWs(const RecVec &RWDefs, IdxVec &RWs, bool IsRead) const;
+ void expandRWSequence(unsigned RWIdx, IdxVec &RWSeq, bool IsRead) const;
unsigned addSchedClass(const IdxVec &OperWrites, const IdxVec &OperReads,
const IdxVec &ProcIndices);
@@ -337,6 +347,13 @@ private:
void collectProcItins();
void collectProcItinRW();
+
+ void inferSchedClasses();
+
+ void inferFromRW(const IdxVec &OperWrites, const IdxVec &OperReads,
+ unsigned FromClassIdx, const IdxVec &ProcIndices);
+ void inferFromItinClass(Record *ItinClassDef, unsigned FromClassIdx);
+ void inferFromInstRWs(unsigned SCIdx);
};
} // namespace llvm
OpenPOWER on IntegriCloud