MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / DominatesAnExit

Function DominatesAnExit

source/opt/loop_utils.cpp:33–39  ·  view source on GitHub ↗

Return true if |bb| is dominated by at least one block in |exits|

Source from the content-addressed store, hash-verified

31namespace {
32// Return true if |bb| is dominated by at least one block in |exits|
33inline bool DominatesAnExit(BasicBlock* bb,
34 const std::unordered_set<BasicBlock*>& exits,
35 const DominatorTree& dom_tree) {
36 for (BasicBlock* e_bb : exits)
37 if (dom_tree.Dominates(bb, e_bb)) return true;
38 return false;
39}
40
41// Utility class to rewrite out-of-loop uses of an in-loop definition in terms
42// of phi instructions to achieve a LCSSA form.

Callers 1

MakeSetClosedSSAFunction · 0.85

Calls 1

DominatesMethod · 0.45

Tested by

no test coverage detected