| 183 | } |
| 184 | |
| 185 | std::vector<Instruction*> |
| 186 | InterfaceVariableScalarReplacement::CollectInterfaceVariables( |
| 187 | Instruction& entry_point) { |
| 188 | std::vector<Instruction*> interface_vars; |
| 189 | for (uint32_t i = kOpEntryPointInOperandInterface; |
| 190 | i < entry_point.NumInOperands(); ++i) { |
| 191 | Instruction* interface_var = context()->get_def_use_mgr()->GetDef( |
| 192 | entry_point.GetSingleWordInOperand(i)); |
| 193 | assert(interface_var->opcode() == spv::Op::OpVariable); |
| 194 | |
| 195 | spv::StorageClass storage_class = GetStorageClass(interface_var); |
| 196 | if (storage_class != spv::StorageClass::Input && |
| 197 | storage_class != spv::StorageClass::Output) { |
| 198 | continue; |
| 199 | } |
| 200 | |
| 201 | interface_vars.push_back(interface_var); |
| 202 | } |
| 203 | return interface_vars; |
| 204 | } |
| 205 | |
| 206 | void InterfaceVariableScalarReplacement::KillInstructionAndUsers( |
| 207 | Instruction* inst) { |
nothing calls this directly
no test coverage detected