Lines Matching full:constants

39             const std::vector<const analysis::Constant*>& constants)  in FoldExtractWithConstants()
41 const analysis::Constant* c = constants[kExtractCompositeIdInIdx]; in FoldExtractWithConstants()
69 const std::vector<const analysis::Constant*>& constants) in FoldVectorShuffleWithConstants()
72 const analysis::Constant* c1 = constants[0]; in FoldVectorShuffleWithConstants()
73 const analysis::Constant* c2 = constants[1]; in FoldVectorShuffleWithConstants()
125 const std::vector<const analysis::Constant*>& constants) in FoldVectorTimesScalar()
137 const analysis::Constant* c1 = constants[0]; in FoldVectorTimesScalar()
138 const analysis::Constant* c2 = constants[1]; in FoldVectorTimesScalar()
199 // Folds an OpCompositeConstruct where all of the inputs are constants to a in FoldCompositeWithConstants()
202 const std::vector<const analysis::Constant*>& constants) in FoldCompositeWithConstants()
211 for (uint32_t i = 0; i < constants.size(); ++i) { in FoldCompositeWithConstants()
212 const analysis::Constant* element_const = constants[i]; in FoldCompositeWithConstants()
237 // will be |type|. The input constants must also be of type |type|.
244 // will be |type|. The input constants must also be of type |type|.
252 // that is returned assumes that |constants| contains 1 entry. If they are
257 const std::vector<const analysis::Constant*>& constants) in FoldFPUnaryOp()
269 (inst->opcode() == SpvOpExtInst) ? constants[1] : constants[0]; in FoldFPUnaryOp()
302 // Returns the result of folding the constants in |constants| according the
307 const std::vector<const analysis::Constant*>& constants, in FoldFPBinaryOp() argument
314 if (constants[0] == nullptr || constants[1] == nullptr) { in FoldFPBinaryOp()
323 a_components = constants[0]->GetVectorComponents(const_mgr); in FoldFPBinaryOp()
324 b_components = constants[1]->GetVectorComponents(const_mgr); in FoldFPBinaryOp()
343 return scalar_rule(result_type, constants[0], constants[1], const_mgr); in FoldFPBinaryOp()
350 // that |constants| contains 2 entries. If they are not |nullptr|, then their
354 const std::vector<const analysis::Constant*>& constants) in FoldFPBinaryOp()
361 {constants[1], constants[2]}, context); in FoldFPBinaryOp()
363 return FoldFPBinaryOp(scalar_rule, inst->type_id(), constants, context); in FoldFPBinaryOp()
576 // Folds an OpDot where all of the inputs are constants to a
580 const std::vector<const analysis::Constant*>& constants) in FoldOpDotWithConstants()
596 if (constants[i]) { in FoldOpDotWithConstants()
597 if (constants[i]->AsNullConstant() || in FoldOpDotWithConstants()
598 constants[i]->AsVectorConstant()->IsZero()) { in FoldOpDotWithConstants()
619 if (constants[0] == nullptr || constants[1] == nullptr) { in FoldOpDotWithConstants()
626 a_components = constants[0]->GetVectorComponents(const_mgr); in FoldOpDotWithConstants()
627 b_components = constants[1]->GetVectorComponents(const_mgr); in FoldOpDotWithConstants()
679 const std::vector<const analysis::Constant*>& constants) in FoldFClampFeedingCompare()
688 uint32_t non_const_idx = (constants[0] ? 1 : 0); in FoldFClampFeedingCompare()
713 if (constants[1] == nullptr && constants[0] == nullptr) { in FoldFClampFeedingCompare()
733 if (constants[0]) { in FoldFClampFeedingCompare()
735 if (constants[0]->GetValueAsDouble() < in FoldFClampFeedingCompare()
743 if (constants[0]->GetValueAsDouble() >= in FoldFClampFeedingCompare()
752 if (constants[1]) { in FoldFClampFeedingCompare()
755 constants[1]->GetValueAsDouble()) { in FoldFClampFeedingCompare()
764 constants[1]->GetValueAsDouble()) { in FoldFClampFeedingCompare()
776 if (constants[0]) { in FoldFClampFeedingCompare()
778 if (constants[0]->GetValueAsDouble() <= in FoldFClampFeedingCompare()
786 if (constants[0]->GetValueAsDouble() > in FoldFClampFeedingCompare()
795 if (constants[1]) { in FoldFClampFeedingCompare()
798 constants[1]->GetValueAsDouble()) { in FoldFClampFeedingCompare()
807 constants[1]->GetValueAsDouble()) { in FoldFClampFeedingCompare()
834 const std::vector<const analysis::Constant*>& constants) in FoldFMix()
849 // Make sure all FMix operands are constants. in FoldFMix()
851 if (constants[i] == nullptr) { in FoldFMix()
858 const analysis::Type* result_type = constants[1]->type(); in FoldFMix()
882 FOLD_FPARITH_OP(-), inst->type_id(), {one, constants[3]}, context); in FoldFMix()
888 FOLD_FPARITH_OP(*), inst->type_id(), {constants[1], temp1}, context); in FoldFMix()
894 {constants[2], constants[3]}, context); in FoldFMix()
997 const std::vector<const analysis::Constant*>& constants) { in FoldClamp1() argument
1004 // Make sure all Clamp operands are constants. in FoldClamp1()
1006 if (constants[i] == nullptr) { in FoldClamp1()
1012 FoldMax, inst->type_id(), {constants[1], constants[2]}, context); in FoldClamp1()
1016 return FoldFPBinaryOp(FoldMin, inst->type_id(), {temp, constants[3]}, in FoldClamp1()
1023 const std::vector<const analysis::Constant*>& constants) { in FoldClamp2() argument
1030 const analysis::Constant* x = constants[1]; in FoldClamp2()
1031 const analysis::Constant* min_val = constants[2]; in FoldClamp2()
1051 const std::vector<const analysis::Constant*>& constants) { in FoldClamp3() argument
1058 const analysis::Constant* x = constants[1]; in FoldClamp3()
1059 const analysis::Constant* max_val = constants[3]; in FoldClamp3()