intel/brw: Add a idom_tree::dominates(a, b) helper.
Simpler to use than the existing methods. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29624>
This commit is contained in:
@@ -511,6 +511,21 @@ namespace brw {
|
||||
bblock_t *
|
||||
intersect(bblock_t *b1, bblock_t *b2) const;
|
||||
|
||||
/**
|
||||
* Returns true if block `a` dominates block `b`.
|
||||
*/
|
||||
bool
|
||||
dominates(const bblock_t *a, const bblock_t *b) const
|
||||
{
|
||||
while (a != b) {
|
||||
if (b->num == 0)
|
||||
return false;
|
||||
|
||||
b = parent(b);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
dump() const;
|
||||
|
||||
|
Reference in New Issue
Block a user