[GlobalISel] Delete code in GIMatcher complaining about unreachable rules.
authorAmara Emerson <amara@apple.com>
Thu, 1 Jun 2023 21:10:52 +0000 (14:10 -0700)
committerAmara Emerson <amara@apple.com>
Thu, 1 Jun 2023 21:26:57 +0000 (14:26 -0700)
Fixes #62897

llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp

index 6be0d6a..23697fd 100644 (file)
@@ -230,25 +230,6 @@ void GIMatchTreeBuilder::runStep() {
                dbgs() << "\n");
 #endif // ifndef NDEBUG
 
-  // Check for unreachable rules. Rules are unreachable if they are preceeded by
-  // a fully tested rule.
-  // Note: This is only true for the current algorithm, if we allow the
-  //       algorithm to compare equally valid rules then they will become
-  //       reachable.
-  {
-    auto FullyTestedLeafI = Leaves.end();
-    for (auto LeafI = Leaves.begin(), LeafE = Leaves.end();
-         LeafI != LeafE; ++LeafI) {
-      if (LeafI->isFullyTraversed() && LeafI->isFullyTested())
-        FullyTestedLeafI = LeafI;
-      else if (FullyTestedLeafI != Leaves.end()) {
-        PrintError("Leaf " + LeafI->getName() + " is unreachable");
-        PrintNote("Leaf " + FullyTestedLeafI->getName() +
-                  " will have already matched");
-      }
-    }
-  }
-
   LLVM_DEBUG(dbgs() << "  Eliminating redundant partitioners:\n");
   filterRedundantPartitioners();
   LLVM_DEBUG(dbgs() << "  Partitioners remaining:\n");