diff options
author | Andrew Trick <atrick@apple.com> | 2012-09-17 23:00:42 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-09-17 23:00:42 +0000 |
commit | 8e7f202e32149f86bb15813398cc8f3b92b12387 (patch) | |
tree | f7a9c576229d0f8dfc51d9fbbbd548e2849078e6 /llvm/utils/TableGen/CodeGenSchedule.h | |
parent | 2b006e42319903437a3b2231b8c99eca5d940946 (diff) | |
download | bcm5719-llvm-8e7f202e32149f86bb15813398cc8f3b92b12387.tar.gz bcm5719-llvm-8e7f202e32149f86bb15813398cc8f3b92b12387.zip |
Revert r164061-r164067. Most of the new subtarget emitter.
I have to work out the Target/CodeGen header dependencies
before putting this back.
llvm-svn: 164072
Diffstat (limited to 'llvm/utils/TableGen/CodeGenSchedule.h')
-rw-r--r-- | llvm/utils/TableGen/CodeGenSchedule.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.h b/llvm/utils/TableGen/CodeGenSchedule.h index dd0bf72276a..992ae82d4c0 100644 --- a/llvm/utils/TableGen/CodeGenSchedule.h +++ b/llvm/utils/TableGen/CodeGenSchedule.h @@ -83,7 +83,7 @@ struct CodeGenSchedRW { #endif }; -/// Represent a transition between SchedClasses induced by SchedVariant. +/// Represent a transition between SchedClasses induced by SchedWriteVariant. struct CodeGenSchedTransition { unsigned ToClassIdx; IdxVec ProcIndices; @@ -304,6 +304,15 @@ public: return SchedClasses[Idx]; } + // Get an itinerary class's index. Value indices are '0' for NoItinerary up to + // and including numItineraryClasses(). + unsigned getItinClassIdx(Record *ItinDef) const { + assert(SchedClassIdxMap.count(ItinDef->getName()) && "missing ItinClass"); + unsigned Idx = SchedClassIdxMap.lookup(ItinDef->getName()); + assert(Idx <= NumItineraryClasses && "bad ItinClass index"); + return Idx; + } + // Get the SchedClass index for an instruction. Instructions with no // itinerary, no SchedReadWrites, and no InstrReadWrites references return 0 // for NoItinerary. |