Rewrite tblgen handling of subtarget features so
[oota-llvm.git] / utils / TableGen / CodeGenDAGPatterns.h
index c40f46f4596e3e6d171eedb37fc83d1226e24475..44c154a353792e0a8a2966a962b81ac93cfa5398 100644 (file)
@@ -56,7 +56,8 @@ struct SDTypeConstraint {
   unsigned OperandNo;   // The operand # this constraint applies to.
   enum { 
     SDTCisVT, SDTCisPtrTy, SDTCisInt, SDTCisFP, SDTCisSameAs, 
-    SDTCisVTSmallerThanOp, SDTCisOpSmallerThanOp, SDTCisIntVectorOfSameSize
+    SDTCisVTSmallerThanOp, SDTCisOpSmallerThanOp, SDTCisIntVectorOfSameSize,
+    SDTCisEltOfVec
   } ConstraintType;
   
   union {   // The discriminated union.
@@ -75,6 +76,9 @@ struct SDTypeConstraint {
     struct {
       unsigned OtherOperandNum;
     } SDTCisIntVectorOfSameSize_Info;
+    struct {
+      unsigned OtherOperandNum;
+    } SDTCisEltOfVec_Info;
   } x;
 
   /// ApplyTypeConstraint - Given a node in a pattern, apply this type
@@ -203,14 +207,17 @@ public:
   void setChild(unsigned i, TreePatternNode *N) {
     Children[i] = N;
   }
-  
-  
+
   const std::string &getPredicateFn() const { return PredicateFn; }
   void setPredicateFn(const std::string &Fn) { PredicateFn = Fn; }
 
   Record *getTransformFn() const { return TransformFn; }
   void setTransformFn(Record *Fn) { TransformFn = Fn; }
   
+  /// getIntrinsicInfo - If this node corresponds to an intrinsic, return the
+  /// CodeGenIntrinsic information for it, otherwise return a null pointer.
+  const CodeGenIntrinsic *getIntrinsicInfo(const CodeGenDAGPatterns &CDP) const;
+  
   void print(std::ostream &OS) const;
   void dump() const;