Lines Matching defs:block

54 /// DomTree will be null for single-block regions.  This lazily constructs the
64 // This method builds on knowledge that multi-block regions always have
65 // SSADominance. Graph regions are only allowed to be single-block regions,
66 // but of course single-block regions may also have SSA dominance.
78 // Nope, lazily construct it. Create a DomTree if this is a multi-block
88 // Single block regions have a more complicated predicate.
102 /// Return the ancestor block enclosing the specified block. This returns null
104 static Block *getAncestorBlock(Block *block) {
105 if (Operation *ancestorOp = block->getParentOp())
110 /// Walks up the list of containers of the given block and calls the
111 /// user-defined traversal function for every pair of a region and block that
113 /// for a given pair, traverseAncestors will return the current block. Nullptr
116 static Block *traverseAncestors(Block *block, const FuncT &func) {
118 // Invoke the user-defined traversal function for each block.
119 if (func(block))
120 return block;
121 } while ((block = getAncestorBlock(block)));
125 /// Tries to update the given block references to live in the same region by
128 // If both block do not live in the same region, we will have to check their
139 if (Block *aResult = traverseAncestors(a, [&](Block *block) {
141 return block->getParent() == bRegion;
151 if (Block *bResult = traverseAncestors(b, [&](Block *block) {
153 return block->getParent() == aRegion;
198 // If they are the same block, then we are done.
206 // If the common ancestor in a common region is the same block, then return
216 /// Returns the given block iterator if it lies within the region region.
217 /// Otherwise, otherwise finds the ancestor of the given block iterator that
222 /// block iterators instead of ops.
239 /// Given two iterators into the same block, return "true" if `a` is before `b.
241 /// block iterators instead of ops.
242 static bool isBeforeInBlock(Block *block, Block::iterator a,
246 if (a == block->end())
248 if (b == block->end())
259 // A block iterator (post)dominates, but does not properly (post)dominate,
279 assert(bBlock->getParent() == aRegion && "expected block in regionA");
289 // dominance, uses inside the same block must follow defs. In other
290 // regions kinds, uses and defs can come in any order inside a block.
304 /// Return true if the specified block is reachable from the entry block of
308 // If this is the first block in its region, then it is obviously reachable.
313 // Otherwise this is some block in a multi-block region. Check DomTree.
340 // block arguments properly dominate all operations in their own block, so