[all-commits] [llvm/llvm-project] a7fffc: [mlir][Transforms][NFC] Simplify `ArgConverter` state

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


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

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

  Log Message:
  -----------
  [mlir][Transforms][NFC] Simplify `ArgConverter` state

* When converting a block signature, `ArgConverter` creates a new block with the new signature and moves all operation from the old block to the new block. The new block is temporarily inserted into a region that is stored in `regionMapping`. The old block is not yet deleted, so that the conversion can be rolled back. `regionMapping` is not needed. Instead of moving the old block to a temporary region, it can just be unlinked. Block erasures are handles in the same way in the dialect conversion.
* `regionToConverter` is a mapping from regions to type converter. That field is never accessed within `ArgConverter`. It should be stored in `ConversionPatternRewriterImpl` instead.



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