llvm.org GIT mirror llvm / bfe74b9
iterator access to scheduling classes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206552 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 6 years ago
1 changed file(s) with 22 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
247247 public:
248248 CodeGenSchedModels(RecordKeeper& RK, const CodeGenTarget &TGT);
249249
250 // iterator access to the scheduling classes.
251 typedef std::vector::iterator class_iterator;
252 typedef std::vector::const_iterator const_class_iterator;
253 class_iterator classes_begin() { return SchedClasses.begin(); }
254 const_class_iterator classes_begin() const { return SchedClasses.begin(); }
255 class_iterator classes_end() { return SchedClasses.end(); }
256 const_class_iterator classes_end() const { return SchedClasses.end(); }
257 iterator_range classes() {
258 return iterator_range(classes_begin(), classes_end());
259 }
260 iterator_range classes() const {
261 return iterator_range(classes_begin(), classes_end());
262 }
263 iterator_range explicit_classes() {
264 return iterator_range(
265 classes_begin(), classes_begin() + NumInstrSchedClasses);
266 }
267 iterator_range explicit_classes() const {
268 return iterator_range(
269 classes_begin(), classes_begin() + NumInstrSchedClasses);
270 }
271
250272 Record *getModelOrItinDef(Record *ProcDef) const {
251273 Record *ModelDef = ProcDef->getValueAsDef("SchedModel");
252274 Record *ItinsDef = ProcDef->getValueAsDef("ProcItin");