[all-commits] [llvm/llvm-project] 9c16ee: [mlir][IR] Add ReverseDominanceIterator for IR wal...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Mar 22 01:02:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c16eef1ec46e10185713043663511d49ffff6b1
      https://github.com/llvm/llvm-project/commit/9c16eef1ec46e10185713043663511d49ffff6b1
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-03-22 (Wed, 22 Mar 2023)

  Changed paths:
    M mlir/include/mlir/IR/Iterators.h
    M mlir/test/IR/visitors.mlir
    M mlir/test/lib/IR/TestVisitors.cpp

  Log Message:
  -----------
  [mlir][IR] Add ReverseDominanceIterator for IR walkers

Blocks are enumerated depth-first, but post-order. I.e., a block is enumerated when its successors have been enumerated. This iteration style is suitable when deleting blocks in a regions: in the absence of cycles, uses are deleted before their definitions.

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




More information about the All-commits mailing list