Created
May 19, 2017 15:15
-
-
Save dberlin/78a85e87ee844b1ced334499280ab502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void | |
compute_dominance_frontiers_1 (bitmap_head *frontiers) | |
{ | |
edge p; | |
edge_iterator ei; | |
basic_block b; | |
FOR_EACH_BB_FN (b, cfun) | |
{ | |
if (EDGE_COUNT (b->preds) >= 2) | |
{ | |
FOR_EACH_EDGE (p, ei, b->preds) | |
{ | |
basic_block runner = p->src; | |
basic_block domsb; | |
if (runner == ENTRY_BLOCK_PTR_FOR_FN (cfun)) | |
continue; | |
domsb = get_immediate_dominator (CDI_DOMINATORS, b); | |
while (runner != domsb) | |
{ | |
if (!bitmap_set_bit (&frontiers[runner->index], | |
b->index)) | |
break; | |
runner = get_immediate_dominator (CDI_DOMINATORS, | |
runner); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment