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

Matthias Springer via All-commits all-commits at lists.llvm.org
Mon Feb 19 05:09:19 PST 2024


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