MLIR 22.0.0git
SliceWalk.cpp File Reference

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.
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.

Function Documentation

◆ getBlockPredecessorOperands()

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()

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().