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

Jian Cai llvmlistbot at llvm.org
Wed Sep 20 20:56:06 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:

Yes, this is based on that. That patch got reverted and then relanded as https://reviews.llvm.org/rGd22965f0d623392fdf87e5a09a0276aa70e8dfed.

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


More information about the Mlir-commits mailing list