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

Method GetOrInsertNode

source/opt/dominator_tree.cpp:264–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264DominatorTreeNode* DominatorTree::GetOrInsertNode(BasicBlock* bb) {
265 DominatorTreeNode* dtn = nullptr;
266
267 std::map<uint32_t, DominatorTreeNode>::iterator node_iter =
268 nodes_.find(bb->id());
269 if (node_iter == nodes_.end()) {
270 dtn = &nodes_.emplace(std::make_pair(bb->id(), DominatorTreeNode{bb}))
271 .first->second;
272 } else {
273 dtn = &node_iter->second;
274 }
275
276 return dtn;
277}
278
279void DominatorTree::GetDominatorEdges(
280 const Function* f, const BasicBlock* placeholder_start_node,

Callers 1

PerformUnswitchMethod · 0.80

Calls 2

idMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected