add support for the new isel matcher to generate 
(isprofitable|islegal)tofold checks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96331 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelMatcher.h b/utils/TableGen/DAGISelMatcher.h
index 72bdb7b..8699d51 100644
--- a/utils/TableGen/DAGISelMatcher.h
+++ b/utils/TableGen/DAGISelMatcher.h
@@ -48,7 +48,9 @@
     CheckValueType,
     CheckComplexPat,
     CheckAndImm,
-    CheckOrImm
+    CheckOrImm,
+    CheckProfitableToFold,
+    CheckLegalToFold
   };
   const KindTy Kind;
   
@@ -355,8 +357,34 @@
   
   virtual void print(raw_ostream &OS, unsigned indent = 0) const;
 };
+
+/// CheckProfitableToFoldMatcherNode - This checks to see if the current node is
+/// worthwhile to try to fold into a large pattern.
+class CheckProfitableToFoldMatcherNode : public MatcherNodeWithChild {
+public:
+  CheckProfitableToFoldMatcherNode()
+  : MatcherNodeWithChild(CheckProfitableToFold) {}
   
+  static inline bool classof(const MatcherNode *N) {
+    return N->getKind() == CheckProfitableToFold;
+  }
   
+  virtual void print(raw_ostream &OS, unsigned indent = 0) const;
+};
+
+/// CheckLegalToFoldMatcherNode - This checks to see if the current node is
+/// legal to try to fold into a large pattern.
+class CheckLegalToFoldMatcherNode : public MatcherNodeWithChild {
+public:
+  CheckLegalToFoldMatcherNode()
+  : MatcherNodeWithChild(CheckLegalToFold) {}
+  
+  static inline bool classof(const MatcherNode *N) {
+    return N->getKind() == CheckLegalToFold;
+  }
+  
+  virtual void print(raw_ostream &OS, unsigned indent = 0) const;
+};
 } // end namespace llvm
 
 #endif