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

Method LoopContinueBlock

source/opt/struct_cfg_analysis.cpp:154–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) {
155 uint32_t header_id = ContainingLoop(bb_id);
156 if (header_id == 0) {
157 return 0;
158 }
159
160 BasicBlock* header = context_->cfg()->block(header_id);
161 Instruction* merge_inst = header->GetMergeInst();
162 return merge_inst->GetSingleWordInOperand(kContinueNodeIndex);
163}
164
165uint32_t StructuredCFGAnalysis::LoopNestingDepth(uint32_t bb_id) {
166 uint32_t result = 0;

Callers 3

SimplifyBranchMethod · 0.80
ApplyMethod · 0.80
ApplyMethod · 0.80

Calls 4

GetMergeInstMethod · 0.80
blockMethod · 0.45
cfgMethod · 0.45

Tested by

no test coverage detected