Lines Matching refs:var_inst
49 for (auto var_inst = entry_bb->begin(); var_inst->opcode() == SpvOpVariable; in Process() local
50 ++var_inst) { in Process()
51 if (!IsPointerToArrayType(var_inst->type_id())) { in Process()
56 Instruction* store_inst = FindStoreInstruction(&*var_inst); in Process()
63 FindSourceObjectIfPossible(&*var_inst, store_inst); in Process()
66 if (CanUpdateUses(&*var_inst, source_object->GetPointerTypeId(this))) { in Process()
68 PropagateObject(&*var_inst, source_object.get(), store_inst); in Process()
77 CopyPropagateArrays::FindSourceObjectIfPossible(Instruction* var_inst, in FindSourceObjectIfPossible() argument
79 assert(var_inst->opcode() == SpvOpVariable && "Expecting a variable."); in FindSourceObjectIfPossible()
88 if (!HasValidReferencesOnly(var_inst, store_inst)) { in FindSourceObjectIfPossible()
113 const Instruction* var_inst) const { in FindStoreInstruction()
116 var_inst, [&store_inst, var_inst](Instruction* use) { in FindStoreInstruction()
119 var_inst->result_id()) { in FindStoreInstruction()
132 void CopyPropagateArrays::PropagateObject(Instruction* var_inst, in PropagateObject() argument
135 assert(var_inst->opcode() == SpvOpVariable && in PropagateObject()
139 context()->KillNamesAndDecorates(var_inst); in PropagateObject()
140 UpdateUses(var_inst, new_access_chain); in PropagateObject()
821 CopyPropagateArrays::MemoryObject::MemoryObject(Instruction* var_inst, in MemoryObject() argument
823 : variable_inst_(var_inst) { in MemoryObject()