Lines Matching defs:block
100 Block *block) {
101 // In most cases we care about the block where the value is defined.
102 if (block == nullptr)
103 block = memref.getParentBlock();
106 ownershipMap[{memref, block}].combine(ownership);
109 void DeallocationState::resetOwnerships(ValueRange memrefs, Block *block) {
111 ownershipMap[{val, block}] = Ownership::getUninitialized();
114 Ownership DeallocationState::getOwnership(Value memref, Block *block) const {
115 return ownershipMap.lookup({memref, block});
118 void DeallocationState::addMemrefToDeallocate(Value memref, Block *block) {
119 memrefsToDeallocatePerBlock[block].push_back(memref);
122 void DeallocationState::dropMemrefToDeallocate(Value memref, Block *block) {
123 llvm::erase(memrefsToDeallocatePerBlock[block], memref);
126 void DeallocationState::getLiveMemrefsIn(Block *block,
129 llvm::make_filter_range(liveness.getLiveIn(block), isMemref));
136 Value memref, Block *block) {
137 auto iter = ownershipMap.find({memref, block});
146 // operation earlier in the block and use the updated ownerships returned by
186 OpBuilder &builder, Location loc, Block *block,
190 llvm::enumerate(memrefsToDeallocatePerBlock.lookup(block))) {
191 Ownership ownership = ownershipMap.lookup({memref, block});
289 Block *block = op->getBlock();
292 builder, op->getLoc(), block, memrefs, conditions)))
295 state.getMemrefsToRetain(block, /*toBlock=*/nullptr, operands, toRetain);
304 state.resetOwnerships(deallocOp.getRetained(), block);
307 state.updateOwnership(retained, ownership, block);