change CheckOpcodeMatcher to hold the SDNodeInfo instead of
the opcode name.  This gives the optimizer more semantic info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97346 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp
index 1224a1d..cae2dfb 100644
--- a/utils/TableGen/DAGISelMatcherGen.cpp
+++ b/utils/TableGen/DAGISelMatcherGen.cpp
@@ -252,14 +252,12 @@
     if (N == Pattern.getSrcPattern()) {
       const std::vector<Record*> &OpNodes = CP.getRootNodes();
       if (OpNodes.size() == 1) {
-        StringRef OpName = CGP.getSDNodeInfo(OpNodes[0]).getEnumName();
-        AddMatcher(new CheckOpcodeMatcher(OpName));
+        AddMatcher(new CheckOpcodeMatcher(CGP.getSDNodeInfo(OpNodes[0])));
       } else if (!OpNodes.empty()) {
-        SmallVector<StringRef, 4> OpNames;
+        SmallVector<const SDNodeInfo*, 4> OpNames;
         for (unsigned i = 0, e = OpNodes.size(); i != e; i++)
-          OpNames.push_back(CGP.getSDNodeInfo(OpNodes[i]).getEnumName());
-        AddMatcher(new CheckMultiOpcodeMatcher(OpNames.data(),
-                                                       OpNames.size()));
+          OpNames.push_back(&CGP.getSDNodeInfo(OpNodes[i]));
+        AddMatcher(new CheckMultiOpcodeMatcher(OpNames.data(), OpNames.size()));
       }
     }
     
@@ -337,7 +335,7 @@
   }
   
   // Check that the current opcode lines up.
-  AddMatcher(new CheckOpcodeMatcher(CInfo.getEnumName()));
+  AddMatcher(new CheckOpcodeMatcher(CInfo));
   
   // If there are node predicates for this node, generate their checks.
   for (unsigned i = 0, e = N->getPredicateFns().size(); i != e; ++i)