/third_party/flutter/skia/third_party/externals/spirv-tools/source/opt/ |
D | local_single_block_elim_pass.cpp | 69 ir::Instruction* ip, uint32_t* varId) { in GetPtr() argument 70 *varId = ip->GetSingleWordInOperand( in GetPtr() 72 ir::Instruction* ptrInst = def_use_mgr_->GetDef(*varId); in GetPtr() 75 *varId = varInst->GetSingleWordInOperand(kSpvAccessChainPtrId); in GetPtr() 76 varInst = def_use_mgr_->GetDef(*varId); in GetPtr() 81 bool LocalSingleBlockLoadStoreElimPass::IsTargetVar(uint32_t varId) { in IsTargetVar() argument 82 if (seen_non_target_vars_.find(varId) != seen_non_target_vars_.end()) in IsTargetVar() 84 if (seen_target_vars_.find(varId) != seen_target_vars_.end()) in IsTargetVar() 86 const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); in IsTargetVar() 92 seen_non_target_vars_.insert(varId); in IsTargetVar() [all …]
|
D | local_ssa_elim_pass.cpp | 79 ir::Instruction* ip, uint32_t* varId) { in GetPtr() argument 82 *varId = ip->GetSingleWordInOperand( in GetPtr() 84 ir::Instruction* ptrInst = def_use_mgr_->GetDef(*varId); in GetPtr() 88 *varId = varInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in GetPtr() 92 *varId = varInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); in GetPtr() 94 varInst = def_use_mgr_->GetDef(*varId); in GetPtr() 99 bool LocalMultiStoreElimPass::IsTargetVar(uint32_t varId) { in IsTargetVar() argument 100 if (seen_non_target_vars_.find(varId) != seen_non_target_vars_.end()) in IsTargetVar() 102 if (seen_target_vars_.find(varId) != seen_target_vars_.end()) in IsTargetVar() 104 const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); in IsTargetVar() [all …]
|
D | local_single_store_elim_pass.cpp | 74 ir::Instruction* ip, uint32_t* varId) { in GetPtr() argument 75 *varId = ip->GetSingleWordInOperand( in GetPtr() 77 ir::Instruction* ptrInst = def_use_mgr_->GetDef(*varId); in GetPtr() 80 *varId = varInst->GetSingleWordInOperand(kSpvAccessChainPtrId); in GetPtr() 81 varInst = def_use_mgr_->GetDef(*varId); in GetPtr() 86 bool LocalSingleStoreElimPass::IsTargetVar(uint32_t varId) { in IsTargetVar() argument 87 if (seen_non_target_vars_.find(varId) != seen_non_target_vars_.end()) in IsTargetVar() 89 if (seen_target_vars_.find(varId) != seen_target_vars_.end()) in IsTargetVar() 91 const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); in IsTargetVar() 97 seen_non_target_vars_.insert(varId); in IsTargetVar() [all …]
|
D | local_access_chain_convert_pass.cpp | 72 uint32_t* varId) { in GetPtr() argument 76 *varId = IsNonPtrAccessChain(ptrInst->opcode()) ? in GetPtr() 82 bool LocalAccessChainConvertPass::IsTargetVar(uint32_t varId) { in IsTargetVar() argument 83 if (seen_non_target_vars_.find(varId) != seen_non_target_vars_.end()) in IsTargetVar() 85 if (seen_target_vars_.find(varId) != seen_target_vars_.end()) in IsTargetVar() 87 const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); in IsTargetVar() 94 seen_non_target_vars_.insert(varId); in IsTargetVar() 101 seen_non_target_vars_.insert(varId); in IsTargetVar() 104 seen_target_vars_.insert(varId); in IsTargetVar() 151 uint32_t* varId, in BuildAndAppendVarLoad() argument [all …]
|
D | aggressive_dead_code_elim_pass.cpp | 44 ir::Instruction* ip, uint32_t* varId) { in GetPtr() argument 47 *varId = ip->GetSingleWordInOperand( in GetPtr() 49 ir::Instruction* ptrInst = def_use_mgr_->GetDef(*varId); in GetPtr() 53 *varId = varInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in GetPtr() 57 *varId = varInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); in GetPtr() 59 varInst = def_use_mgr_->GetDef(*varId); in GetPtr() 64 bool AggressiveDCEPass::IsLocalVar(uint32_t varId) { in IsLocalVar() argument 65 const ir::Instruction* varInst = def_use_mgr_->GetDef(varId); in IsLocalVar() 140 uint32_t varId; in AggressiveDCE() local 141 (void) GetPtr(&inst, &varId); in AggressiveDCE() [all …]
|
D | local_single_store_elim_pass.h | 59 ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId); 66 bool IsTargetVar(uint32_t varId); 109 bool HasLoads(uint32_t varId) const; 113 bool IsLiveVar(uint32_t varId) const;
|
D | local_ssa_elim_pass.h | 62 ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId); 69 bool IsTargetVar(uint32_t varId); 83 bool IsLiveVar(uint32_t varId) const; 94 bool HasOnlySupportedRefs(uint32_t varId);
|
D | local_single_block_elim_pass.h | 57 ir::Instruction* GetPtr(ir::Instruction* ip, uint32_t* varId); 64 bool IsTargetVar(uint32_t varId); 75 bool IsLiveVar(uint32_t varId) const;
|
/third_party/skia/third_party/externals/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() 101 *varId = 0; in GetPtr() 112 *varId = varInst->result_id(); in GetPtr() 114 *varId = 0; in GetPtr() [all …]
|
D | local_single_block_elim_pass.cpp | 72 uint32_t varId; in LocalSingleBlockLoadStoreElim() local 73 Instruction* ptrInst = GetPtr(&*ii, &varId); in LocalSingleBlockLoadStoreElim() 74 if (!IsTargetVar(varId)) continue; in LocalSingleBlockLoadStoreElim() 75 if (!HasOnlySupportedRefs(varId)) continue; in LocalSingleBlockLoadStoreElim() 83 auto prev_store = var2store_.find(varId); in LocalSingleBlockLoadStoreElim() 87 varId)) { in LocalSingleBlockLoadStoreElim() 93 auto li = var2load_.find(varId); in LocalSingleBlockLoadStoreElim() 104 var2store_[varId] = &*ii; in LocalSingleBlockLoadStoreElim() 105 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() 112 var2store_.erase(varId); in LocalSingleBlockLoadStoreElim() [all …]
|
D | local_access_chain_convert_pass.cpp | 46 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, in BuildAndAppendVarLoad() argument 53 *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in BuildAndAppendVarLoad() 54 const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); in BuildAndAppendVarLoad() 58 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, in BuildAndAppendVarLoad() 90 uint32_t varId; in ReplaceAccessChainLoad() local 93 BuildAndAppendVarLoad(address_inst, &varId, &varPteTypeId, &new_inst); in ReplaceAccessChainLoad() 137 uint32_t varId; in GenAccessChainStoreReplacement() local 140 BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); in GenAccessChainStoreReplacement() 146 varId, ldResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() 161 varId, insResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() [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; 142 bool HasOnlySupportedRefs(uint32_t varId);
|
D | aggressive_dead_code_elim_pass.cpp | 88 bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { in IsVarOfStorage() argument 89 if (varId == 0) return false; in IsVarOfStorage() 90 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsVarOfStorage() 100 bool AggressiveDCEPass::IsLocalVar(uint32_t varId, Function* func) { in IsLocalVar() argument 101 if (IsVarOfStorage(varId, SpvStorageClassFunction)) { in IsLocalVar() 105 if (!IsVarOfStorage(varId, SpvStorageClassPrivate) && in IsLocalVar() 106 !IsVarOfStorage(varId, SpvStorageClassWorkgroup)) { in IsLocalVar() 189 void AggressiveDCEPass::ProcessLoad(Function* func, uint32_t varId) { in ProcessLoad() argument 191 if (!IsLocalVar(varId, func)) return; in ProcessLoad() 193 if (live_local_vars_.find(varId) != live_local_vars_.end()) return; in ProcessLoad() [all …]
|
/third_party/spirv-tools/source/opt/ |
D | mem_pass.cpp | 82 uint32_t varId = ptrId; in IsPtr() local 83 Instruction* ptrInst = get_def_use_mgr()->GetDef(varId); in IsPtr() 85 varId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); in IsPtr() 86 ptrInst = get_def_use_mgr()->GetDef(varId); in IsPtr() 96 Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { in GetPtr() argument 97 *varId = ptrId; in GetPtr() 98 Instruction* ptrInst = get_def_use_mgr()->GetDef(*varId); in GetPtr() 102 *varId = 0; in GetPtr() 113 *varId = varInst->result_id(); in GetPtr() 115 *varId = 0; in GetPtr() [all …]
|
D | local_single_block_elim_pass.cpp | 72 uint32_t varId; in LocalSingleBlockLoadStoreElim() local 73 Instruction* ptrInst = GetPtr(&*ii, &varId); in LocalSingleBlockLoadStoreElim() 74 if (!IsTargetVar(varId)) continue; in LocalSingleBlockLoadStoreElim() 75 if (!HasOnlySupportedRefs(varId)) continue; in LocalSingleBlockLoadStoreElim() 83 auto prev_store = var2store_.find(varId); in LocalSingleBlockLoadStoreElim() 87 varId)) { in LocalSingleBlockLoadStoreElim() 93 auto li = var2load_.find(varId); in LocalSingleBlockLoadStoreElim() 104 var2store_[varId] = &*ii; in LocalSingleBlockLoadStoreElim() 105 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() 112 var2store_.erase(varId); in LocalSingleBlockLoadStoreElim() [all …]
|
D | local_access_chain_convert_pass.cpp | 46 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, in BuildAndAppendVarLoad() argument 53 *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in BuildAndAppendVarLoad() 54 const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); in BuildAndAppendVarLoad() 58 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, in BuildAndAppendVarLoad() 90 uint32_t varId; in ReplaceAccessChainLoad() local 93 BuildAndAppendVarLoad(address_inst, &varId, &varPteTypeId, &new_inst); in ReplaceAccessChainLoad() 137 uint32_t varId; in GenAccessChainStoreReplacement() local 140 BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); in GenAccessChainStoreReplacement() 146 varId, ldResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() 161 varId, insResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() [all …]
|
D | aggressive_dead_code_elim_pass.cpp | 87 bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { in IsVarOfStorage() argument 88 if (varId == 0) return false; in IsVarOfStorage() 89 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsVarOfStorage() 99 bool AggressiveDCEPass::IsLocalVar(uint32_t varId) { in IsLocalVar() argument 100 if (IsVarOfStorage(varId, SpvStorageClassFunction)) { in IsLocalVar() 107 return IsVarOfStorage(varId, SpvStorageClassPrivate) || in IsLocalVar() 108 IsVarOfStorage(varId, SpvStorageClassWorkgroup); in IsLocalVar() 179 void AggressiveDCEPass::ProcessLoad(Function* func, uint32_t varId) { in ProcessLoad() argument 181 if (!IsLocalVar(varId)) return; in ProcessLoad() 183 if (live_local_vars_.find(varId) != live_local_vars_.end()) return; in ProcessLoad() [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; 142 bool HasOnlySupportedRefs(uint32_t varId);
|
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(Function* func, uint32_t varId);
|
/third_party/skia/third_party/externals/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() 101 *varId = 0; in GetPtr() 112 *varId = varInst->result_id(); in GetPtr() 114 *varId = 0; in GetPtr() [all …]
|
D | local_single_block_elim_pass.cpp | 72 uint32_t varId; in LocalSingleBlockLoadStoreElim() local 73 Instruction* ptrInst = GetPtr(&*ii, &varId); in LocalSingleBlockLoadStoreElim() 74 if (!IsTargetVar(varId)) continue; in LocalSingleBlockLoadStoreElim() 75 if (!HasOnlySupportedRefs(varId)) continue; in LocalSingleBlockLoadStoreElim() 83 auto prev_store = var2store_.find(varId); in LocalSingleBlockLoadStoreElim() 87 varId)) { in LocalSingleBlockLoadStoreElim() 93 auto li = var2load_.find(varId); in LocalSingleBlockLoadStoreElim() 104 var2store_[varId] = &*ii; in LocalSingleBlockLoadStoreElim() 105 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim() 112 var2store_.erase(varId); in LocalSingleBlockLoadStoreElim() [all …]
|
D | local_access_chain_convert_pass.cpp | 46 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, in BuildAndAppendVarLoad() argument 53 *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in BuildAndAppendVarLoad() 54 const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); in BuildAndAppendVarLoad() 58 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, in BuildAndAppendVarLoad() 90 uint32_t varId; in ReplaceAccessChainLoad() local 93 BuildAndAppendVarLoad(address_inst, &varId, &varPteTypeId, &new_inst); in ReplaceAccessChainLoad() 137 uint32_t varId; in GenAccessChainStoreReplacement() local 140 BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); in GenAccessChainStoreReplacement() 146 varId, ldResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() 161 varId, insResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement() [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; 142 bool HasOnlySupportedRefs(uint32_t varId);
|
D | aggressive_dead_code_elim_pass.cpp | 88 bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { in IsVarOfStorage() argument 89 if (varId == 0) return false; in IsVarOfStorage() 90 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsVarOfStorage() 100 bool AggressiveDCEPass::IsLocalVar(uint32_t varId, Function* func) { in IsLocalVar() argument 101 if (IsVarOfStorage(varId, SpvStorageClassFunction)) { in IsLocalVar() 105 if (!IsVarOfStorage(varId, SpvStorageClassPrivate) && in IsLocalVar() 106 !IsVarOfStorage(varId, SpvStorageClassWorkgroup)) { in IsLocalVar() 189 void AggressiveDCEPass::ProcessLoad(Function* func, uint32_t varId) { in ProcessLoad() argument 191 if (!IsLocalVar(varId, func)) return; in ProcessLoad() 193 if (live_local_vars_.find(varId) != live_local_vars_.end()) return; in ProcessLoad() [all …]
|
/third_party/glslang/SPIRV/ |
D | SPVRemapper.cpp | 948 const spv::Id varId = asId(start+3); in optLoadStore() local 951 if (idMap.find(varId) == idMap.end()) { in optLoadStore() 952 fnLocalVars.erase(varId); in optLoadStore() 953 idMap.erase(varId); in optLoadStore() 958 fnLocalVars.erase(varId); in optLoadStore() 959 idMap.erase(varId); in optLoadStore() 963 if (blockMap.find(varId) == blockMap.end()) { in optLoadStore() 964 blockMap[varId] = blockNum; // track block we found it in. in optLoadStore() 965 } else if (blockMap[varId] != blockNum) { in optLoadStore() 966 fnLocalVars.erase(varId); // Ignore if crosses flow control in optLoadStore() [all …]
|