Home
last modified time | relevance | path

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

12

/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.cpp214 std::unique_ptr<Instruction> typeInst; in GetTypeInstruction() local
225 typeInst = MakeUnique<Instruction>(context(), SpvOpType##kind, 0, id, \ in GetTypeInstruction()
241 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
249 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
259 typeInst = in GetTypeInstruction()
272 typeInst = in GetTypeInstruction()
286 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
310 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
320 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
333 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.cpp493 Instruction* typeInst = GetStorageType(varInst); in CreateVariable() local
495 get_decoration_mgr()->GetDecorationsFor(typeInst->result_id(), false)) { in CreateVariable()
683 const Instruction* typeInst = GetStorageType(varInst); in CanReplaceVariable() local
684 if (!CheckType(typeInst)) { in CanReplaceVariable()
699 bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { in CheckType()
700 if (!CheckTypeAnnotations(typeInst)) { in CheckType()
704 switch (typeInst->opcode()) { in CheckType()
707 if (typeInst->NumInOperands() == 0 || in CheckType()
708 IsLargerThanSizeLimit(typeInst->NumInOperands())) { in CheckType()
713 if (IsSpecConstant(typeInst->GetSingleWordInOperand(1u))) { in CheckType()
[all …]
Dmem_pass.h75 bool IsBaseTargetType(const Instruction* typeInst) const;
80 bool IsTargetType(const Instruction* typeInst) const;
Dscalar_replacement_pass.h94 bool CheckType(const Instruction* typeInst) const;
102 bool CheckTypeAnnotations(const Instruction* typeInst) const;
Ddead_branch_elim_pass.cpp67 Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in GetConstInteger() local
68 if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; in GetConstInteger()
70 if (typeInst->GetSingleWordInOperand(0) != 32) return false; in GetConstInteger()
/third_party/skia/third_party/externals/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()
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()
Dtype_manager.cpp213 std::unique_ptr<Instruction> typeInst; in GetTypeInstruction() local
224 typeInst = MakeUnique<Instruction>(context(), SpvOpType##kind, 0, id, \ in GetTypeInstruction()
239 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
247 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
257 typeInst = in GetTypeInstruction()
270 typeInst = in GetTypeInstruction()
284 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
308 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
318 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
331 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
[all …]
Dscalar_replacement_pass.cpp488 Instruction* typeInst = GetStorageType(varInst); in CreateVariable() local
490 get_decoration_mgr()->GetDecorationsFor(typeInst->result_id(), false)) { in CreateVariable()
678 const Instruction* typeInst = GetStorageType(varInst); in CanReplaceVariable() local
679 if (!CheckType(typeInst)) { in CanReplaceVariable()
694 bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { in CheckType()
695 if (!CheckTypeAnnotations(typeInst)) { in CheckType()
699 switch (typeInst->opcode()) { in CheckType()
702 if (typeInst->NumInOperands() == 0 || in CheckType()
703 IsLargerThanSizeLimit(typeInst->NumInOperands())) { in CheckType()
708 if (IsSpecConstant(typeInst->GetSingleWordInOperand(1u))) { in CheckType()
[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.cpp67 Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in GetConstInteger() local
68 if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; in GetConstInteger()
70 if (typeInst->GetSingleWordInOperand(0) != 32) return false; in GetConstInteger()
/third_party/skia/third_party/externals/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()
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()
Dtype_manager.cpp213 std::unique_ptr<Instruction> typeInst; in GetTypeInstruction() local
224 typeInst = MakeUnique<Instruction>(context(), SpvOpType##kind, 0, id, \ in GetTypeInstruction()
239 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
247 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
257 typeInst = in GetTypeInstruction()
270 typeInst = in GetTypeInstruction()
284 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
308 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
318 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
331 typeInst = MakeUnique<Instruction>( in GetTypeInstruction()
[all …]
Dscalar_replacement_pass.cpp488 Instruction* typeInst = GetStorageType(varInst); in CreateVariable() local
490 get_decoration_mgr()->GetDecorationsFor(typeInst->result_id(), false)) { in CreateVariable()
678 const Instruction* typeInst = GetStorageType(varInst); in CanReplaceVariable() local
679 if (!CheckType(typeInst)) { in CanReplaceVariable()
694 bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { in CheckType()
695 if (!CheckTypeAnnotations(typeInst)) { in CheckType()
699 switch (typeInst->opcode()) { in CheckType()
702 if (typeInst->NumInOperands() == 0 || in CheckType()
703 IsLargerThanSizeLimit(typeInst->NumInOperands())) { in CheckType()
708 if (IsSpecConstant(typeInst->GetSingleWordInOperand(1u))) { in CheckType()
[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.cpp67 Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); in GetConstInteger() local
68 if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; in GetConstInteger()
70 if (typeInst->GetSingleWordInOperand(0) != 32) return false; in GetConstInteger()
/third_party/glslang/SPIRV/
DspvIR.h495 Instruction* typeInst = parent.getInstruction(functionType); in Function() local
496 int numParams = typeInst->getNumOperands() - 1; in Function()
498 …Instruction* param = new Instruction(firstParamId + p, typeInst->getIdOperand(p + 1), OpFunctionPa… in Function()

12