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

Function GetBlocksInPath

source/opt/loop_peeling.cpp:33–43  ·  view source on GitHub ↗

Gather the set of blocks for all the path from |entry| to |root|.

Source from the content-addressed store, hash-verified

31namespace {
32// Gather the set of blocks for all the path from |entry| to |root|.
33void GetBlocksInPath(uint32_t block, uint32_t entry,
34 std::unordered_set<uint32_t>* blocks_in_path,
35 const CFG& cfg) {
36 for (uint32_t pid : cfg.preds(block)) {
37 if (blocks_in_path->insert(pid).second) {
38 if (pid != entry) {
39 GetBlocksInPath(pid, entry, blocks_in_path, cfg);
40 }
41 }
42 }
43}
44} // namespace
45
46size_t LoopPeelingPass::code_grow_threshold_ = 1000;

Callers 1

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected