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

Method MergeBlock

source/opt/struct_cfg_analysis.cpp:119–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119uint32_t StructuredCFGAnalysis::MergeBlock(uint32_t bb_id) {
120 uint32_t header_id = ContainingConstruct(bb_id);
121 if (header_id == 0) {
122 return 0;
123 }
124
125 BasicBlock* header = context_->cfg()->block(header_id);
126 Instruction* merge_inst = header->GetMergeInst();
127 return merge_inst->GetSingleWordInOperand(kMergeNodeIndex);
128}
129
130uint32_t StructuredCFGAnalysis::NestingDepth(uint32_t bb_id) {
131 uint32_t result = 0;

Callers 3

GetOpPhiBlockIdMethod · 0.80
TEST_FFunction · 0.80

Calls 4

GetMergeInstMethod · 0.80
blockMethod · 0.45
cfgMethod · 0.45

Tested by 1

TEST_FFunction · 0.64