rename PushMatcherNode -> ScopeMatcherNode to more accurately
reflect what it does.  Switch the sense of the Next and the Check
arms to be more logical.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97093 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp
index 796b815..623d870 100644
--- a/utils/TableGen/DAGISelMatcherOpt.cpp
+++ b/utils/TableGen/DAGISelMatcherOpt.cpp
@@ -14,14 +14,14 @@
 #include "DAGISelMatcher.h"
 using namespace llvm;
 
-static void ContractNodes(OwningPtr<MatcherNode> &Matcher) {
+static void ContractNodes(OwningPtr<MatcherNode> &MatcherPtr) {
   // If we reached the end of the chain, we're done.
-  MatcherNode *N = Matcher.get();
+  MatcherNode *N = MatcherPtr.get();
   if (N == 0) return;
   
-  // If we have a push node, walk down both edges.
-  if (PushMatcherNode *Push = dyn_cast<PushMatcherNode>(N))
-    ContractNodes(Push->getFailurePtr());
+  // If we have a scope node, walk down both edges.
+  if (ScopeMatcherNode *Push = dyn_cast<ScopeMatcherNode>(N))
+    ContractNodes(Push->getCheckPtr());
   
   // If we found a movechild node with a node that comes in a 'foochild' form,
   // transform it.
@@ -35,25 +35,24 @@
     
     if (New) {
       // Insert the new node.
-      New->setNext(Matcher.take());
-      Matcher.reset(New);
+      New->setNext(MatcherPtr.take());
+      MatcherPtr.reset(New);
       // Remove the old one.
       MC->setNext(MC->getNext()->takeNext());
-      return ContractNodes(Matcher);
+      return ContractNodes(MatcherPtr);
     }
   }
   
   if (MoveChildMatcherNode *MC = dyn_cast<MoveChildMatcherNode>(N))
     if (MoveParentMatcherNode *MP = 
           dyn_cast<MoveParentMatcherNode>(MC->getNext())) {
-      Matcher.reset(MP->takeNext());
-      return ContractNodes(Matcher);
+      MatcherPtr.reset(MP->takeNext());
+      return ContractNodes(MatcherPtr);
     }
   
   ContractNodes(N->getNextPtr());
 }
 
-
 MatcherNode *llvm::OptimizeMatcher(MatcherNode *Matcher) {
   OwningPtr<MatcherNode> MatcherPtr(Matcher);
   ContractNodes(MatcherPtr);