[all-commits] [llvm/llvm-project] 852786: [mlir][Transforms] Dialect conversion: Unify mater...

Matthias Springer via All-commits all-commits at lists.llvm.org
Sat Sep 21 01:02:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8527861179ac7771bae09e2fcb0eece4b589d747
      https://github.com/llvm/llvm-project/commit/8527861179ac7771bae09e2fcb0eece4b589d747
  Author: Matthias Springer <me at m-sp.org>
  Date:   2024-09-21 (Sat, 21 Sep 2024)

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

  Log Message:
  -----------
  [mlir][Transforms] Dialect conversion: Unify materialization of value replacements (#108381)

PR #106760 aligned the handling of dropped block arguments and dropped
op results. The two helper functions that insert source materializations
for uses of replaced block arguments / op results that survived the
conversion are now almost identical (`legalizeConvertedArgumentTypes`
and `legalizeConvertedOpResultTypes`). This PR merges the two functions
and moves the implementation directly into `finalize`.

This PR simplifies the code base and improves the efficiency a bit:
previously, `finalize` iterated over
`ConversionPatternRewriterImpl::rewrites` twice. Now, only one iteration
is needed.

---------

Co-authored-by: Jakub Kuderski <jakub at nod-labs.com>



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