| 412 | } |
| 413 | |
| 414 | void 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 |
nothing calls this directly
no test coverage detected