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

Jacques Pienaar llvmlistbot at llvm.org
Wed Sep 20 18:07:30 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() &&
----------------
jpienaar wrote:

I think this is using the wrong one as base, wasn't https://reviews.llvm.org/D157032 the base for this?

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


More information about the Mlir-commits mailing list