MLIR 23.0.0git
mlir::memoryslot Namespace Reference

Functions

void updateTerminator (Block *block, Value defaultReachingDef, const DenseMap< Block *, Value > &reachingAtBlockEnd)
 Appends the reaching definition for the given block as an operand to its terminator.
OperationreplaceWithNewResults (RewriterBase &rewriter, Operation *op, TypeRange resultTypes)
 Creates a shallow copy of an operation with new result types, moving the regions out of the original operation and deleting the original operation.

Function Documentation

◆ replaceWithNewResults()

◆ updateTerminator()

void mlir::memoryslot::updateTerminator ( Block * block,
Value defaultReachingDef,
const DenseMap< Block *, Value > & reachingAtBlockEnd )

Appends the reaching definition for the given block as an operand to its terminator.

If the block has no entry in reachingAtBlockEnd (e.g. dead code or the region does not use the slot), defaultReachingDef is used.

Definition at line 18 of file MemorySlotUtils.cpp.

References mlir::Operation::getNumOperands(), mlir::Block::getTerminator(), and mlir::Operation::insertOperands().