[llvm] 7f374b6 - [GlobalISel] Delete code in GIMatcher complaining about unreachable rules.

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:27:06 PDT 2023


Author: Amara Emerson
Date: 2023-06-01T14:26:57-07:00
New Revision: 7f374b6902fad9caed41284a57d573abe9ada9d1

URL: https://github.com/llvm/llvm-project/commit/7f374b6902fad9caed41284a57d573abe9ada9d1
DIFF: https://github.com/llvm/llvm-project/commit/7f374b6902fad9caed41284a57d573abe9ada9d1.diff

LOG: [GlobalISel] Delete code in GIMatcher complaining about unreachable rules.

Fixes #62897

Added: 
    

Modified: 
    llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp b/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
index 6be0d6ae2fe17..23697fd9e2e25 100644
--- a/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
+++ b/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
@@ -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");


        


More information about the llvm-commits mailing list