/external/angle/third_party/vulkan-deps/spirv-tools/src/source/fuzz/ |
D | transformation_replace_linear_algebra_instruction.cpp | 39 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 41 FindInstruction(message_.instruction_descriptor(), ir_context); in IsApplicable() 51 GetRequiredFreshIdCount(ir_context, instruction)) { in IsApplicable() 57 if (!fuzzerutil::IsFreshId(ir_context, fresh_id)) { in IsApplicable() 66 opt::IRContext* ir_context, TransformationContext* /*unused*/) const { in Apply() argument 68 FindInstruction(message_.instruction_descriptor(), ir_context); in Apply() 72 ReplaceOpTranspose(ir_context, linear_algebra_instruction); in Apply() 75 ReplaceOpVectorTimesScalar(ir_context, linear_algebra_instruction); in Apply() 78 ReplaceOpMatrixTimesScalar(ir_context, linear_algebra_instruction); in Apply() 81 ReplaceOpVectorTimesMatrix(ir_context, linear_algebra_instruction); in Apply() [all …]
|
D | transformation_access_chain.cpp | 50 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 56 message_.fresh_id(), ir_context, &fresh_ids_used)) { in IsApplicable() 60 auto pointer = ir_context->get_def_use_mgr()->GetDef(message_.pointer_id()); in IsApplicable() 65 auto pointer_type = ir_context->get_def_use_mgr()->GetDef(pointer->type_id()); in IsApplicable() 73 FindInstruction(message_.instruction_to_insert_before(), ir_context); in IsApplicable() 99 ir_context, instruction_to_insert_before, message_.pointer_id())) { in IsApplicable() 119 if (ir_context->get_def_use_mgr()->GetDef(subobject_type_id)->opcode() == in IsApplicable() 125 GetStructIndexValue(ir_context, index_id, subobject_type_id); in IsApplicable() 150 fresh_ids.first(), ir_context, &fresh_ids_used) || in IsApplicable() 152 fresh_ids.second(), ir_context, &fresh_ids_used)) { in IsApplicable() [all …]
|
D | transformation_replace_constant_with_uniform.cpp | 41 spvtools::opt::IRContext* ir_context, uint32_t constant_type_id) const { in MakeAccessChainInstruction() argument 46 FindUniformVariable(message_.uniform_descriptor(), ir_context, false); in MakeAccessChainInstruction() 58 ir_context->get_type_mgr()->GetRegisteredType(&int_type)->AsInteger(); in MakeAccessChainInstruction() 59 auto int_type_id = ir_context->get_type_mgr()->GetId(&int_type); in MakeAccessChainInstruction() 62 auto constant_id = ir_context->get_constant_mgr()->FindDeclaredConstant( in MakeAccessChainInstruction() 70 ir_context->get_type_mgr()->GetTypeAndPointerType(constant_type_id, in MakeAccessChainInstruction() 75 ir_context->get_type_mgr()->GetId(type_and_pointer_type.second.get()); in MakeAccessChainInstruction() 78 ir_context, SpvOpAccessChain, pointer_to_uniform_constant_type_id, in MakeAccessChainInstruction() 84 spvtools::opt::IRContext* ir_context, uint32_t constant_type_id) const { in MakeLoadInstruction() argument 87 return MakeUnique<opt::Instruction>(ir_context, SpvOpLoad, constant_type_id, in MakeLoadInstruction() [all …]
|
D | transformation_propagate_instruction_down.cpp | 37 opt::IRContext* ir_context, in IsApplicable() argument 40 if (!IsApplicableToBlock(ir_context, message_.block_id())) { in IsApplicable() 47 for (auto id : GetAcceptableSuccessors(ir_context, message_.block_id())) { in IsApplicable() 65 [ir_context](uint32_t id) { in IsApplicable() 66 return fuzzerutil::IsFreshId(ir_context, id); in IsApplicable() 71 opt::IRContext* ir_context, in Apply() argument 75 GetInstructionToPropagate(ir_context, message_.block_id()); in Apply() 81 auto successor_ids = GetAcceptableSuccessors(ir_context, message_.block_id()); in Apply() 86 inst_to_propagate->Clone(ir_context)); in Apply() 100 fuzzerutil::UpdateModuleIdBound(ir_context, new_result_id); in Apply() [all …]
|
D | transformation_outline_function.cpp | 51 opt::IRContext* ir_context, in IsApplicable() argument 58 message_.new_function_struct_return_type_id(), ir_context, in IsApplicable() 64 message_.new_function_type_id(), ir_context, in IsApplicable() 70 message_.new_function_id(), ir_context, in IsApplicable() 76 message_.new_function_region_entry_block(), ir_context, in IsApplicable() 82 message_.new_caller_result_id(), ir_context, in IsApplicable() 88 message_.new_callee_result_id(), ir_context, in IsApplicable() 95 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 102 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 109 auto block_label = ir_context->get_def_use_mgr()->GetDef(block_id); in IsApplicable() [all …]
|
D | transformation_move_instruction_down.cpp | 27 std::string GetExtensionSet(opt::IRContext* ir_context, in GetExtensionSet() argument 31 const auto* ext_inst_import = ir_context->get_def_use_mgr()->GetDef( in GetExtensionSet() 50 opt::IRContext* ir_context, in IsApplicable() argument 53 auto* inst = FindInstruction(message_.instruction(), ir_context); in IsApplicable() 59 if (!IsInstructionSupported(ir_context, *inst)) { in IsApplicable() 63 auto* inst_block = ir_context->get_instr_block(inst); in IsApplicable() 78 if (!IsSimpleInstruction(ir_context, *inst) && in IsApplicable() 79 !IsInstructionSupported(ir_context, *successor_it)) { in IsApplicable() 85 if (IsInstructionSupported(ir_context, *successor_it) && in IsApplicable() 86 !CanSafelySwapInstructions(ir_context, *inst, *successor_it, in IsApplicable() [all …]
|
D | transformation_add_function.cpp | 59 opt::IRContext* ir_context, in IsApplicable() argument 69 instruction.result_id(), ir_context, in IsApplicable() 80 message_.loop_limiter_variable_id(), ir_context, in IsApplicable() 86 loop_limiter_info.load_id(), ir_context, in IsApplicable() 91 loop_limiter_info.increment_id(), ir_context, in IsApplicable() 96 loop_limiter_info.compare_id(), ir_context, in IsApplicable() 101 loop_limiter_info.logical_op_id(), ir_context, in IsApplicable() 110 pair.first(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 114 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 127 auto cloned_module = fuzzerutil::CloneIRContext(ir_context); in IsApplicable() [all …]
|
D | force_render_red.cpp | 34 opt::Function* FindFragmentShaderEntryPoint(opt::IRContext* ir_context, in FindFragmentShaderEntryPoint() argument 38 for (auto& capability : ir_context->capabilities()) { in FindFragmentShaderEntryPoint() 53 for (auto& entry_point : ir_context->module()->entry_points()) { in FindFragmentShaderEntryPoint() 66 for (auto& function : *ir_context->module()) { in FindFragmentShaderEntryPoint() 80 opt::Instruction* FindVec4OutputVariable(opt::IRContext* ir_context, in FindVec4OutputVariable() argument 83 for (auto& inst : ir_context->types_values()) { in FindVec4OutputVariable() 102 auto output_variable_base_type = ir_context->get_type_mgr() in FindVec4OutputVariable() 121 opt::IRContext* ir_context, opt::analysis::Float* float_type) { in FindOrCreateFloatZeroAndOne() argument 127 auto constant_zero = ir_context->get_constant_mgr()->RegisterConstant( in FindOrCreateFloatZeroAndOne() 129 auto constant_one = ir_context->get_constant_mgr()->RegisterConstant( in FindOrCreateFloatZeroAndOne() [all …]
|
D | transformation_composite_insert.cpp | 42 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 44 if (!fuzzerutil::IsFreshId(ir_context, message_.fresh_id())) { in IsApplicable() 50 ir_context->get_def_use_mgr()->GetDef(message_.composite_id()); in IsApplicable() 52 if (!IsCompositeInstructionSupported(ir_context, composite)) { in IsApplicable() 59 ir_context, composite->type_id(), message_.index()); in IsApplicable() 66 ir_context->get_def_use_mgr()->GetDef(message_.object_id()); in IsApplicable() 73 ir_context->get_type_mgr()->GetType(object_instruction->type_id()); in IsApplicable() 86 FindInstruction(message_.instruction_to_insert_before(), ir_context); in IsApplicable() 94 ir_context, instruction_to_insert_before, message_.composite_id())) { in IsApplicable() 98 ir_context, instruction_to_insert_before, message_.object_id())) { in IsApplicable() [all …]
|
D | transformation_vector_shuffle.cpp | 42 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 44 if (!fuzzerutil::IsFreshId(ir_context, message_.fresh_id())) { in IsApplicable() 49 FindInstruction(message_.instruction_to_insert_before(), ir_context); in IsApplicable() 55 ir_context->get_def_use_mgr()->GetDef(message_.vector1()); in IsApplicable() 61 ir_context->get_def_use_mgr()->GetDef(message_.vector2()); in IsApplicable() 66 ir_context->get_type_mgr()->GetType(vector1_instruction->type_id()); in IsApplicable() 72 ir_context->get_type_mgr()->GetType(vector2_instruction->type_id()); in IsApplicable() 94 if (!GetResultTypeId(ir_context, *vector1_type->AsVector()->element_type())) { in IsApplicable() 100 if (auto block = ir_context->get_instr_block(used_instruction)) { in IsApplicable() 101 if (!ir_context->GetDominatorAnalysis(block->GetParent()) in IsApplicable() [all …]
|
D | transformation_mutate_pointer.cpp | 36 opt::IRContext* ir_context, in IsApplicable() argument 39 if (!fuzzerutil::IsFreshId(ir_context, message_.fresh_id())) { in IsApplicable() 44 FindInstruction(message_.insert_before(), ir_context); in IsApplicable() 60 ir_context->get_def_use_mgr()->GetDef(message_.pointer_id()); in IsApplicable() 63 if (!pointer_inst || !IsValidPointerInstruction(ir_context, *pointer_inst)) { in IsApplicable() 71 ir_context, transformation_context, in IsApplicable() 72 fuzzerutil::GetPointeeTypeIdFromPointerType(ir_context, in IsApplicable() 80 ir_context, insert_before_inst, constant_id) && in IsApplicable() 86 ir_context, insert_before_inst, pointer_inst->result_id()); in IsApplicable() 90 opt::IRContext* ir_context, in Apply() argument [all …]
|
/external/deqp-deps/SPIRV-Tools/source/fuzz/ |
D | transformation_replace_linear_algebra_instruction.cpp | 40 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 42 FindInstruction(message_.instruction_descriptor(), ir_context); in IsApplicable() 52 GetRequiredFreshIdCount(ir_context, instruction)) { in IsApplicable() 58 if (!fuzzerutil::IsFreshId(ir_context, fresh_id)) { in IsApplicable() 67 opt::IRContext* ir_context, TransformationContext* /*unused*/) const { in Apply() argument 69 FindInstruction(message_.instruction_descriptor(), ir_context); in Apply() 73 ReplaceOpTranspose(ir_context, linear_algebra_instruction); in Apply() 76 ReplaceOpVectorTimesScalar(ir_context, linear_algebra_instruction); in Apply() 79 ReplaceOpMatrixTimesScalar(ir_context, linear_algebra_instruction); in Apply() 82 ReplaceOpVectorTimesMatrix(ir_context, linear_algebra_instruction); in Apply() [all …]
|
D | transformation_access_chain.cpp | 50 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 56 message_.fresh_id(), ir_context, &fresh_ids_used)) { in IsApplicable() 60 auto pointer = ir_context->get_def_use_mgr()->GetDef(message_.pointer_id()); in IsApplicable() 65 auto pointer_type = ir_context->get_def_use_mgr()->GetDef(pointer->type_id()); in IsApplicable() 73 FindInstruction(message_.instruction_to_insert_before(), ir_context); in IsApplicable() 99 ir_context, instruction_to_insert_before, message_.pointer_id())) { in IsApplicable() 119 if (ir_context->get_def_use_mgr()->GetDef(subobject_type_id)->opcode() == in IsApplicable() 125 GetIndexValue(ir_context, index_id, subobject_type_id); in IsApplicable() 150 fresh_ids.first(), ir_context, &fresh_ids_used) || in IsApplicable() 152 fresh_ids.second(), ir_context, &fresh_ids_used)) { in IsApplicable() [all …]
|
D | transformation_move_instruction_down.cpp | 27 std::string GetExtensionSet(opt::IRContext* ir_context, in GetExtensionSet() argument 31 const auto* ext_inst_import = ir_context->get_def_use_mgr()->GetDef( in GetExtensionSet() 50 opt::IRContext* ir_context, in IsApplicable() argument 53 auto* inst = FindInstruction(message_.instruction(), ir_context); in IsApplicable() 59 if (!IsInstructionSupported(ir_context, *inst)) { in IsApplicable() 63 auto* inst_block = ir_context->get_instr_block(inst); in IsApplicable() 78 if (!IsSimpleInstruction(ir_context, *inst) && in IsApplicable() 79 !IsInstructionSupported(ir_context, *successor_it)) { in IsApplicable() 85 if (IsInstructionSupported(ir_context, *successor_it) && in IsApplicable() 86 !CanSafelySwapInstructions(ir_context, *inst, *successor_it, in IsApplicable() [all …]
|
D | transformation_outline_function.cpp | 51 opt::IRContext* ir_context, in IsApplicable() argument 58 message_.new_function_struct_return_type_id(), ir_context, in IsApplicable() 64 message_.new_function_type_id(), ir_context, in IsApplicable() 70 message_.new_function_id(), ir_context, in IsApplicable() 76 message_.new_function_region_entry_block(), ir_context, in IsApplicable() 82 message_.new_caller_result_id(), ir_context, in IsApplicable() 88 message_.new_callee_result_id(), ir_context, in IsApplicable() 95 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 102 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 109 auto block_label = ir_context->get_def_use_mgr()->GetDef(block_id); in IsApplicable() [all …]
|
D | transformation_add_function.cpp | 59 opt::IRContext* ir_context, in IsApplicable() argument 69 instruction.result_id(), ir_context, in IsApplicable() 80 message_.loop_limiter_variable_id(), ir_context, in IsApplicable() 86 loop_limiter_info.load_id(), ir_context, in IsApplicable() 91 loop_limiter_info.increment_id(), ir_context, in IsApplicable() 96 loop_limiter_info.compare_id(), ir_context, in IsApplicable() 101 loop_limiter_info.logical_op_id(), ir_context, in IsApplicable() 110 pair.first(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 114 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 127 auto cloned_module = fuzzerutil::CloneIRContext(ir_context); in IsApplicable() [all …]
|
D | transformation_propagate_instruction_down.cpp | 37 opt::IRContext* ir_context, in IsApplicable() argument 40 if (!IsApplicableToBlock(ir_context, message_.block_id())) { in IsApplicable() 47 for (auto id : GetAcceptableSuccessors(ir_context, message_.block_id())) { in IsApplicable() 65 [ir_context](uint32_t id) { in IsApplicable() 66 return fuzzerutil::IsFreshId(ir_context, id); in IsApplicable() 71 opt::IRContext* ir_context, in Apply() argument 75 GetInstructionToPropagate(ir_context, message_.block_id()); in Apply() 81 auto successor_ids = GetAcceptableSuccessors(ir_context, message_.block_id()); in Apply() 86 inst_to_propagate->Clone(ir_context)); in Apply() 100 fuzzerutil::UpdateModuleIdBound(ir_context, new_result_id); in Apply() [all …]
|
D | force_render_red.cpp | 36 opt::Function* FindFragmentShaderEntryPoint(opt::IRContext* ir_context, in FindFragmentShaderEntryPoint() argument 40 for (auto& capability : ir_context->capabilities()) { in FindFragmentShaderEntryPoint() 55 for (auto& entry_point : ir_context->module()->entry_points()) { in FindFragmentShaderEntryPoint() 68 for (auto& function : *ir_context->module()) { in FindFragmentShaderEntryPoint() 82 opt::Instruction* FindVec4OutputVariable(opt::IRContext* ir_context, in FindVec4OutputVariable() argument 85 for (auto& inst : ir_context->types_values()) { in FindVec4OutputVariable() 104 auto output_variable_base_type = ir_context->get_type_mgr() in FindVec4OutputVariable() 123 opt::IRContext* ir_context, opt::analysis::Float* float_type) { in FindOrCreateFloatZeroAndOne() argument 129 auto constant_zero = ir_context->get_constant_mgr()->RegisterConstant( in FindOrCreateFloatZeroAndOne() 131 auto constant_one = ir_context->get_constant_mgr()->RegisterConstant( in FindOrCreateFloatZeroAndOne() [all …]
|
/external/swiftshader/third_party/SPIRV-Tools/source/fuzz/ |
D | transformation_replace_linear_algebra_instruction.cpp | 40 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 42 FindInstruction(message_.instruction_descriptor(), ir_context); in IsApplicable() 52 GetRequiredFreshIdCount(ir_context, instruction)) { in IsApplicable() 58 if (!fuzzerutil::IsFreshId(ir_context, fresh_id)) { in IsApplicable() 67 opt::IRContext* ir_context, TransformationContext* /*unused*/) const { in Apply() argument 69 FindInstruction(message_.instruction_descriptor(), ir_context); in Apply() 73 ReplaceOpTranspose(ir_context, linear_algebra_instruction); in Apply() 76 ReplaceOpVectorTimesScalar(ir_context, linear_algebra_instruction); in Apply() 79 ReplaceOpMatrixTimesScalar(ir_context, linear_algebra_instruction); in Apply() 82 ReplaceOpVectorTimesMatrix(ir_context, linear_algebra_instruction); in Apply() [all …]
|
D | transformation_access_chain.cpp | 50 opt::IRContext* ir_context, const TransformationContext& /*unused*/) const { in IsApplicable() argument 56 message_.fresh_id(), ir_context, &fresh_ids_used)) { in IsApplicable() 60 auto pointer = ir_context->get_def_use_mgr()->GetDef(message_.pointer_id()); in IsApplicable() 65 auto pointer_type = ir_context->get_def_use_mgr()->GetDef(pointer->type_id()); in IsApplicable() 73 FindInstruction(message_.instruction_to_insert_before(), ir_context); in IsApplicable() 99 ir_context, instruction_to_insert_before, message_.pointer_id())) { in IsApplicable() 119 if (ir_context->get_def_use_mgr()->GetDef(subobject_type_id)->opcode() == in IsApplicable() 125 GetIndexValue(ir_context, index_id, subobject_type_id); in IsApplicable() 150 fresh_ids.first(), ir_context, &fresh_ids_used) || in IsApplicable() 152 fresh_ids.second(), ir_context, &fresh_ids_used)) { in IsApplicable() [all …]
|
D | transformation_move_instruction_down.cpp | 27 std::string GetExtensionSet(opt::IRContext* ir_context, in GetExtensionSet() argument 31 const auto* ext_inst_import = ir_context->get_def_use_mgr()->GetDef( in GetExtensionSet() 50 opt::IRContext* ir_context, in IsApplicable() argument 53 auto* inst = FindInstruction(message_.instruction(), ir_context); in IsApplicable() 59 if (!IsInstructionSupported(ir_context, *inst)) { in IsApplicable() 63 auto* inst_block = ir_context->get_instr_block(inst); in IsApplicable() 78 if (!IsSimpleInstruction(ir_context, *inst) && in IsApplicable() 79 !IsInstructionSupported(ir_context, *successor_it)) { in IsApplicable() 85 if (IsInstructionSupported(ir_context, *successor_it) && in IsApplicable() 86 !CanSafelySwapInstructions(ir_context, *inst, *successor_it, in IsApplicable() [all …]
|
D | transformation_outline_function.cpp | 51 opt::IRContext* ir_context, in IsApplicable() argument 58 message_.new_function_struct_return_type_id(), ir_context, in IsApplicable() 64 message_.new_function_type_id(), ir_context, in IsApplicable() 70 message_.new_function_id(), ir_context, in IsApplicable() 76 message_.new_function_region_entry_block(), ir_context, in IsApplicable() 82 message_.new_caller_result_id(), ir_context, in IsApplicable() 88 message_.new_callee_result_id(), ir_context, in IsApplicable() 95 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 102 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 109 auto block_label = ir_context->get_def_use_mgr()->GetDef(block_id); in IsApplicable() [all …]
|
D | transformation_add_function.cpp | 59 opt::IRContext* ir_context, in IsApplicable() argument 69 instruction.result_id(), ir_context, in IsApplicable() 80 message_.loop_limiter_variable_id(), ir_context, in IsApplicable() 86 loop_limiter_info.load_id(), ir_context, in IsApplicable() 91 loop_limiter_info.increment_id(), ir_context, in IsApplicable() 96 loop_limiter_info.compare_id(), ir_context, in IsApplicable() 101 loop_limiter_info.logical_op_id(), ir_context, in IsApplicable() 110 pair.first(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 114 pair.second(), ir_context, &ids_used_by_this_transformation)) { in IsApplicable() 127 auto cloned_module = fuzzerutil::CloneIRContext(ir_context); in IsApplicable() [all …]
|
D | transformation_propagate_instruction_down.cpp | 37 opt::IRContext* ir_context, in IsApplicable() argument 40 if (!IsApplicableToBlock(ir_context, message_.block_id())) { in IsApplicable() 47 for (auto id : GetAcceptableSuccessors(ir_context, message_.block_id())) { in IsApplicable() 65 [ir_context](uint32_t id) { in IsApplicable() 66 return fuzzerutil::IsFreshId(ir_context, id); in IsApplicable() 71 opt::IRContext* ir_context, in Apply() argument 75 GetInstructionToPropagate(ir_context, message_.block_id()); in Apply() 81 auto successor_ids = GetAcceptableSuccessors(ir_context, message_.block_id()); in Apply() 86 inst_to_propagate->Clone(ir_context)); in Apply() 100 fuzzerutil::UpdateModuleIdBound(ir_context, new_result_id); in Apply() [all …]
|
D | force_render_red.cpp | 36 opt::Function* FindFragmentShaderEntryPoint(opt::IRContext* ir_context, in FindFragmentShaderEntryPoint() argument 40 for (auto& capability : ir_context->capabilities()) { in FindFragmentShaderEntryPoint() 55 for (auto& entry_point : ir_context->module()->entry_points()) { in FindFragmentShaderEntryPoint() 68 for (auto& function : *ir_context->module()) { in FindFragmentShaderEntryPoint() 82 opt::Instruction* FindVec4OutputVariable(opt::IRContext* ir_context, in FindVec4OutputVariable() argument 85 for (auto& inst : ir_context->types_values()) { in FindVec4OutputVariable() 104 auto output_variable_base_type = ir_context->get_type_mgr() in FindVec4OutputVariable() 123 opt::IRContext* ir_context, opt::analysis::Float* float_type) { in FindOrCreateFloatZeroAndOne() argument 129 auto constant_zero = ir_context->get_constant_mgr()->RegisterConstant( in FindOrCreateFloatZeroAndOne() 131 auto constant_one = ir_context->get_constant_mgr()->RegisterConstant( in FindOrCreateFloatZeroAndOne() [all …]
|