Gather the set of blocks for all the path from |entry| to |root|.
| 31 | namespace { |
| 32 | // Gather the set of blocks for all the path from |entry| to |root|. |
| 33 | void 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 | |
| 46 | size_t LoopPeelingPass::code_grow_threshold_ = 1000; |
no test coverage detected