Ignore stderr for some more tests that expect warnings there.
[oota-llvm.git] / include / llvm / Target / TargetInstrItineraries.h
index 3a622c7732f5b0f1a0a1d4f858e2146482d921f1..dbf2b65b9a9f9de95adc571537cfcc5790091957 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the James M. Laskey and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -41,6 +41,45 @@ struct InstrItinerary {
 };
 
 
+
+//===----------------------------------------------------------------------===//
+// Instruction itinerary Data - Itinerary data supplied by a subtarget to be
+// used by a target.
+//
+struct InstrItineraryData {
+  const InstrStage     *Stages;         // Array of stages selected
+  const InstrItinerary *Itineratries;   // Array of itineraries selected
+
+//
+// Ctors.
+//
+  InstrItineraryData() : Stages(0), Itineratries(0) {}
+  InstrItineraryData(const InstrStage *S, const InstrItinerary *I)
+    : Stages(S), Itineratries(I) {}
+  
+  //
+  // isEmpty - Returns true if there are no itineraries.
+  //
+  inline bool isEmpty() const { return Itineratries == 0; }
+  
+  //
+  // begin - Return the first stage of the itinerary.
+  // 
+  inline const InstrStage *begin(unsigned ItinClassIndx) const {
+    unsigned StageIdx = Itineratries[ItinClassIndx].First;
+    return Stages + StageIdx;
+  }
+
+  //
+  // end - Return the last+1 stage of the itinerary.
+  // 
+  inline const InstrStage *end(unsigned ItinClassIndx) const {
+    unsigned StageIdx = Itineratries[ItinClassIndx].Last;
+    return Stages + StageIdx;
+  }
+};
+
+
 } // End llvm namespace
 
 #endif