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

Method LoopMergeBlock

source/opt/struct_cfg_analysis.cpp:143–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143uint32_t StructuredCFGAnalysis::LoopMergeBlock(uint32_t bb_id) {
144 uint32_t header_id = ContainingLoop(bb_id);
145 if (header_id == 0) {
146 return 0;
147 }
148
149 BasicBlock* header = context_->cfg()->block(header_id);
150 Instruction* merge_inst = header->GetMergeInst();
151 return merge_inst->GetSingleWordInOperand(kMergeNodeIndex);
152}
153
154uint32_t StructuredCFGAnalysis::LoopContinueBlock(uint32_t bb_id) {
155 uint32_t header_id = ContainingLoop(bb_id);

Callers 5

SimplifyBranchMethod · 0.80
IsApplicableMethod · 0.80
ApplyMethod · 0.80
TEST_FFunction · 0.80

Calls 4

GetMergeInstMethod · 0.80
blockMethod · 0.45
cfgMethod · 0.45

Tested by 1

TEST_FFunction · 0.64