MLIR 22.0.0git
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 (RegionBranchTerminatorOpInterface predecessor)
 Creates a RegionBranchPoint that branches from the given terminator.
 RegionBranchPoint (std::nullptr_t)=delete
 Explicitly stops users from constructing with nullptr.
bool isParent () const
 Returns true if branching from the parent op.
OperationgetTerminatorPredecessorOrNull () const
 Returns the terminator if branching from a region.

Static Public Member Functions

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

Friends

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

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:

  • The parent operation (aka the RegionBranchOpInterface implementation)
  • A RegionBranchTerminatorOpInterface inside a region within the parent

Definition at line 237 of file ControlFlowInterfaces.h.

Constructor & Destructor Documentation

◆ RegionBranchPoint() [1/2]

mlir::RegionBranchPoint::RegionBranchPoint ( RegionBranchTerminatorOpInterface predecessor)
inline

Creates a RegionBranchPoint that branches from the given terminator.

Definition at line 373 of file ControlFlowInterfaces.h.

Referenced by operator==, and parent().

◆ RegionBranchPoint() [2/2]

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

Explicitly stops users from constructing with nullptr.

Member Function Documentation

◆ getTerminatorPredecessorOrNull()

Operation * mlir::RegionBranchPoint::getTerminatorPredecessorOrNull ( ) const
inline

Returns the terminator if branching from a region.

A null pointer otherwise.

Definition at line 254 of file ControlFlowInterfaces.h.

Referenced by mlir::operator<<(), and printRegionEdgeName().

◆ isParent()

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

Returns true if branching from the parent op.

Definition at line 250 of file ControlFlowInterfaces.h.

Referenced by mlir::operator<<().

◆ parent()

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

◆ operator==

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

Returns true if the two branch points are equal.

Definition at line 257 of file ControlFlowInterfaces.h.

References lhs, RegionBranchPoint(), and rhs.


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