[all-commits] [llvm/llvm-project] 445908: [mlir][Transforms] Dialect conversion: Improve sig...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Feb 21 08:34:22 PST 2024


  Branch: refs/heads/users/matthias-springer/signature_conversion
  Home:   https://github.com/llvm/llvm-project
  Commit: 445908fcf9e5523ee084dd8aeceab2e798ed30c5
      https://github.com/llvm/llvm-project/commit/445908fcf9e5523ee084dd8aeceab2e798ed30c5
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

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

  Log Message:
  -----------
  [mlir][Transforms] Dialect conversion: Improve signature conversion API

This commit improves the block signature conversion API of the dialect conversion.

There is the following comment in `ArgConverter::applySignatureConversion`:
```
// If no arguments are being changed or added, there is nothing to do.
```

However, the implementation actually used to replace a block with a new block even if the block argument types do not change (i.e., there is "nothing to do"). This is fixed in this commit. The documentation of the public `ConversionPatternRewriter` API is updated accordingly.

This commit also removes a check that used to *sometimes* skip a block signature conversion if the block was already converted. This is not consistent with the public `ConversionPatternRewriter` API; block should always be converted, regardless of whether they were already converted or not.

Block signature conversion also used to be silently skipped when the specified block was detached. Instead of silently skipping, an assertion is triggered. Attempting to convert a detached block (which is likely an erased block) is invalid API usage.



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