[all-commits] [llvm/llvm-project] 2fc71e: [mlir][Transforms][NFC] Dialect Conversion: Move a...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Aug 2 23:58:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2fc71e4e4b0c2eabd7c863f5cdfa6245c1d87c71
      https://github.com/llvm/llvm-project/commit/2fc71e4e4b0c2eabd7c863f5cdfa6245c1d87c71
  Author: Matthias Springer <me at m-sp.org>
  Date:   2024-08-03 (Sat, 03 Aug 2024)

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

  Log Message:
  -----------
  [mlir][Transforms][NFC] Dialect Conversion: Move argument materialization logic (#98805)

This commit moves the argument materialization logic from
`legalizeConvertedArgumentTypes` to
`legalizeUnresolvedMaterializations`.

Before this change:
- Argument materializations were created in
`legalizeConvertedArgumentTypes` (which used to call
`materializeLiveConversions`).

After this change:
- `legalizeConvertedArgumentTypes` creates a "placeholder"
`unrealized_conversion_cast`.
- The placeholder `unrealized_conversion_cast` is replaced with an
argument materialization (using the type converter) in
`legalizeUnresolvedMaterializations`.
- All argument and target materializations now take place in the same
location (`legalizeUnresolvedMaterializations`).

This commit brings us closer towards creating all source/target/argument
materializations in one central step, which can then be made optional
(and delegated to the user) in the future. (There is one more source
materialization step that has not been moved yet.)

This commit also consolidates all `build*UnresolvedMaterialization`
functions into a single `buildUnresolvedMaterialization` function.

This is a re-upload of #96329.



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