[all-commits] [llvm/llvm-project] d33c3c: [mlir][Transforms] Make `ConversionPatternRewriter...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Feb 23 01:16:28 PST 2024


  Branch: refs/heads/users/matthias-springer/private_conversion_pattern_rewriter
  Home:   https://github.com/llvm/llvm-project
  Commit: d33c3cf51633cfc4ae2dde77db819ce5a953d162
      https://github.com/llvm/llvm-project/commit/d33c3cf51633cfc4ae2dde77db819ce5a953d162
  Author: Matthias Springer <springerm at google.com>
  Date:   2024-02-23 (Fri, 23 Feb 2024)

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

  Log Message:
  -----------
  [mlir][Transforms] Make `ConversionPatternRewriter` constructor private

`ConversionPatternRewriter` objects should not be constructed outside of dialect conversions. Some IR modifications performed through a `ConversionPatternRewriter` are reflected in the IR in a delayed fashion (e.g., only when the dialect conversion is guaranteed to succeed). Using a `ConversionPatternRewriter` outside of the dialect conversion is incorrect API usage and can bring the IR in an inconsistent state.

Migration guide: Use `IRRewriter` instead of `ConversionPatternRewriter`.



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