[all-commits] [llvm/llvm-project] fd7eee: scf::ForOp: Fold away iterator arguments with no u...

lorenzo chelini via All-commits all-commits at lists.llvm.org
Tue Mar 16 00:02:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd7eee64c570e5e14e511045c64d4d8cf98dde25
      https://github.com/llvm/llvm-project/commit/fd7eee64c570e5e14e511045c64d4d8cf98dde25
  Author: Lorenzo Chelini <l.chelini at tue.nl>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M mlir/lib/Dialect/SCF/SCF.cpp
    M mlir/test/Dialect/SCF/canonicalize.mlir

  Log Message:
  -----------
  scf::ForOp: Fold away iterator arguments with no use and for which the corresponding input is yielded

Enhance 'ForOpIterArgsFolder' to remove unused iteration arguments in a
scf::ForOp. If the block argument corresponding to the given iterator has no
use and the yielded value equals the input, we fold it away.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D98503




More information about the All-commits mailing list