| 874 | } |
| 875 | |
| 876 | void IRContext::AddVarToEntryPoints(uint32_t var_id) { |
| 877 | uint32_t ocnt = 0; |
| 878 | for (auto& e : module()->entry_points()) { |
| 879 | bool found = false; |
| 880 | e.ForEachInOperand([&ocnt, &found, &var_id](const uint32_t* idp) { |
| 881 | if (ocnt >= kEntryPointInterfaceInIdx) { |
| 882 | if (*idp == var_id) found = true; |
| 883 | } |
| 884 | ++ocnt; |
| 885 | }); |
| 886 | if (!found) { |
| 887 | e.AddOperand({SPV_OPERAND_TYPE_ID, {var_id}}); |
| 888 | get_def_use_mgr()->AnalyzeInstDefUse(&e); |
| 889 | } |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | uint32_t IRContext::GetBuiltinInputVarId(uint32_t builtin) { |
| 894 | if (!AreAnalysesValid(kAnalysisBuiltinVarId)) ResetBuiltinAnalysis(); |
nothing calls this directly
no test coverage detected