MLIR  20.0.0git
Functions
SliceWalk.cpp File Reference
#include "mlir/Analysis/SliceWalk.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"

Go to the source code of this file.

Functions

static SmallVector< ValuegetRegionPredecessorOperands (RegionBranchOpInterface regionOp, RegionSuccessor successor, unsigned operandNumber)
 Returns the operands from all predecessor regions that match operandNumber for the successor region within regionOp. More...
 
static std::optional< SmallVector< Value > > getBlockPredecessorOperands (BlockArgument blockArg)
 Returns the predecessor branch operands that match blockArg, or nullopt if some of the predecessor terminators do not implement the BranchOpInterface. More...
 

Function Documentation

◆ getBlockPredecessorOperands()

static std::optional<SmallVector<Value> > getBlockPredecessorOperands ( BlockArgument  blockArg)
static

Returns the predecessor branch operands that match blockArg, or nullopt if some of the predecessor terminators do not implement the BranchOpInterface.

Definition at line 84 of file SliceWalk.cpp.

References mlir::BlockArgument::getArgNumber(), mlir::BlockArgument::getOwner(), mlir::Block::getTerminator(), mlir::Block::pred_begin(), and mlir::Block::pred_end().

Referenced by mlir::getControlFlowPredecessors().

◆ getRegionPredecessorOperands()

static SmallVector<Value> getRegionPredecessorOperands ( RegionBranchOpInterface  regionOp,
RegionSuccessor  successor,
unsigned  operandNumber 
)
static

Returns the operands from all predecessor regions that match operandNumber for the successor region within regionOp.

Definition at line 38 of file SliceWalk.cpp.

References mlir::RegionSuccessor::getSuccessor().

Referenced by mlir::getControlFlowPredecessors().