Lines Matching +defs:region +defs:end
22 /// Return the context this region is inserted in. The region must have a valid
25 assert(container && "region is not attached to a container");
29 /// Return a location for this region. This is the location attached to the
30 /// parent container. The region must have a valid parent container.
32 assert(container && "region is not attached to a container");
46 assert(container && "region is not attached to a container");
61 /// Return the number of this region in the parent operation.
68 /// Clone the internal blocks from this region into `dest`. Any
71 assert(dest && "expected valid region to clone into");
72 cloneInto(dest, dest->end(), mapper);
75 /// Clone this region into 'dest' before the given position in 'dest'.
78 assert(dest && "expected valid region to clone into");
79 assert(this != dest && "cannot clone region into itself");
87 // of the blocks or operation results contained within this region as that
89 // 'Value's from outside the region however, in which case it is not read
118 // Cloning the operands and region as well would lead to uses of operations
151 /// Returns 'block' if 'block' lies in this region, or otherwise finds the
152 /// ancestor of 'block' that lies in this region. Returns nullptr if the latter
165 /// Returns 'op' if 'op' lies in this region, or otherwise finds the
166 /// ancestor of 'op' that lies in this region. Returns nullptr if the
193 /// This is a trait method invoked when a basic block is added to a region.
194 /// We keep the region pointer up to date.
196 assert(!block->getParent() && "already in a region!");
201 /// region. We keep the region pointer up to date.
203 assert(block->getParent() && "not already in a region!");
226 Region::OpIterator::OpIterator(Region *region, bool end)
227 : region(region), block(end ? region->end() : region->begin()) {
228 if (!region->empty())
235 if (operation != block->end())
237 if (operation == block->end()) {
245 while (block != region->end() && block->empty())
249 // next block (sentinel value used for end).
250 if (block == region->end())
270 if (auto *region = llvm::dyn_cast_if_present<const std::unique_ptr<Region> *>(owner))
271 return region + index;
272 if (auto **region = llvm::dyn_cast_if_present<Region **>(owner))
273 return region + index;
279 if (auto *region = llvm::dyn_cast_if_present<const std::unique_ptr<Region> *>(owner))
280 return region[index].get();
281 if (auto **region = llvm::dyn_cast_if_present<Region **>(owner))
282 return region[index];