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

Method LoopNestingDepth

source/opt/struct_cfg_analysis.cpp:165–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165uint32_t StructuredCFGAnalysis::LoopNestingDepth(uint32_t bb_id) {
166 uint32_t result = 0;
167
168 // Find the merge block of the current loop as long as the block is inside a
169 // loop, exiting a loop for each iteration.
170 for (uint32_t merge_block_id = LoopMergeBlock(bb_id); merge_block_id != 0;
171 merge_block_id = LoopMergeBlock(merge_block_id)) {
172 result++;
173 }
174
175 return result;
176}
177
178uint32_t StructuredCFGAnalysis::SwitchMergeBlock(uint32_t bb_id) {
179 uint32_t header_id = ContainingSwitch(bb_id);

Callers 3

ApplyMethod · 0.80
TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64