| 32 | } |
| 33 | |
| 34 | void SimplificationPass::AddNewOperands( |
| 35 | Instruction* folded_inst, std::unordered_set<Instruction*>* inst_seen, |
| 36 | std::vector<Instruction*>* work_list) { |
| 37 | analysis::DefUseManager* def_use_mgr = get_def_use_mgr(); |
| 38 | folded_inst->ForEachInId( |
| 39 | [&inst_seen, &def_use_mgr, &work_list](uint32_t* iid) { |
| 40 | Instruction* iid_inst = def_use_mgr->GetDef(*iid); |
| 41 | if (!inst_seen->insert(iid_inst).second) return; |
| 42 | work_list->push_back(iid_inst); |
| 43 | }); |
| 44 | } |
| 45 | |
| 46 | bool SimplificationPass::SimplifyFunction(Function* function) { |
| 47 | if (function->IsDeclaration()) { |
nothing calls this directly
no test coverage detected