/external/deqp-deps/SPIRV-Tools/source/opt/ |
D | mem_pass.cpp | 81 uint32_t varId = ptrId; in IsPtr() local 82 Instruction* ptrInst = get_def_use_mgr()->GetDef(varId); in IsPtr() 84 varId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); in IsPtr() 85 ptrInst = get_def_use_mgr()->GetDef(varId); in IsPtr() 95 Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { in GetPtr() argument 96 *varId = ptrId; in GetPtr() 97 Instruction* ptrInst = get_def_use_mgr()->GetDef(*varId); in GetPtr() 107 *varId = varInst->result_id(); in GetPtr() 109 *varId = 0; in GetPtr() 120 Instruction* MemPass::GetPtr(Instruction* ip, uint32_t* varId) { in GetPtr() argument [all …]
|
D | local_access_chain_convert_pass.cpp | 46 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, in BuildAndAppendVarLoad() argument 49 *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in BuildAndAppendVarLoad() 50 const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); in BuildAndAppendVarLoad() 54 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, in BuildAndAppendVarLoad() 77 uint32_t varId; in ReplaceAccessChainLoad() local 80 BuildAndAppendVarLoad(address_inst, &varId, &varPteTypeId, &new_inst); in ReplaceAccessChainLoad() 104 uint32_t varId; in GenAccessChainStoreReplacement() local 107 BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); in GenAccessChainStoreReplacement() 109 varId, ldResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() 121 varId, insResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() [all …]
|
D | local_single_block_elim_pass.cpp | 67 uint32_t varId; in LocalSingleBlockLoadStoreElim() local 68 Instruction* ptrInst = GetPtr(&*ii, &varId); in LocalSingleBlockLoadStoreElim() 69 if (!IsTargetVar(varId)) continue; in LocalSingleBlockLoadStoreElim() 70 if (!HasOnlySupportedRefs(varId)) continue; in LocalSingleBlockLoadStoreElim() 77 auto prev_store = var2store_.find(varId); in LocalSingleBlockLoadStoreElim() 85 auto li = var2load_.find(varId); in LocalSingleBlockLoadStoreElim() 96 var2store_[varId] = &*ii; in LocalSingleBlockLoadStoreElim() 97 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() 104 var2store_.erase(varId); in LocalSingleBlockLoadStoreElim() 105 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() [all …]
|
D | aggressive_dead_code_elim_pass.cpp | 83 bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { in IsVarOfStorage() argument 84 if (varId == 0) return false; in IsVarOfStorage() 85 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsVarOfStorage() 95 bool AggressiveDCEPass::IsLocalVar(uint32_t varId) { in IsLocalVar() argument 96 if (IsVarOfStorage(varId, SpvStorageClassFunction)) { in IsLocalVar() 103 return IsVarOfStorage(varId, SpvStorageClassPrivate) || in IsLocalVar() 104 IsVarOfStorage(varId, SpvStorageClassWorkgroup); in IsLocalVar() 171 void AggressiveDCEPass::ProcessLoad(uint32_t varId) { in ProcessLoad() argument 173 if (!IsLocalVar(varId)) return; in ProcessLoad() 175 if (live_local_vars_.find(varId) != live_local_vars_.end()) return; in ProcessLoad() [all …]
|
D | common_uniform_elim_pass.cpp | 64 bool CommonUniformElimPass::IsSamplerOrImageVar(uint32_t varId) const { in IsSamplerOrImageVar() 65 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsSamplerOrImageVar() 160 bool CommonUniformElimPass::IsUniformVar(uint32_t varId) { in IsUniformVar() argument 162 get_def_use_mgr()->id_to_defs().find(varId)->second; in IsUniformVar() 214 const uint32_t varId = in GenACLoadRepl() local 216 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in GenACLoadRepl() 221 std::initializer_list<uint32_t>{varId})); in GenACLoadRepl() 269 uint32_t varId; in UniformAccessChainConvert() local 270 Instruction* ptrInst = GetPtr(inst, &varId); in UniformAccessChainConvert() 273 if (ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx) != varId) in UniformAccessChainConvert() [all …]
|
D | mem_pass.h | 51 Instruction* GetPtr(Instruction* ip, uint32_t* varId); 63 bool IsTargetVar(uint32_t varId); 92 Instruction* GetPtr(uint32_t ptrId, uint32_t* varId); 102 bool HasLoads(uint32_t varId) const; 106 bool IsLiveVar(uint32_t varId) const; 141 bool HasOnlySupportedRefs(uint32_t varId);
|
D | common_uniform_elim_pass.h | 63 bool IsSamplerOrImageVar(uint32_t varId) const; 71 bool IsUniformVar(uint32_t varId); 179 uint32_t varId; in IsUniformLoadToBeRemoved() local 180 Instruction* ptrInst = GetPtr(inst, &varId); in IsUniformLoadToBeRemoved() 181 if (ptrInst->opcode() == SpvOpVariable && IsUniformVar(varId) && in IsUniformLoadToBeRemoved() 182 !IsSamplerOrImageVar(varId) && in IsUniformLoadToBeRemoved()
|
D | aggressive_dead_code_elim_pass.h | 58 bool IsVarOfStorage(uint32_t varId, uint32_t storageClass); 63 bool IsLocalVar(uint32_t varId); 100 void ProcessLoad(uint32_t varId);
|
D | local_single_block_elim_pass.h | 54 bool HasOnlySupportedRefs(uint32_t varId);
|
D | local_access_chain_convert_pass.h | 73 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId,
|
/external/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | mem_pass.cpp | 81 uint32_t varId = ptrId; in IsPtr() local 82 Instruction* ptrInst = get_def_use_mgr()->GetDef(varId); in IsPtr() 84 varId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); in IsPtr() 85 ptrInst = get_def_use_mgr()->GetDef(varId); in IsPtr() 95 Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { in GetPtr() argument 96 *varId = ptrId; in GetPtr() 97 Instruction* ptrInst = get_def_use_mgr()->GetDef(*varId); in GetPtr() 107 *varId = varInst->result_id(); in GetPtr() 109 *varId = 0; in GetPtr() 120 Instruction* MemPass::GetPtr(Instruction* ip, uint32_t* varId) { in GetPtr() argument [all …]
|
D | local_access_chain_convert_pass.cpp | 46 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, in BuildAndAppendVarLoad() argument 49 *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in BuildAndAppendVarLoad() 50 const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); in BuildAndAppendVarLoad() 54 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, in BuildAndAppendVarLoad() 77 uint32_t varId; in ReplaceAccessChainLoad() local 80 BuildAndAppendVarLoad(address_inst, &varId, &varPteTypeId, &new_inst); in ReplaceAccessChainLoad() 104 uint32_t varId; in GenAccessChainStoreReplacement() local 107 BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); in GenAccessChainStoreReplacement() 109 varId, ldResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() 121 varId, insResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() [all …]
|
D | local_single_block_elim_pass.cpp | 67 uint32_t varId; in LocalSingleBlockLoadStoreElim() local 68 Instruction* ptrInst = GetPtr(&*ii, &varId); in LocalSingleBlockLoadStoreElim() 69 if (!IsTargetVar(varId)) continue; in LocalSingleBlockLoadStoreElim() 70 if (!HasOnlySupportedRefs(varId)) continue; in LocalSingleBlockLoadStoreElim() 77 auto prev_store = var2store_.find(varId); in LocalSingleBlockLoadStoreElim() 85 auto li = var2load_.find(varId); in LocalSingleBlockLoadStoreElim() 96 var2store_[varId] = &*ii; in LocalSingleBlockLoadStoreElim() 97 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() 104 var2store_.erase(varId); in LocalSingleBlockLoadStoreElim() 105 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() [all …]
|
D | aggressive_dead_code_elim_pass.cpp | 83 bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { in IsVarOfStorage() argument 84 if (varId == 0) return false; in IsVarOfStorage() 85 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsVarOfStorage() 95 bool AggressiveDCEPass::IsLocalVar(uint32_t varId) { in IsLocalVar() argument 96 if (IsVarOfStorage(varId, SpvStorageClassFunction)) { in IsLocalVar() 103 return IsVarOfStorage(varId, SpvStorageClassPrivate) || in IsLocalVar() 104 IsVarOfStorage(varId, SpvStorageClassWorkgroup); in IsLocalVar() 171 void AggressiveDCEPass::ProcessLoad(uint32_t varId) { in ProcessLoad() argument 173 if (!IsLocalVar(varId)) return; in ProcessLoad() 175 if (live_local_vars_.find(varId) != live_local_vars_.end()) return; in ProcessLoad() [all …]
|
D | common_uniform_elim_pass.cpp | 64 bool CommonUniformElimPass::IsSamplerOrImageVar(uint32_t varId) const { in IsSamplerOrImageVar() 65 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsSamplerOrImageVar() 160 bool CommonUniformElimPass::IsUniformVar(uint32_t varId) { in IsUniformVar() argument 162 get_def_use_mgr()->id_to_defs().find(varId)->second; in IsUniformVar() 214 const uint32_t varId = in GenACLoadRepl() local 216 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in GenACLoadRepl() 221 std::initializer_list<uint32_t>{varId})); in GenACLoadRepl() 269 uint32_t varId; in UniformAccessChainConvert() local 270 Instruction* ptrInst = GetPtr(inst, &varId); in UniformAccessChainConvert() 273 if (ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx) != varId) in UniformAccessChainConvert() [all …]
|
D | mem_pass.h | 51 Instruction* GetPtr(Instruction* ip, uint32_t* varId); 63 bool IsTargetVar(uint32_t varId); 92 Instruction* GetPtr(uint32_t ptrId, uint32_t* varId); 102 bool HasLoads(uint32_t varId) const; 106 bool IsLiveVar(uint32_t varId) const; 141 bool HasOnlySupportedRefs(uint32_t varId);
|
D | common_uniform_elim_pass.h | 63 bool IsSamplerOrImageVar(uint32_t varId) const; 71 bool IsUniformVar(uint32_t varId); 179 uint32_t varId; in IsUniformLoadToBeRemoved() local 180 Instruction* ptrInst = GetPtr(inst, &varId); in IsUniformLoadToBeRemoved() 181 if (ptrInst->opcode() == SpvOpVariable && IsUniformVar(varId) && in IsUniformLoadToBeRemoved() 182 !IsSamplerOrImageVar(varId) && in IsUniformLoadToBeRemoved()
|
D | aggressive_dead_code_elim_pass.h | 60 bool IsVarOfStorage(uint32_t varId, uint32_t storageClass); 65 bool IsLocalVar(uint32_t varId); 102 void ProcessLoad(uint32_t varId);
|
D | local_single_block_elim_pass.h | 56 bool HasOnlySupportedRefs(uint32_t varId);
|
D | local_access_chain_convert_pass.h | 74 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId,
|
/external/deqp-deps/glslang/SPIRV/ |
D | SPVRemapper.cpp | 937 const spv::Id varId = asId(start+3); in optLoadStore() local 940 if (idMap.find(varId) == idMap.end()) { in optLoadStore() 941 fnLocalVars.erase(varId); in optLoadStore() 942 idMap.erase(varId); in optLoadStore() 947 fnLocalVars.erase(varId); in optLoadStore() 948 idMap.erase(varId); in optLoadStore() 952 if (blockMap.find(varId) == blockMap.end()) { in optLoadStore() 953 blockMap[varId] = blockNum; // track block we found it in. in optLoadStore() 954 } else if (blockMap[varId] != blockNum) { in optLoadStore() 955 fnLocalVars.erase(varId); // Ignore if crosses flow control in optLoadStore() [all …]
|