[all-commits] [llvm/llvm-project] 34f124: [mlir][toy] Use `make_early_inc_range` when erasin...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Jul 3 07:37:20 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34f124b06ffd3a4e5befafe3cf5daf7753f415ff
      https://github.com/llvm/llvm-project/commit/34f124b06ffd3a4e5befafe3cf5daf7753f415ff
  Author: Matthias Springer <me at m-sp.org>
  Date:   2025-07-03 (Thu, 03 Jul 2025)

  Changed paths:
    M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp

  Log Message:
  -----------
  [mlir][toy] Use `make_early_inc_range` when erasing ops during iteration (#146892)

Use `make_early_inc_range` when erasing operations from a block to make
sure that the iterator is not invalidated. The previous implementation
happened to work on a "normal" dialect conversion because some IR
modifications are delayed. It no longer works with a One-Shot Dialect
Conversion. The new One-Shot Dialect Conversion API is more similar to
the normal rewriter API.



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