[all-commits] [llvm/llvm-project] ed5743: [mlir][Transforms] Fix compile time regression in ...

Matthias Springer via All-commits all-commits at lists.llvm.org
Mon Feb 26 07:56:47 PST 2024


  Branch: refs/heads/users/matthias-springer/dialect_conv_perf_regression
  Home:   https://github.com/llvm/llvm-project
  Commit: ed57433cfd3d151c7c4e57d5712aa21ea6a9373d
      https://github.com/llvm/llvm-project/commit/ed57433cfd3d151c7c4e57d5712aa21ea6a9373d
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-02-26 (Mon, 26 Feb 2024)

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

  Log Message:
  -----------
  [mlir][Transforms] Fix compile time regression in dialect conversion

The dialect conversion does not directly erase ops that are replaced/erased with a rewriter. Instead, the op stays in place and is erased at the end if the dialect conversion succeeds. However, ops that were replaced/erased are ignored from that point on.

#81757 introduced a compile time regression that made the check whether an op is ignored or not more expensive. Whether an op is ignored or not is queried many times throughout a dialect conversion, so the check must be fast.

After this change, replaced ops are stored in the `ignoredOps` set. This also simplifies the dialect conversion a bit.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list