MCPcopy Create free account
hub / github.com/Inori/GPCS4 / dominates

Method dominates

GPCS4/Graphics/Gcn/ControlFlowGraph/GcnDominatorTree.cpp:22–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 }
21
22 bool GcnDominatorTree::dominates(GcnCfgVertex u, GcnCfgVertex v) const
23 {
24 bool result = false;
25
26 // Post traverse the dom tree from v to entry,
27 // if we can find a node equal to u, then u dominates v.
28 auto node = v;
29 while (node != GcnControlFlowGraph::null_vertex())
30 {
31 // Note that a vertex dominates itself by definition.
32 if (u == node)
33 {
34 result = true;
35 break;
36 }
37
38 // Get immediate dominator of node
39 node = m_domMap[node];
40 }
41 return result;
42 }
43
44 void GcnDominatorTree::buildDominatorMap()
45 {

Callers 1

popScopesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected