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

Method SwitchMergeBlock

source/opt/struct_cfg_analysis.cpp:178–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178uint32_t StructuredCFGAnalysis::SwitchMergeBlock(uint32_t bb_id) {
179 uint32_t header_id = ContainingSwitch(bb_id);
180 if (header_id == 0) {
181 return 0;
182 }
183
184 BasicBlock* header = context_->cfg()->block(header_id);
185 Instruction* merge_inst = header->GetMergeInst();
186 return merge_inst->GetSingleWordInOperand(kMergeNodeIndex);
187}
188
189bool StructuredCFGAnalysis::IsContinueBlock(uint32_t bb_id) {
190 assert(bb_id != 0);

Callers 3

CanMergeWithSuccessorFunction · 0.80
SimplifyBranchMethod · 0.80
TEST_FFunction · 0.80

Calls 4

GetMergeInstMethod · 0.80
blockMethod · 0.45
cfgMethod · 0.45

Tested by 1

TEST_FFunction · 0.64