TableGen: Refactor DAG patterns to enable parsing one pattern at a time.
[oota-llvm.git] / utils / TableGen / CodeGenDAGPatterns.h
index 7c2fa367410860c569d9a9dd8b29e47fa20d6c2f..6fbdd4f9a85be55abc8fca7967e0c15c46a18ad4 100644 (file)
@@ -778,7 +778,11 @@ public:
   ptm_iterator ptm_begin() const { return PatternsToMatch.begin(); }
   ptm_iterator ptm_end() const { return PatternsToMatch.end(); }
 
-
+  /// Parse the Pattern for an instruction, and insert the result in DAGInsts.
+  typedef std::map<Record*, DAGInstruction, LessRecordByID> DAGInstMap;
+  const DAGInstruction &parseInstructionPattern(
+      CodeGenInstruction &CGI, ListInit *Pattern,
+      DAGInstMap &DAGInsts);
 
   const DAGInstruction &getInstruction(Record *R) const {
     assert(Instructions.count(R) && "Unknown instruction!");