Home
last modified time | relevance | path

Searched refs:typeInst (Results 1 – 23 of 23) sorted by relevance

/external/deqp-deps/SPIRV-Tools/source/opt/
Ddead_insert_elim_pass.cpp39 uint32_t DeadInsertElimPass::NumComponents(Instruction* typeInst) { in NumComponents() argument
40 switch (typeInst->opcode()) { in NumComponents()
42 return typeInst->GetSingleWordInOperand(kTypeVectorCountInIdx); in NumComponents()
45 return typeInst->GetSingleWordInOperand(kTypeMatrixCountInIdx); in NumComponents()
49 typeInst->GetSingleWordInOperand(kTypeArrayLengthIdInIdx); in NumComponents()
60 return typeInst->NumInOperands(); in NumComponents()
70 Instruction* typeInst = get_def_use_mgr()->GetDef(insertChain->type_id()); in MarkInsertChain() local
71 if (typeInst->opcode() == SpvOpTypeArray) return; in MarkInsertChain()
79 uint32_t cnum = NumComponents(typeInst); in MarkInsertChain()
183 Instruction* typeInst = get_def_use_mgr()->GetDef(ii->type_id()); in EliminateDeadInsertsOnePass() local
[all …]
Dinline_opaque_pass.cpp30 const Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in IsOpaqueType() local
31 switch (typeInst->opcode()) { in IsOpaqueType()
38 typeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx)); in IsOpaqueType()
43 if (typeInst->opcode() != SpvOpTypeStruct) return false; in IsOpaqueType()
45 return !typeInst->WhileEachInId([this](const uint32_t* tid) { in IsOpaqueType()
Dtype_manager.cpp207 std::unique_ptr<Instruction> typeInst; in GetTypeInstruction() local
214 typeInst = MakeUnique<Instruction>(context(), SpvOpType##kind, 0, id, \ in GetTypeInstruction()
229 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
237 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
244 typeInst = in GetTypeInstruction()
254 typeInst = in GetTypeInstruction()
265 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
286 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
293 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
303 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
[all …]
Dmem_pass.cpp40 bool MemPass::IsBaseTargetType(const Instruction* typeInst) const { in IsBaseTargetType()
41 switch (typeInst->opcode()) { in IsBaseTargetType()
58 bool MemPass::IsTargetType(const Instruction* typeInst) const { in IsTargetType()
59 if (IsBaseTargetType(typeInst)) return true; in IsTargetType()
60 if (typeInst->opcode() == SpvOpTypeArray) { in IsTargetType()
62 get_def_use_mgr()->GetDef(typeInst->GetSingleWordOperand(1)))) { in IsTargetType()
67 if (typeInst->opcode() != SpvOpTypeStruct) return false; in IsTargetType()
69 return typeInst->WhileEachInId([this](const uint32_t* tid) { in IsTargetType()
Dscalar_replacement_pass.cpp530 const Instruction* typeInst = GetStorageType(varInst); in CanReplaceVariable() local
531 return CheckType(typeInst) && CheckAnnotations(varInst) && CheckUses(varInst); in CanReplaceVariable()
534 bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { in CheckType()
535 if (!CheckTypeAnnotations(typeInst)) return false; in CheckType()
537 switch (typeInst->opcode()) { in CheckType()
540 if (typeInst->NumInOperands() == 0 || in CheckType()
541 IsLargerThanSizeLimit(typeInst->NumInOperands())) in CheckType()
545 if (IsSpecConstant(typeInst->GetSingleWordInOperand(1u))) { in CheckType()
548 if (IsLargerThanSizeLimit(GetArrayLength(typeInst))) { in CheckType()
568 const Instruction* typeInst) const { in CheckTypeAnnotations()
[all …]
Dmem_pass.h75 bool IsBaseTargetType(const Instruction* typeInst) const;
80 bool IsTargetType(const Instruction* typeInst) const;
Dscalar_replacement_pass.h81 bool CheckType(const Instruction* typeInst) const;
89 bool CheckTypeAnnotations(const Instruction* typeInst) const;
Ddead_branch_elim_pass.cpp66 Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in GetConstInteger() local
67 if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; in GetConstInteger()
69 if (typeInst->GetSingleWordInOperand(0) != 32) return false; in GetConstInteger()
Dcommon_uniform_elim_pass.cpp44 const Instruction* typeInst) const { in IsSamplerOrImageType()
45 switch (typeInst->opcode()) { in IsSamplerOrImageType()
53 if (typeInst->opcode() != SpvOpTypeStruct) return false; in IsSamplerOrImageType()
55 return !typeInst->WhileEachInId([this](const uint32_t* tid) { in IsSamplerOrImageType()
Ddead_insert_elim_pass.h55 uint32_t NumComponents(Instruction* typeInst);
Dcommon_uniform_elim_pass.h60 bool IsSamplerOrImageType(const Instruction* typeInst) const;
/external/swiftshader/third_party/SPIRV-Tools/source/opt/
Ddead_insert_elim_pass.cpp39 uint32_t DeadInsertElimPass::NumComponents(Instruction* typeInst) { in NumComponents() argument
40 switch (typeInst->opcode()) { in NumComponents()
42 return typeInst->GetSingleWordInOperand(kTypeVectorCountInIdx); in NumComponents()
45 return typeInst->GetSingleWordInOperand(kTypeMatrixCountInIdx); in NumComponents()
49 typeInst->GetSingleWordInOperand(kTypeArrayLengthIdInIdx); in NumComponents()
60 return typeInst->NumInOperands(); in NumComponents()
70 Instruction* typeInst = get_def_use_mgr()->GetDef(insertChain->type_id()); in MarkInsertChain() local
71 if (typeInst->opcode() == SpvOpTypeArray) return; in MarkInsertChain()
79 uint32_t cnum = NumComponents(typeInst); in MarkInsertChain()
183 Instruction* typeInst = get_def_use_mgr()->GetDef(ii->type_id()); in EliminateDeadInsertsOnePass() local
[all …]
Dinline_opaque_pass.cpp30 const Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in IsOpaqueType() local
31 switch (typeInst->opcode()) { in IsOpaqueType()
38 typeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx)); in IsOpaqueType()
43 if (typeInst->opcode() != SpvOpTypeStruct) return false; in IsOpaqueType()
45 return !typeInst->WhileEachInId([this](const uint32_t* tid) { in IsOpaqueType()
Dtype_manager.cpp207 std::unique_ptr<Instruction> typeInst; in GetTypeInstruction() local
214 typeInst = MakeUnique<Instruction>(context(), SpvOpType##kind, 0, id, \ in GetTypeInstruction()
229 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
237 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
244 typeInst = in GetTypeInstruction()
254 typeInst = in GetTypeInstruction()
265 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
286 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
293 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
303 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
[all …]
Dmem_pass.cpp40 bool MemPass::IsBaseTargetType(const Instruction* typeInst) const { in IsBaseTargetType()
41 switch (typeInst->opcode()) { in IsBaseTargetType()
58 bool MemPass::IsTargetType(const Instruction* typeInst) const { in IsTargetType()
59 if (IsBaseTargetType(typeInst)) return true; in IsTargetType()
60 if (typeInst->opcode() == SpvOpTypeArray) { in IsTargetType()
62 get_def_use_mgr()->GetDef(typeInst->GetSingleWordOperand(1)))) { in IsTargetType()
67 if (typeInst->opcode() != SpvOpTypeStruct) return false; in IsTargetType()
69 return typeInst->WhileEachInId([this](const uint32_t* tid) { in IsTargetType()
Dscalar_replacement_pass.cpp530 const Instruction* typeInst = GetStorageType(varInst); in CanReplaceVariable() local
531 return CheckType(typeInst) && CheckAnnotations(varInst) && CheckUses(varInst); in CanReplaceVariable()
534 bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { in CheckType()
535 if (!CheckTypeAnnotations(typeInst)) return false; in CheckType()
537 switch (typeInst->opcode()) { in CheckType()
540 if (typeInst->NumInOperands() == 0 || in CheckType()
541 IsLargerThanSizeLimit(typeInst->NumInOperands())) in CheckType()
545 if (IsSpecConstant(typeInst->GetSingleWordInOperand(1u))) { in CheckType()
548 if (IsLargerThanSizeLimit(GetArrayLength(typeInst))) { in CheckType()
568 const Instruction* typeInst) const { in CheckTypeAnnotations()
[all …]
Dmem_pass.h75 bool IsBaseTargetType(const Instruction* typeInst) const;
80 bool IsTargetType(const Instruction* typeInst) const;
Dscalar_replacement_pass.h82 bool CheckType(const Instruction* typeInst) const;
90 bool CheckTypeAnnotations(const Instruction* typeInst) const;
Ddead_branch_elim_pass.cpp66 Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in GetConstInteger() local
67 if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; in GetConstInteger()
69 if (typeInst->GetSingleWordInOperand(0) != 32) return false; in GetConstInteger()
Dcommon_uniform_elim_pass.cpp44 const Instruction* typeInst) const { in IsSamplerOrImageType()
45 switch (typeInst->opcode()) { in IsSamplerOrImageType()
53 if (typeInst->opcode() != SpvOpTypeStruct) return false; in IsSamplerOrImageType()
55 return !typeInst->WhileEachInId([this](const uint32_t* tid) { in IsSamplerOrImageType()
Ddead_insert_elim_pass.h56 uint32_t NumComponents(Instruction* typeInst);
Dcommon_uniform_elim_pass.h60 bool IsSamplerOrImageType(const Instruction* typeInst) const;
/external/deqp-deps/glslang/SPIRV/
DspvIR.h406 Instruction* typeInst = parent.getInstruction(functionType); in Function() local
407 int numParams = typeInst->getNumOperands() - 1; in Function()
409 …Instruction* param = new Instruction(firstParamId + p, typeInst->getIdOperand(p + 1), OpFunctionPa… in Function()