MLIR  20.0.0git
Public Member Functions | List of all members
mlir::RegionSuccessor Class Reference

This class represents a successor of a region. More...

#include "mlir/Interfaces/ControlFlowInterfaces.h"

Public Member Functions

 RegionSuccessor (Region *region, Block::BlockArgListType regionInputs={})
 Initialize a successor that branches to another region of the parent operation. More...
 
 RegionSuccessor (Operation::result_range results)
 Initialize a successor that branches back to/out of the parent operation. More...
 
 RegionSuccessor ()
 Constructor with no arguments. More...
 
RegiongetSuccessor () const
 Return the given region successor. More...
 
bool isParent () const
 Return true if the successor is the parent operation. More...
 
ValueRange getSuccessorInputs () const
 Return the inputs to the successor that are remapped by the exit values of the current region. More...
 

Detailed Description

This class represents a successor of a region.

A region successor can either be another region, or the parent operation. If the successor is a region, this class represents the destination region, as well as a set of arguments from that region that will be populated when control flows into the region. If the successor is the parent operation, this class represents an optional set of results that will be populated when control returns to the parent operation.

This interface assumes that the values from the current region that are used to populate the successor inputs are the operands of the return-like terminator operations in the blocks within this region.

Definition at line 165 of file ControlFlowInterfaces.h.

Constructor & Destructor Documentation

◆ RegionSuccessor() [1/3]

mlir::RegionSuccessor::RegionSuccessor ( Region region,
Block::BlockArgListType  regionInputs = {} 
)
inline

Initialize a successor that branches to another region of the parent operation.

Definition at line 169 of file ControlFlowInterfaces.h.

◆ RegionSuccessor() [2/3]

mlir::RegionSuccessor::RegionSuccessor ( Operation::result_range  results)
inline

Initialize a successor that branches back to/out of the parent operation.

Definition at line 172 of file ControlFlowInterfaces.h.

◆ RegionSuccessor() [3/3]

mlir::RegionSuccessor::RegionSuccessor ( )
inline

Constructor with no arguments.

Definition at line 175 of file ControlFlowInterfaces.h.

Member Function Documentation

◆ getSuccessor()

Region* mlir::RegionSuccessor::getSuccessor ( ) const
inline

Return the given region successor.

Returns nullptr if the successor is the parent operation.

Definition at line 179 of file ControlFlowInterfaces.h.

Referenced by getRegionPredecessorOperands(), and mlir::RegionBranchPoint::RegionBranchPoint().

◆ getSuccessorInputs()

ValueRange mlir::RegionSuccessor::getSuccessorInputs ( ) const
inline

Return the inputs to the successor that are remapped by the exit values of the current region.

Definition at line 186 of file ControlFlowInterfaces.h.

◆ isParent()

bool mlir::RegionSuccessor::isParent ( ) const
inline

Return true if the successor is the parent operation.

Definition at line 182 of file ControlFlowInterfaces.h.

Referenced by mlir::RegionBranchPoint::RegionBranchPoint().


The documentation for this class was generated from the following file: