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/DAGISelMatcher.cpp b/utils/TableGen/DAGISelMatcher.cpp
index d8aee08..ade058e 100644
--- a/utils/TableGen/DAGISelMatcher.cpp
+++ b/utils/TableGen/DAGISelMatcher.cpp
@@ -81,7 +81,7 @@
 }
 
 void CheckOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const {
-  OS.indent(indent) << "CheckOpcode " << OpcodeName << '\n';
+  OS.indent(indent) << "CheckOpcode " << Opcode.getEnumName() << '\n';
 }
 
 void CheckMultiOpcodeMatcher::printImpl(raw_ostream &OS, unsigned indent) const{
@@ -202,13 +202,13 @@
 }
 
 unsigned CheckOpcodeMatcher::getHashImpl() const {
-  return HashString(OpcodeName);
+  return HashString(Opcode.getEnumName());
 }
 
 unsigned CheckMultiOpcodeMatcher::getHashImpl() const {
   unsigned Result = 0;
-  for (unsigned i = 0, e = OpcodeNames.size(); i != e; ++i)
-    Result |= HashString(OpcodeNames[i]);
+  for (unsigned i = 0, e = Opcodes.size(); i != e; ++i)
+    Result |= HashString(Opcodes[i]->getEnumName());
   return Result;
 }
 
@@ -263,7 +263,7 @@
 bool CheckOpcodeMatcher::isContradictoryImpl(const Matcher *M) const {
   if (const CheckOpcodeMatcher *COM = dyn_cast<CheckOpcodeMatcher>(M)) {
     // One node can't have two different opcodes!
-    return COM->getOpcodeName() != getOpcodeName();
+    return &COM->getOpcode() != &getOpcode();
   }
   
   // TODO: CheckMultiOpcodeMatcher?
@@ -272,8 +272,8 @@
   // ISD::STORE nodes can't have non-void type.
   if (const CheckTypeMatcher *CT = dyn_cast<CheckTypeMatcher>(M))
     // FIXME: This sucks, get void nodes from type constraints.
-    return (getOpcodeName() == "ISD::STORE" ||
-            getOpcodeName() == "ISD::INTRINSIC_VOID") &&
+    return (getOpcode().getEnumName() == "ISD::STORE" ||
+            getOpcode().getEnumName() == "ISD::INTRINSIC_VOID") &&
            CT->getType() != MVT::isVoid;
   
   return false;