|
MLIR 23.0.0git
|
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. | |
| Operation * | replaceWithNewResults (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. | |
| Operation * mlir::memoryslot::replaceWithNewResults | ( | 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.
Definition at line 28 of file MemorySlotUtils.cpp.
References mlir::OperationState::addRegion(), mlir::OpBuilder::create(), mlir::RewriterBase::eraseOp(), mlir::RewriterBase::finalizeOpModification(), mlir::Operation::getAttrs(), mlir::Operation::getLoc(), mlir::Operation::getName(), mlir::Operation::getNumRegions(), mlir::Operation::getNumResults(), mlir::Operation::getOperands(), mlir::Operation::getPropertiesAsAttribute(), mlir::Operation::getRegion(), mlir::Operation::getResults(), mlir::OperationState::propertiesAttr, mlir::RewriterBase::replaceAllOpUsesWith(), mlir::OpBuilder::setInsertionPoint(), mlir::RewriterBase::startOpModification(), and mlir::Region::takeBody().
| 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().