[Mlir-commits] [mlir] [mlir] Move supplemental patterns before op replacement (PR #66959)

Jian Cai llvmlistbot at llvm.org
Thu Sep 21 15:35:33 PDT 2023


================
@@ -1172,9 +1172,22 @@ void PatternEmitter::emitRewriteLogic() {
       os << val << ";\n";
   }
 
+  auto processSupplementalPatterns = [&]() {
+    int numSupplementalPatterns = pattern.getNumSupplementalPatterns();
+    for (int i = 0, offset = -numSupplementalPatterns;
+         i < numSupplementalPatterns; ++i) {
+      DagNode resultTree = pattern.getSupplementalPattern(i);
+      auto val = handleResultPattern(resultTree, offset++, 0);
+      if (resultTree.isNativeCodeCall() &&
----------------
jcai19 wrote:

No worries! Thanks for the confirmation!

https://github.com/llvm/llvm-project/pull/66959


More information about the Mlir-commits mailing list