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

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Feb 16 07:14:36 PST 2024


  Branch: refs/heads/users/matthias-springer/signature_conversion
  Home:   https://github.com/llvm/llvm-project
  Commit: 5dc79f6af9ac00a61767062980b13eb4ae8d2571
      https://github.com/llvm/llvm-project/commit/5dc79f6af9ac00a61767062980b13eb4ae8d2571
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-02-16 (Fri, 16 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