[all-commits] [llvm/llvm-project] 8d0a02: [mlir] Add InsertionGuards to OneToNPatternRewriter.

Ingo Müller via All-commits all-commits at lists.llvm.org
Fri Jul 7 02:16:16 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d0a02cbc89eb9016062ecfa5abe88be45570cbb
  Author: Ingo Müller <ingomueller at google.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M mlir/lib/Transforms/Utils/OneToNTypeConversion.cpp

  Log Message:
  [mlir] Add InsertionGuards to OneToNPatternRewriter.

This fixes bad behavior of that class that surfaced in
https://reviews.llvm.org/D154299, where calling applySignatureConversion
left the insertion point different from before the call, which broke a
subsequent call to replaceOp. This patch introduces a fix in both
functions, each of which is enough to fix the specific problem in the
aforementioned diff: (1) applySignatureConversion now resets the
insertion point with a guard for the whole function and (2) replace sets
the insertion point to the op that should be replaced (and resets it
with a guard).

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D154684

More information about the All-commits mailing list