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

Method AddItemToWorkListIfNeeded

source/opt/vector_dce.cpp:414–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414void VectorDCE::AddItemToWorkListIfNeeded(
415 WorkListItem work_item, VectorDCE::LiveComponentMap* live_components,
416 std::vector<WorkListItem>* work_list) {
417 Instruction* current_inst = work_item.instruction;
418 auto it = live_components->find(current_inst->result_id());
419 if (it == live_components->end()) {
420 live_components->emplace(
421 std::make_pair(current_inst->result_id(), work_item.components));
422 work_list->emplace_back(work_item);
423 } else {
424 if (it->second.Or(work_item.components)) {
425 work_list->emplace_back(work_item);
426 }
427 }
428}
429
430} // namespace opt
431} // namespace spvtools

Callers

nothing calls this directly

Calls 4

emplace_backMethod · 0.80
OrMethod · 0.80
result_idMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected