use MorphNodeTo instead of SelectNodeTo.  SelectNodeTo
is just a silly wrapper around MorphNodeTo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97416 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelMatcher.cpp b/utils/TableGen/DAGISelMatcher.cpp
index 085682f..1f1bb60 100644
--- a/utils/TableGen/DAGISelMatcher.cpp
+++ b/utils/TableGen/DAGISelMatcher.cpp
@@ -176,7 +176,7 @@
 
 void EmitNodeMatcherCommon::printImpl(raw_ostream &OS, unsigned indent) const {
   OS.indent(indent);
-  OS << (isa<SelectNodeToMatcher>(this) ? "SelectNodeTo: " : "EmitNode: ")
+  OS << (isa<MorphNodeToMatcher>(this) ? "MorphNodeTo: " : "EmitNode: ")
      << OpcodeName << ": <todo flags> ";
 
   for (unsigned i = 0, e = VTs.size(); i != e; ++i)
diff --git a/utils/TableGen/DAGISelMatcher.h b/utils/TableGen/DAGISelMatcher.h
index 0d674c5..46652d9 100644
--- a/utils/TableGen/DAGISelMatcher.h
+++ b/utils/TableGen/DAGISelMatcher.h
@@ -76,7 +76,7 @@
     EmitNodeXForm,        // Run a SDNodeXForm
     MarkFlagResults,      // Indicate which interior nodes have flag results.
     CompleteMatch,        // Finish a match and update the results.
-    SelectNodeTo          // Build a node, finish a match and update results.
+    MorphNodeTo           // Build a node, finish a match and update results.
   };
   const KindTy Kind;
 
@@ -871,7 +871,7 @@
 };
   
 /// EmitNodeMatcherCommon - Common class shared between EmitNode and
-/// SelectNodeTo.
+/// MorphNodeTo.
 class EmitNodeMatcherCommon : public Matcher {
   std::string OpcodeName;
   const SmallVector<MVT::SimpleValueType, 3> VTs;
@@ -887,8 +887,8 @@
                         const MVT::SimpleValueType *vts, unsigned numvts,
                         const unsigned *operands, unsigned numops,
                         bool hasChain, bool hasFlag, bool hasmemrefs,
-                        int numfixedarityoperands, bool isSelectNodeTo)
-    : Matcher(isSelectNodeTo ? SelectNodeTo : EmitNode), OpcodeName(opcodeName),
+                        int numfixedarityoperands, bool isMorphNodeTo)
+    : Matcher(isMorphNodeTo ? MorphNodeTo : EmitNode), OpcodeName(opcodeName),
       VTs(vts, vts+numvts), Operands(operands, operands+numops),
       HasChain(hasChain), HasFlag(hasFlag), HasMemRefs(hasmemrefs),
       NumFixedArityOperands(numfixedarityoperands) {}
@@ -926,7 +926,7 @@
   int getNumFixedArityOperands() const { return NumFixedArityOperands; }
   
   static inline bool classof(const Matcher *N) {
-    return N->getKind() == EmitNode || N->getKind() == SelectNodeTo;
+    return N->getKind() == EmitNode || N->getKind() == MorphNodeTo;
   }
   
 private:
@@ -956,14 +956,14 @@
   
 };
   
-class SelectNodeToMatcher : public EmitNodeMatcherCommon {
+class MorphNodeToMatcher : public EmitNodeMatcherCommon {
   const PatternToMatch &Pattern;
 public:
-  SelectNodeToMatcher(const std::string &opcodeName,
-                      const MVT::SimpleValueType *vts, unsigned numvts,
-                      const unsigned *operands, unsigned numops,
-                      bool hasChain, bool hasFlag, bool hasmemrefs,
-                      int numfixedarityoperands, const PatternToMatch &pattern)
+  MorphNodeToMatcher(const std::string &opcodeName,
+                     const MVT::SimpleValueType *vts, unsigned numvts,
+                     const unsigned *operands, unsigned numops,
+                     bool hasChain, bool hasFlag, bool hasmemrefs,
+                     int numfixedarityoperands, const PatternToMatch &pattern)
     : EmitNodeMatcherCommon(opcodeName, vts, numvts, operands, numops, hasChain,
                             hasFlag, hasmemrefs, numfixedarityoperands, true),
       Pattern(pattern) {
@@ -972,7 +972,7 @@
   const PatternToMatch &getPattern() const { return Pattern; }
 
   static inline bool classof(const Matcher *N) {
-    return N->getKind() == SelectNodeTo;
+    return N->getKind() == MorphNodeTo;
   }
 };
   
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp
index aec1e18..c4c005c 100644
--- a/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -390,9 +390,9 @@
   }
       
   case Matcher::EmitNode:
-  case Matcher::SelectNodeTo: {
+  case Matcher::MorphNodeTo: {
     const EmitNodeMatcherCommon *EN = cast<EmitNodeMatcherCommon>(N);
-    OS << (isa<EmitNodeMatcher>(EN) ? "OPC_EmitNode" : "OPC_SelectNodeTo");
+    OS << (isa<EmitNodeMatcher>(EN) ? "OPC_EmitNode" : "OPC_MorphNodeTo");
     OS << ", TARGET_OPCODE(" << EN->getOpcodeName() << "), 0";
     
     if (EN->hasChain())   OS << "|OPFL_Chain";
@@ -425,7 +425,7 @@
     }
     OS << '\n';
     
-    if (const SelectNodeToMatcher *SNT = dyn_cast<SelectNodeToMatcher>(N)) {
+    if (const MorphNodeToMatcher *SNT = dyn_cast<MorphNodeToMatcher>(N)) {
       OS.PadToColumn(Indent*2) << "// Src: "
       << *SNT->getPattern().getSrcPattern() << '\n';
       OS.PadToColumn(Indent*2) << "// Dst: " 
@@ -585,7 +585,7 @@
     case Matcher::EmitMergeInputChains: OS << "OPC_EmitMergeInputChains"; break;
     case Matcher::EmitCopyToReg: OS << "OPC_EmitCopyToReg"; break;
     case Matcher::EmitNode: OS << "OPC_EmitNode"; break;
-    case Matcher::SelectNodeTo: OS << "OPC_SelectNodeTo"; break;
+    case Matcher::MorphNodeTo: OS << "OPC_MorphNodeTo"; break;
     case Matcher::EmitNodeXForm: OS << "OPC_EmitNodeXForm"; break;
     case Matcher::MarkFlagResults: OS << "OPC_MarkFlagResults"; break;
     case Matcher::CompleteMatch: OS << "OPC_CompleteMatch"; break;    
diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp
index 2ea178f..65a01fa 100644
--- a/utils/TableGen/DAGISelMatcherOpt.cpp
+++ b/utils/TableGen/DAGISelMatcherOpt.cpp
@@ -66,11 +66,11 @@
       return ContractNodes(MatcherPtr, CGP);
     }
   
-  // Turn EmitNode->CompleteMatch into SelectNodeTo if we can.
+  // Turn EmitNode->CompleteMatch into MorphNodeTo if we can.
   if (EmitNodeMatcher *EN = dyn_cast<EmitNodeMatcher>(N))
     if (CompleteMatchMatcher *CM =
           dyn_cast<CompleteMatchMatcher>(EN->getNext())) {
-      // We can only use SelectNodeTo if the result values match up.
+      // We can only use MorphNodeTo if the result values match up.
       unsigned RootResultFirst = EN->getFirstResultSlot();
       bool ResultsMatch = true;
       for (unsigned i = 0, e = CM->getNumResults(); i != e; ++i)
@@ -78,7 +78,7 @@
           ResultsMatch = false;
       
       // If the selected node defines a subset of the flag/chain results, we
-      // can't use SelectNodeTo.  For example, we can't use SelectNodeTo if the
+      // can't use MorphNodeTo.  For example, we can't use MorphNodeTo if the
       // matched pattern has a chain but the root node doesn't.
       const PatternToMatch &Pattern = CM->getPattern();
       
@@ -87,7 +87,7 @@
         ResultsMatch = false;
 
       // If the matched node has a flag and the output root doesn't, we can't
-      // use SelectNodeTo.
+      // use MorphNodeTo.
       //
       // NOTE: Strictly speaking, we don't have to check for the flag here
       // because the code in the pattern generator doesn't handle it right.  We
@@ -109,20 +109,20 @@
       if (ResultsMatch) {
         const SmallVectorImpl<MVT::SimpleValueType> &VTs = EN->getVTList();
         const SmallVectorImpl<unsigned> &Operands = EN->getOperandList();
-        MatcherPtr.reset(new SelectNodeToMatcher(EN->getOpcodeName(),
-                                                 &VTs[0], VTs.size(),
-                                               Operands.data(), Operands.size(),
-                                                 EN->hasChain(), EN->hasFlag(),
-                                                 EN->hasMemRefs(),
-                                                 EN->getNumFixedArityOperands(),
-                                                 Pattern));
+        MatcherPtr.reset(new MorphNodeToMatcher(EN->getOpcodeName(),
+                                                &VTs[0], VTs.size(),
+                                                Operands.data(),Operands.size(),
+                                                EN->hasChain(), EN->hasFlag(),
+                                                EN->hasMemRefs(),
+                                                EN->getNumFixedArityOperands(),
+                                                Pattern));
         return;
       }
 
       // FIXME: Handle OPC_MarkFlagResults.
       
-      // FIXME2: Kill off all the SelectionDAG::SelectNodeTo and getMachineNode
-      // variants.  Call MorphNodeTo instead of SelectNodeTo.
+      // FIXME2: Kill off all the SelectionDAG::MorphNodeTo and getMachineNode
+      // variants.
     }
   
   ContractNodes(N->getNextPtr(), CGP);