[llvm] [TableGen] New tblgen Pattern bit to disable DAGISel pattern imports (PR #88382)
    Pierre van Houtryve via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Apr 19 05:03:38 PDT 2024
    
    
  
================
@@ -1901,7 +1901,12 @@ std::optional<CodeGenSubRegIndex *> GlobalISelEmitter::inferSubRegIndexForNode(
   return CGRegs.getSubRegIdx(SubRegInit->getDef());
 }
 
-Expected<RuleMatcher> GlobalISelEmitter::runOnPattern(const PatternToMatch &P) {
+std::optional<Expected<RuleMatcher>>
+GlobalISelEmitter::runOnPattern(const PatternToMatch &P) {
+  if (P.getISelShouldIgnore()) {
+    return {};
+  }
----------------
Pierre-vh wrote:
You can just check this in `run` before calling `runOnPattern`, then you don't need to change `runOnPattern` signature at all.
https://github.com/llvm/llvm-project/pull/88382
    
    
More information about the llvm-commits
mailing list