[all-commits] [llvm/llvm-project] ac09b7: [mlir][scf] Remove redundant ensureTerminator for ...

Longsheng Mou via All-commits all-commits at lists.llvm.org
Thu Mar 27 05:07:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac09b789d8add7325fbf95d0feeb03a29de79b5c
      https://github.com/llvm/llvm-project/commit/ac09b789d8add7325fbf95d0feeb03a29de79b5c
  Author: Longsheng Mou <longshengmou at gmail.com>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/SCF/IR/SCFOps.td
    M mlir/lib/Dialect/SCF/IR/SCF.cpp
    M mlir/test/Dialect/SCF/invalid.mlir

  Log Message:
  -----------
  [mlir][scf] Remove redundant ensureTerminator for `scf.forall` (#133081)

The override function `ensureTerminator` ensures that the terminator
`InParallelOp` has a region. However, if the terminator of `scf.forall`
is not an `InParallelOp`, calling ensureTerminator causes a crash. Since
the InParallelOp builder already guarantees the existence of a region,
`ForallOp::ensureTerminator` is redundant and can be safely removed.
Fixes #130019.



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