MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
mlir::RegionBranchPoint Class Reference

This class represents a point being branched from in the methods of the RegionBranchOpInterface. More...

#include "mlir/Interfaces/ControlFlowInterfaces.h"

Public Member Functions

 RegionBranchPoint (Region *region)
 Creates a RegionBranchPoint that branches from the given region. More...
 
 RegionBranchPoint (Region &region)
 
 RegionBranchPoint (std::nullptr_t)=delete
 Explicitly stops users from constructing with nullptr. More...
 
 RegionBranchPoint (RegionSuccessor successor)
 Constructs a RegionBranchPoint from the the target of a RegionSuccessor instance. More...
 
RegionBranchPointoperator= (Region &region)
 Assigns a region being branched from. More...
 
bool isParent () const
 Returns true if branching from the parent op. More...
 
RegiongetRegionOrNull () const
 Returns the region if branching from a region. More...
 

Static Public Member Functions

static constexpr RegionBranchPoint parent ()
 Returns an instance of RegionBranchPoint representing the parent operation. More...
 

Friends

bool operator== (RegionBranchPoint lhs, RegionBranchPoint rhs)
 Returns true if the two branch points are equal. More...
 

Detailed Description

This class represents a point being branched from in the methods of the RegionBranchOpInterface.

One can branch from one of two kinds of places:

Definition at line 198 of file ControlFlowInterfaces.h.

Constructor & Destructor Documentation

◆ RegionBranchPoint() [1/4]

mlir::RegionBranchPoint::RegionBranchPoint ( Region region)
inline

Creates a RegionBranchPoint that branches from the given region.

The pointer must not be null.

Definition at line 206 of file ControlFlowInterfaces.h.

◆ RegionBranchPoint() [2/4]

mlir::RegionBranchPoint::RegionBranchPoint ( Region region)
inline

Definition at line 210 of file ControlFlowInterfaces.h.

◆ RegionBranchPoint() [3/4]

mlir::RegionBranchPoint::RegionBranchPoint ( std::nullptr_t  )
delete

Explicitly stops users from constructing with nullptr.

◆ RegionBranchPoint() [4/4]

mlir::RegionBranchPoint::RegionBranchPoint ( RegionSuccessor  successor)
inline

Constructs a RegionBranchPoint from the the target of a RegionSuccessor instance.

Definition at line 217 of file ControlFlowInterfaces.h.

References mlir::RegionSuccessor::getSuccessor(), and mlir::RegionSuccessor::isParent().

Member Function Documentation

◆ getRegionOrNull()

Region* mlir::RegionBranchPoint::getRegionOrNull ( ) const
inline

Returns the region if branching from a region.

A null pointer otherwise.

Definition at line 235 of file ControlFlowInterfaces.h.

Referenced by printRegionEdgeName().

◆ isParent()

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

Returns true if branching from the parent op.

Definition at line 231 of file ControlFlowInterfaces.h.

◆ operator=()

RegionBranchPoint& mlir::RegionBranchPoint::operator= ( Region region)
inline

Assigns a region being branched from.

Definition at line 225 of file ControlFlowInterfaces.h.

◆ parent()

static constexpr RegionBranchPoint mlir::RegionBranchPoint::parent ( )
inlinestaticconstexpr

Returns an instance of RegionBranchPoint representing the parent operation.

Definition at line 202 of file ControlFlowInterfaces.h.

Referenced by collectUnderlyingAddressValues().

Friends And Related Function Documentation

◆ operator==

bool operator== ( RegionBranchPoint  lhs,
RegionBranchPoint  rhs 
)
friend

Returns true if the two branch points are equal.

Definition at line 238 of file ControlFlowInterfaces.h.


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