Home
last modified time | relevance | path

Searched refs:varId (Results 1 – 25 of 27) sorted by relevance

12

/third_party/spirv-tools/source/opt/
Dmem_pass.cpp81 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 …]
Dlocal_single_block_elim_pass.cpp73 uint32_t varId; in LocalSingleBlockLoadStoreElim() local
74 Instruction* ptrInst = GetPtr(&*ii, &varId); in LocalSingleBlockLoadStoreElim()
75 if (!IsTargetVar(varId)) continue; in LocalSingleBlockLoadStoreElim()
76 if (!HasOnlySupportedRefs(varId)) continue; in LocalSingleBlockLoadStoreElim()
84 auto prev_store = var2store_.find(varId); in LocalSingleBlockLoadStoreElim()
88 varId)) { in LocalSingleBlockLoadStoreElim()
94 auto li = var2load_.find(varId); in LocalSingleBlockLoadStoreElim()
105 var2store_[varId] = &*ii; in LocalSingleBlockLoadStoreElim()
106 var2load_.erase(varId); in LocalSingleBlockLoadStoreElim()
113 var2store_.erase(varId); in LocalSingleBlockLoadStoreElim()
[all …]
Dlocal_access_chain_convert_pass.cpp45 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId, in BuildAndAppendVarLoad() argument
52 *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); in BuildAndAppendVarLoad()
53 const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); in BuildAndAppendVarLoad()
57 {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, in BuildAndAppendVarLoad()
101 uint32_t varId; in ReplaceAccessChainLoad() local
104 BuildAndAppendVarLoad(address_inst, &varId, &varPteTypeId, &new_inst); in ReplaceAccessChainLoad()
148 uint32_t varId; in GenAccessChainStoreReplacement() local
151 BuildAndAppendVarLoad(ptrInst, &varId, &varPteTypeId, newInsts); in GenAccessChainStoreReplacement()
157 varId, ldResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement()
172 varId, insResultId, {SpvDecorationRelaxedPrecision}); in GenAccessChainStoreReplacement()
[all …]
Dmem_pass.h51 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);
Daggressive_dead_code_elim_pass.cpp89 bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { in IsVarOfStorage() argument
90 if (varId == 0) return false; in IsVarOfStorage()
91 const Instruction* varInst = get_def_use_mgr()->GetDef(varId); in IsVarOfStorage()
101 bool AggressiveDCEPass::IsLocalVar(uint32_t varId, Function* func) { in IsLocalVar() argument
102 if (IsVarOfStorage(varId, SpvStorageClassFunction)) { in IsLocalVar()
106 if (!IsVarOfStorage(varId, SpvStorageClassPrivate) && in IsLocalVar()
107 !IsVarOfStorage(varId, SpvStorageClassWorkgroup)) { in IsLocalVar()
187 void AggressiveDCEPass::ProcessLoad(Function* func, uint32_t varId) { in ProcessLoad() argument
189 if (!IsLocalVar(varId, func)) return; in ProcessLoad()
191 if (live_local_vars_.find(varId) != live_local_vars_.end()) return; in ProcessLoad()
[all …]
Daggressive_dead_code_elim_pass.h68 bool IsVarOfStorage(uint32_t varId, uint32_t storageClass);
73 bool IsLocalVar(uint32_t varId, Function* func);
107 void ProcessLoad(Function* func, uint32_t varId);
Dlocal_single_block_elim_pass.h56 bool HasOnlySupportedRefs(uint32_t varId);
Dlocal_access_chain_convert_pass.h74 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId,
/third_party/skia/third_party/externals/spirv-tools/source/opt/
Dmem_pass.cpp81 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 …]
Dlocal_access_chain_convert_pass.cpp46 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 …]
Dlocal_single_block_elim_pass.cpp72 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 …]
Dmem_pass.h51 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);
Daggressive_dead_code_elim_pass.cpp88 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 …]
Daggressive_dead_code_elim_pass.h68 bool IsVarOfStorage(uint32_t varId, uint32_t storageClass);
73 bool IsLocalVar(uint32_t varId, Function* func);
107 void ProcessLoad(Function* func, uint32_t varId);
Dlocal_single_block_elim_pass.h56 bool HasOnlySupportedRefs(uint32_t varId);
Dlocal_access_chain_convert_pass.h74 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId,
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/opt/
Dmem_pass.cpp81 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 …]
Dlocal_access_chain_convert_pass.cpp46 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 …]
Dlocal_single_block_elim_pass.cpp72 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 …]
Dmem_pass.h51 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);
Daggressive_dead_code_elim_pass.cpp88 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 …]
Daggressive_dead_code_elim_pass.h68 bool IsVarOfStorage(uint32_t varId, uint32_t storageClass);
73 bool IsLocalVar(uint32_t varId, Function* func);
107 void ProcessLoad(Function* func, uint32_t varId);
Dlocal_single_block_elim_pass.h56 bool HasOnlySupportedRefs(uint32_t varId);
Dlocal_access_chain_convert_pass.h74 const Instruction* ptrInst, uint32_t* varId, uint32_t* varPteTypeId,
/third_party/glslang/SPIRV/
DSPVRemapper.cpp968 const spv::Id varId = asId(start+3); in optLoadStore() local
971 if (idMap.find(varId) == idMap.end()) { in optLoadStore()
972 fnLocalVars.erase(varId); in optLoadStore()
973 idMap.erase(varId); in optLoadStore()
978 fnLocalVars.erase(varId); in optLoadStore()
979 idMap.erase(varId); in optLoadStore()
983 if (blockMap.find(varId) == blockMap.end()) { in optLoadStore()
984 blockMap[varId] = blockNum; // track block we found it in. in optLoadStore()
985 } else if (blockMap[varId] != blockNum) { in optLoadStore()
986 fnLocalVars.erase(varId); // Ignore if crosses flow control in optLoadStore()
[all …]

12