/third_party/spirv-tools/source/opt/ |
D | const_folding_rules.cpp | 28 analysis::ConstantManager* const_mgr) { in GetNan() argument 36 return const_mgr->GetFloatConst(std::numeric_limits<float>::quiet_NaN()); in GetNan() 38 return const_mgr->GetDoubleConst( in GetNan() 48 analysis::ConstantManager* const_mgr) { in GetInf() argument 56 return const_mgr->GetFloatConst(std::numeric_limits<float>::infinity()); in GetInf() 58 return const_mgr->GetDoubleConst(std::numeric_limits<double>::infinity()); in GetInf() 79 analysis::ConstantManager* const_mgr) { in NegateFPConst() argument 84 return const_mgr->GetFloatConst(-fa); in NegateFPConst() 87 return const_mgr->GetDoubleConst(-da); in NegateFPConst() 106 analysis::ConstantManager* const_mgr = context->get_constant_mgr(); in FoldExtractWithConstants() local [all …]
|
D | fold_spec_constant_op_and_composite_pass.cpp | 31 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in Process() local 66 if (const_mgr->GetType(inst) && in Process() 67 !const_mgr->GetType(inst)->decoration_empty()) in Process() 84 if (auto const_value = const_mgr->GetConstantFromInst(inst)) { in Process() 91 const_mgr->MapConstantToInst(const_value, inst); in Process() 149 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in FoldWithInstructionFolder() local 159 if (const_mgr->FindDeclaredConstant(id) == nullptr) { in FoldWithInstructionFolder() 206 const_mgr->MapInst(new_const_inst); in FoldWithInstructionFolder() 290 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in DoComponentWiseOperation() local 291 const analysis::Type* result_type = const_mgr->GetType(inst); in DoComponentWiseOperation() [all …]
|
D | folding_rules.cpp | 164 analysis::ConstantManager* const_mgr, const analysis::Constant* c) { in GetWordsFromNumericScalarOrVectorConstant() argument 173 GetWordsFromNumericScalarOrVectorConstant(const_mgr, comp); in GetWordsFromNumericScalarOrVectorConstant() 182 analysis::ConstantManager* const_mgr, const std::vector<uint32_t>& words, in ConvertWordsToNumericScalarOrVectorConstant() argument 185 return const_mgr->GetConstant(type, words); in ConvertWordsToNumericScalarOrVectorConstant() 187 return const_mgr->GetNumericVectorConstantWithWords(vec_type, words); in ConvertWordsToNumericScalarOrVectorConstant() 193 uint32_t NegateFloatingPointConstant(analysis::ConstantManager* const_mgr, in NegateFloatingPointConstant() argument 209 const_mgr->GetConstant(c->type(), std::move(words)); in NegateFloatingPointConstant() 210 return const_mgr->GetDefiningInstruction(negated_const)->result_id(); in NegateFloatingPointConstant() 214 uint32_t NegateIntegerConstant(analysis::ConstantManager* const_mgr, in NegateIntegerConstant() argument 229 const_mgr->GetConstant(c->type(), std::move(words)); in NegateIntegerConstant() [all …]
|
D | amd_ext_to_khr.cpp | 215 analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); in ReplaceSwizzleInvocations() local 261 const auto* ballot_value_const = const_mgr->GetConstant( in ReplaceSwizzleInvocations() 265 const_mgr->GetDefiningInstruction(ballot_value_const); in ReplaceSwizzleInvocations() 274 const auto* null = const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), in ReplaceSwizzleInvocations() 276 Instruction* null_inst = const_mgr->GetDefiningInstruction(null); in ReplaceSwizzleInvocations() 328 analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); in ReplaceSwizzleInvocationsMasked() local 376 const auto* ballot_value_const = const_mgr->GetConstant( in ReplaceSwizzleInvocationsMasked() 380 const_mgr->GetDefiningInstruction(ballot_value_const); in ReplaceSwizzleInvocationsMasked() 389 const auto* null = const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), in ReplaceSwizzleInvocationsMasked() 391 Instruction* null_inst = const_mgr->GetDefiningInstruction(null); in ReplaceSwizzleInvocationsMasked() [all …]
|
D | copy_prop_arrays.cpp | 360 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromInsert() local 369 const_mgr->FindDeclaredConstant(array_type->LengthId()); in BuildMemoryObjectFromInsert() 460 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in IsAccessChainIndexValidAndEqualTo() local 462 const_mgr->FindDeclaredConstant(entry.result_id); in IsAccessChainIndexValidAndEqualTo() 482 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in CanUpdateUses() local 497 const_mgr, in CanUpdateUses() 519 const_mgr->FindDeclaredConstant(use->GetSingleWordInOperand(i)); in CanUpdateUses() 585 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in UpdateUses() local 671 const_mgr->FindDeclaredConstant(use->GetSingleWordInOperand(i)); in UpdateUses() 831 analysis::ConstantManager* const_mgr = in GetAccessIds() local [all …]
|
D | reduce_load_size.cpp | 57 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in ReplaceExtract() local 107 const_mgr->GetConstant(uint32_type, {index}); in ReplaceExtract() 108 ids.push_back(const_mgr->GetDefiningInstruction(index_const)->result_id()); in ReplaceExtract() 156 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in ShouldReplaceExtract() local 163 const_mgr->FindDeclaredConstant(load_type->AsArray()->LengthId()); in ShouldReplaceExtract()
|
D | pass.cpp | 79 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GetNullId() local 81 const analysis::Constant* null_const = const_mgr->GetConstant(type, {}); in GetNullId() 83 const_mgr->GetDefiningInstruction(null_const, type_id); in GetNullId() 90 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GenerateCopy() local 115 const_mgr->FindDeclaredConstant(original_array_type->LengthId()); in GenerateCopy()
|
D | replace_invalid_opc.cpp | 182 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GetSpecialConstant() local 193 special_const = const_mgr->GetConstant(type_mgr->GetType(type_id), ids); in GetSpecialConstant() 201 const_mgr->GetConstant(type_mgr->GetType(type_id), literal_words); in GetSpecialConstant() 204 return const_mgr->GetDefiningInstruction(special_const)->result_id(); in GetSpecialConstant()
|
D | fold.cpp | 628 analysis::ConstantManager* const_mgr = context_->get_constant_mgr(); in FoldInstructionToConstant() local 636 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant() 639 const analysis::Constant* const_op = const_mgr->FindDeclaredConstant(id); in FoldInstructionToConstant() 653 const_mgr->GetDefiningInstruction(folded_const, inst->type_id()); in FoldInstructionToConstant() 678 const_mgr->GetConstant(const_mgr->GetType(inst), {result_val}); in FoldInstructionToConstant() 680 const_mgr->GetDefiningInstruction(result_const, inst->type_id()); in FoldInstructionToConstant()
|
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | const_folding_rules.cpp | 28 analysis::ConstantManager* const_mgr) { in GetNan() argument 36 return const_mgr->GetFloatConst(std::numeric_limits<float>::quiet_NaN()); in GetNan() 38 return const_mgr->GetDoubleConst( in GetNan() 48 analysis::ConstantManager* const_mgr) { in GetInf() argument 56 return const_mgr->GetFloatConst(std::numeric_limits<float>::infinity()); in GetInf() 58 return const_mgr->GetDoubleConst(std::numeric_limits<double>::infinity()); in GetInf() 79 analysis::ConstantManager* const_mgr) { in negateFPConst() argument 84 return const_mgr->GetFloatConst(-fa); in negateFPConst() 87 return const_mgr->GetDoubleConst(-da); in negateFPConst() 106 analysis::ConstantManager* const_mgr = context->get_constant_mgr(); in FoldExtractWithConstants() local [all …]
|
D | folding_rules.cpp | 161 analysis::ConstantManager* const_mgr, const analysis::Constant* c) { in GetWordsFromNumericScalarOrVectorConstant() argument 170 GetWordsFromNumericScalarOrVectorConstant(const_mgr, comp); in GetWordsFromNumericScalarOrVectorConstant() 179 analysis::ConstantManager* const_mgr, const std::vector<uint32_t>& words, in ConvertWordsToNumericScalarOrVectorConstant() argument 182 return const_mgr->GetConstant(type, words); in ConvertWordsToNumericScalarOrVectorConstant() 184 return const_mgr->GetNumericVectorConstantWithWords(vec_type, words); in ConvertWordsToNumericScalarOrVectorConstant() 190 uint32_t NegateFloatingPointConstant(analysis::ConstantManager* const_mgr, in NegateFloatingPointConstant() argument 206 const_mgr->GetConstant(c->type(), std::move(words)); in NegateFloatingPointConstant() 207 return const_mgr->GetDefiningInstruction(negated_const)->result_id(); in NegateFloatingPointConstant() 211 uint32_t NegateIntegerConstant(analysis::ConstantManager* const_mgr, in NegateIntegerConstant() argument 226 const_mgr->GetConstant(c->type(), std::move(words)); in NegateIntegerConstant() [all …]
|
D | amd_ext_to_khr.cpp | 215 analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); in ReplaceSwizzleInvocations() local 261 const auto* ballot_value_const = const_mgr->GetConstant( in ReplaceSwizzleInvocations() 265 const_mgr->GetDefiningInstruction(ballot_value_const); in ReplaceSwizzleInvocations() 274 const auto* null = const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), in ReplaceSwizzleInvocations() 276 Instruction* null_inst = const_mgr->GetDefiningInstruction(null); in ReplaceSwizzleInvocations() 328 analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); in ReplaceSwizzleInvocationsMasked() local 376 const auto* ballot_value_const = const_mgr->GetConstant( in ReplaceSwizzleInvocationsMasked() 380 const_mgr->GetDefiningInstruction(ballot_value_const); in ReplaceSwizzleInvocationsMasked() 389 const auto* null = const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), in ReplaceSwizzleInvocationsMasked() 391 Instruction* null_inst = const_mgr->GetDefiningInstruction(null); in ReplaceSwizzleInvocationsMasked() [all …]
|
D | copy_prop_arrays.cpp | 271 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromExtract() local 287 const_mgr->GetConstant(uint32_type, {index}); in BuildMemoryObjectFromExtract() 289 const_mgr->GetDefiningInstruction(index_const)->result_id()); in BuildMemoryObjectFromExtract() 318 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromCompositeConstruct() local 320 const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); in BuildMemoryObjectFromCompositeConstruct() 353 const_mgr->FindDeclaredConstant(member_object->AccessChain().back()); in BuildMemoryObjectFromCompositeConstruct() 372 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromInsert() local 381 const_mgr->FindDeclaredConstant(array_type->LengthId()); in BuildMemoryObjectFromInsert() 413 const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); in BuildMemoryObjectFromInsert() 460 const_mgr->FindDeclaredConstant( in BuildMemoryObjectFromInsert() [all …]
|
D | reduce_load_size.cpp | 57 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in ReplaceExtract() local 107 const_mgr->GetConstant(uint32_type, {index}); in ReplaceExtract() 108 ids.push_back(const_mgr->GetDefiningInstruction(index_const)->result_id()); in ReplaceExtract() 156 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in ShouldReplaceExtract() local 163 const_mgr->FindDeclaredConstant(load_type->AsArray()->LengthId()); in ShouldReplaceExtract()
|
D | pass.cpp | 79 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GetNullId() local 81 const analysis::Constant* null_const = const_mgr->GetConstant(type, {}); in GetNullId() 83 const_mgr->GetDefiningInstruction(null_const, type_id); in GetNullId() 90 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GenerateCopy() local 115 const_mgr->FindDeclaredConstant(original_array_type->LengthId()); in GenerateCopy()
|
D | replace_invalid_opc.cpp | 183 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GetSpecialConstant() local 194 special_const = const_mgr->GetConstant(type_mgr->GetType(type_id), ids); in GetSpecialConstant() 202 const_mgr->GetConstant(type_mgr->GetType(type_id), literal_words); in GetSpecialConstant() 205 return const_mgr->GetDefiningInstruction(special_const)->result_id(); in GetSpecialConstant()
|
D | fold.cpp | 628 analysis::ConstantManager* const_mgr = context_->get_constant_mgr(); in FoldInstructionToConstant() local 637 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant() 640 const analysis::Constant* const_op = const_mgr->FindDeclaredConstant(id); in FoldInstructionToConstant() 654 const_mgr->GetDefiningInstruction(folded_const, inst->type_id()); in FoldInstructionToConstant() 679 const_mgr->GetConstant(const_mgr->GetType(inst), {result_val}); in FoldInstructionToConstant() 681 const_mgr->GetDefiningInstruction(result_const, inst->type_id()); in FoldInstructionToConstant()
|
/third_party/skia/third_party/externals/spirv-tools/source/opt/ |
D | const_folding_rules.cpp | 50 analysis::ConstantManager* const_mgr = context->get_constant_mgr(); in FoldExtractWithConstants() local 52 return const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), {}); in FoldExtractWithConstants() 78 analysis::ConstantManager* const_mgr = context->get_constant_mgr(); in FoldVectorShuffleWithConstants() local 87 const_mgr->GetConstant(element_type, {}); in FoldVectorShuffleWithConstants() 96 const_mgr->GetConstant(element_type, {}); in FoldVectorShuffleWithConstants() 109 const_mgr->GetDefiningInstruction(c1_components[index]); in FoldVectorShuffleWithConstants() 112 Instruction* member_inst = const_mgr->GetDefiningInstruction( in FoldVectorShuffleWithConstants() 119 return const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), ids); in FoldVectorShuffleWithConstants() 128 analysis::ConstantManager* const_mgr = context->get_constant_mgr(); in FoldVectorTimesScalar() local 147 return const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), ids); in FoldVectorTimesScalar() [all …]
|
D | folding_rules.cpp | 161 analysis::ConstantManager* const_mgr, const analysis::Constant* c) { in GetWordsFromNumericScalarOrVectorConstant() argument 170 GetWordsFromNumericScalarOrVectorConstant(const_mgr, comp); in GetWordsFromNumericScalarOrVectorConstant() 179 analysis::ConstantManager* const_mgr, const std::vector<uint32_t>& words, in ConvertWordsToNumericScalarOrVectorConstant() argument 182 return const_mgr->GetConstant(type, words); in ConvertWordsToNumericScalarOrVectorConstant() 184 return const_mgr->GetNumericVectorConstantWithWords(vec_type, words); in ConvertWordsToNumericScalarOrVectorConstant() 190 uint32_t NegateFloatingPointConstant(analysis::ConstantManager* const_mgr, in NegateFloatingPointConstant() argument 206 const_mgr->GetConstant(c->type(), std::move(words)); in NegateFloatingPointConstant() 207 return const_mgr->GetDefiningInstruction(negated_const)->result_id(); in NegateFloatingPointConstant() 211 uint32_t NegateIntegerConstant(analysis::ConstantManager* const_mgr, in NegateIntegerConstant() argument 226 const_mgr->GetConstant(c->type(), std::move(words)); in NegateIntegerConstant() [all …]
|
D | amd_ext_to_khr.cpp | 215 analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); in ReplaceSwizzleInvocations() local 261 const auto* ballot_value_const = const_mgr->GetConstant( in ReplaceSwizzleInvocations() 265 const_mgr->GetDefiningInstruction(ballot_value_const); in ReplaceSwizzleInvocations() 274 const auto* null = const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), in ReplaceSwizzleInvocations() 276 Instruction* null_inst = const_mgr->GetDefiningInstruction(null); in ReplaceSwizzleInvocations() 328 analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); in ReplaceSwizzleInvocationsMasked() local 376 const auto* ballot_value_const = const_mgr->GetConstant( in ReplaceSwizzleInvocationsMasked() 380 const_mgr->GetDefiningInstruction(ballot_value_const); in ReplaceSwizzleInvocationsMasked() 389 const auto* null = const_mgr->GetConstant(type_mgr->GetType(inst->type_id()), in ReplaceSwizzleInvocationsMasked() 391 Instruction* null_inst = const_mgr->GetDefiningInstruction(null); in ReplaceSwizzleInvocationsMasked() [all …]
|
D | copy_prop_arrays.cpp | 271 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromExtract() local 287 const_mgr->GetConstant(uint32_type, {index}); in BuildMemoryObjectFromExtract() 289 const_mgr->GetDefiningInstruction(index_const)->result_id()); in BuildMemoryObjectFromExtract() 318 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromCompositeConstruct() local 320 const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); in BuildMemoryObjectFromCompositeConstruct() 353 const_mgr->FindDeclaredConstant(member_object->AccessChain().back()); in BuildMemoryObjectFromCompositeConstruct() 372 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in BuildMemoryObjectFromInsert() local 381 const_mgr->FindDeclaredConstant(array_type->LengthId()); in BuildMemoryObjectFromInsert() 413 const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); in BuildMemoryObjectFromInsert() 460 const_mgr->FindDeclaredConstant( in BuildMemoryObjectFromInsert() [all …]
|
D | reduce_load_size.cpp | 57 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in ReplaceExtract() local 107 const_mgr->GetConstant(uint32_type, {index}); in ReplaceExtract() 108 ids.push_back(const_mgr->GetDefiningInstruction(index_const)->result_id()); in ReplaceExtract() 156 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in ShouldReplaceExtract() local 163 const_mgr->FindDeclaredConstant(load_type->AsArray()->LengthId()); in ShouldReplaceExtract()
|
D | pass.cpp | 79 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GetNullId() local 81 const analysis::Constant* null_const = const_mgr->GetConstant(type, {}); in GetNullId() 83 const_mgr->GetDefiningInstruction(null_const, type_id); in GetNullId() 90 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GenerateCopy() local 115 const_mgr->FindDeclaredConstant(original_array_type->LengthId()); in GenerateCopy()
|
D | replace_invalid_opc.cpp | 183 analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); in GetSpecialConstant() local 194 special_const = const_mgr->GetConstant(type_mgr->GetType(type_id), ids); in GetSpecialConstant() 202 const_mgr->GetConstant(type_mgr->GetType(type_id), literal_words); in GetSpecialConstant() 205 return const_mgr->GetDefiningInstruction(special_const)->result_id(); in GetSpecialConstant()
|
D | fold.cpp | 628 analysis::ConstantManager* const_mgr = context_->get_constant_mgr(); in FoldInstructionToConstant() local 637 inst->ForEachInId([&constants, &missing_constants, const_mgr, in FoldInstructionToConstant() 640 const analysis::Constant* const_op = const_mgr->FindDeclaredConstant(id); in FoldInstructionToConstant() 654 const_mgr->GetDefiningInstruction(folded_const, inst->type_id()); in FoldInstructionToConstant() 679 const_mgr->GetConstant(const_mgr->GetType(inst), {result_val}); in FoldInstructionToConstant() 681 const_mgr->GetDefiningInstruction(result_const, inst->type_id()); in FoldInstructionToConstant()
|