[Mlir-commits] [mlir] [mlir][Transforms] Dialect Conversion: Simplify block conversion API (PR #94866)
Markus Böck
llvmlistbot at llvm.org
Sat Jun 8 13:20:56 PDT 2024
================
@@ -661,42 +662,38 @@ class ConversionPatternRewriter final : public PatternRewriter {
public:
~ConversionPatternRewriter() override;
- /// Apply a signature conversion to the entry block of the given region. This
- /// replaces the entry block with a new block containing the updated
- /// signature. The new entry block to the region is returned for convenience.
+ /// Apply a signature conversion to given block. This replaces the block with
+ /// a new block containing the updated signature. The operations of the given
+ /// block are inlined into the newly-created block, which is returned.
+ ///
/// If no block argument types are changing, the entry original block will be
/// left in place and returned.
///
- /// If provided, `converter` will be used for any materializations.
+ /// A signature converison must be provided. (Type converters can construct
+ /// signature conversion with `convertBlockSignature`.) Optionally, a type
+ /// converter can be provided to build materializations.
----------------
zero9178 wrote:
Aren't materializations often required for correctness? If yes, I think it'd be worth documenting in what scenarios the type converter is not optional for correctness and if this is a common occurrence, maybe even make it a mandatory parameter.
https://github.com/llvm/llvm-project/pull/94866
More information about the Mlir-commits
mailing list