[all-commits] [llvm/llvm-project] 042533: [mlir] Added new RegionBranchTerminatorOpInterface...

Marcel Koester via All-commits all-commits at lists.llvm.org
Sun Jul 25 21:50:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0425332015f479a89226c684c33659aa9cfff4b5
      https://github.com/llvm/llvm-project/commit/0425332015f479a89226c684c33659aa9cfff4b5
  Author: Marcel Koester <marcel.koester at dfki.de>
  Date:   2021-07-26 (Mon, 26 Jul 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/SCF/SCFOps.td
    M mlir/include/mlir/Interfaces/ControlFlowInterfaces.h
    M mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
    M mlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
    M mlir/lib/Analysis/BufferViewFlowAnalysis.cpp
    M mlir/lib/Analysis/DataFlowAnalysis.cpp
    M mlir/lib/Dialect/SCF/SCF.cpp
    M mlir/lib/Interfaces/ControlFlowInterfaces.cpp
    M mlir/lib/Transforms/BufferDeallocation.cpp
    M mlir/lib/Transforms/BufferOptimizations.cpp
    M mlir/test/Dialect/SCF/invalid.mlir
    M mlir/test/Transforms/sccp-structured.mlir

  Log Message:
  -----------
  [mlir] Added new RegionBranchTerminatorOpInterface and adapted uses of hasTrait<ReturnLike>.

This CL adds a new RegionBranchTerminatorOpInterface to query information about operands that can be
passed to successor regions. Similar to the BranchOpInterface, it allows to freely define the
involved operands. However, in contrast to the BranchOpInterface, it expects an additional region
number to distinguish between various use cases which might require different operands passed to
different regions.

Moreover, we added new utility functions (namely getMutableRegionBranchSuccessorOperands and
getRegionBranchSuccessorOperands) to query (mutable) operand ranges for operations equiped with the
ReturnLike trait and/or implementing the newly added interface.  This simplifies reasoning about
terminators in the scope of the nested regions.

We also adjusted the SCF.ConditionOp to benefit from the newly added capabilities.

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




More information about the All-commits mailing list