/* Find dominator relationships. Assumes graph has been leveled.  */
static void find_dom(opt_state_t *opt_state, struct block *root)
/* Find dominator relationships. Assumes graph has been leveled.  */
static void find_dom(opt_state_t *opt_state, struct block *root)
{
	int i;
	struct block *b;
	bpf_u_int32 *x;
	x = opt_state->all_dom_sets;
	i = opt_state->n_blocks * opt_state->nodewords;
	while (--i >= 0)
		*x++ = 0xFFFFFFFFU;
	for (i = opt_state->nodewords; --i >= 0;)
		root->dom[i] = 0;
	for (i = root->level; i >= 0; --i) {
		for (b = opt_state->levels[i]; b; b = b->link) {
			SET_INSERT(b->dom, b->id);
			if (JT(b) == 0)
				continue;
			SET_INTERSECT(JT(b)->dom, b->dom, opt_state->nodewords);
			SET_INTERSECT(JF(b)->dom, b->dom, opt_state->nodewords);
		}
	}
}