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

Method AddNewOperands

source/opt/simplification_pass.cpp:34–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void 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
46bool SimplificationPass::SimplifyFunction(Function* function) {
47 if (function->IsDeclaration()) {

Callers

nothing calls this directly

Calls 4

ForEachInIdMethod · 0.80
GetDefMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected