| 128 | } |
| 129 | |
| 130 | uint32_t StructuredCFGAnalysis::NestingDepth(uint32_t bb_id) { |
| 131 | uint32_t result = 0; |
| 132 | |
| 133 | // Find the merge block of the current merge construct as long as the block is |
| 134 | // inside a merge construct, exiting one for each iteration. |
| 135 | for (uint32_t merge_block_id = MergeBlock(bb_id); merge_block_id != 0; |
| 136 | merge_block_id = MergeBlock(merge_block_id)) { |
| 137 | result++; |
| 138 | } |
| 139 | |
| 140 | return result; |
| 141 | } |
| 142 | |
| 143 | uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) { |
| 144 | uint32_t header_id = ContainingLoop(bb_id); |
no outgoing calls