/arkcompiler/runtime_core/compiler/optimizer/optimizations/ |
H A D | lowering.cpp | 26 bool Lowering::ConstantFitsCompareImm(Inst *cst, uint32_t size, ConditionCode cc) in ConstantFitsCompareImm() argument 28 ASSERT(cst->GetOpcode() == Opcode::Constant); in ConstantFitsCompareImm() 29 if (DataType::IsFloatType(cst->GetType())) { in ConstantFitsCompareImm() 32 int64_t val = cst->CastToConstant()->GetRawValue(); in ConstantFitsCompareImm() 106 auto cst = input->GetInput(1).GetInst(); in LowerIf() local 115 if (cst->IsConst() && ConstantFitsCompareImm(cst, size, cc)) { in LowerIf() 117 InPlaceLowerIfImm(inst, input, cst, cc); in LowerIf() 136 void Lowering::InPlaceLowerIfImm(IfImmInst *inst, Inst *input, Inst *cst, ConditionCode cc) in InPlaceLowerIfImm() argument 142 uint64_t val = cst in InPlaceLowerIfImm() [all...] |
H A D | lowering.h | 57 static bool ConstantFitsCompareImm(Inst *cst, uint32_t size, ConditionCode cc); 63 static void InPlaceLowerIfImm(IfImmInst *inst, Inst *input, Inst *cst, ConditionCode cc);
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mpl2mpl/src/ |
H A D | constantfold.cpp | 802 const MIRIntConst *cst = safe_cast<MIRIntConst>(constNode.GetConstVal()); in FoldConstUnary() local 803 auto constValue = FoldIntConstUnaryMIRConst(opcode, resultType, cst); in FoldConstUnary() 837 ConstvalNode *cst = safe_cast<ConstvalNode>(p.first); in FoldUnary() local 838 if (cst != nullptr) { in FoldUnary() 839 result = FoldConstUnary(node->GetOpCode(), node->GetPrimType(), *cst); in FoldUnary() 924 ConstvalNode *ConstantFold::FoldCeil(const ConstvalNode &cst, PrimType fromType, PrimType toType) const in FoldCeil() argument 930 const MIRFloatConst *constValue = safe_cast<MIRFloatConst>(cst.GetConstVal()); in FoldCeil() 942 const MIRDoubleConst *constValue = safe_cast<MIRDoubleConst>(cst.GetConstVal()); in FoldCeil() 976 MIRConst *ConstantFold::FoldFloorMIRConst(const MIRConst &cst, PrimType fromType, PrimType toType, bool isFloor) const in FoldFloorMIRConst() argument 980 const auto &constValue = static_cast<const MIRFloatConst&>(cst); in FoldFloorMIRConst() 1011 FoldFloor(const ConstvalNode &cst, PrimType fromType, PrimType toType) const FoldFloor() argument 1019 FoldRoundMIRConst(const MIRConst &cst, PrimType fromType, PrimType toType) const FoldRoundMIRConst() argument 1071 FoldRound(const ConstvalNode &cst, PrimType fromType, PrimType toType) const FoldRound() argument 1079 FoldTrunc(const ConstvalNode &cst, PrimType fromType, PrimType toType) const FoldTrunc() argument 1112 FoldTypeCvtMIRConst(const MIRConst &cst, PrimType fromType, PrimType toType) const FoldTypeCvtMIRConst() argument 1172 FoldTypeCvt(const ConstvalNode &cst, PrimType fromType, PrimType toType) const FoldTypeCvt() argument 1274 ConstvalNode *cst = safe_cast<ConstvalNode>(p.first); FoldTypeCvt() local 1380 ConstvalNode *cst = safe_cast<ConstvalNode>(p.first); FoldExtractbits() local 1513 IntVal cst = mcst->GetValue(); FoldBinary() local 1574 IntVal cst = mcst->GetValue(); FoldBinary() local [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mpl2mpl/include/ |
H A D | constantfold.h | 47 MIRConst *FoldFloorMIRConst(const MIRConst &cst, PrimType fromType, PrimType toType, bool isFloor = true) const; 48 MIRConst *FoldRoundMIRConst(const MIRConst &cst, PrimType fromType, PrimType toType) const; 49 MIRConst *FoldTypeCvtMIRConst(const MIRConst &cst, PrimType fromType, PrimType toType) const; 62 ConstvalNode *FoldSignExtend(Opcode opcode, PrimType resultType, uint8 size, const ConstvalNode &cst) const; 67 ConstvalNode *FoldCeil(const ConstvalNode &cst, PrimType fromType, PrimType toType) const; 68 ConstvalNode *FoldFloor(const ConstvalNode &cst, PrimType fromType, PrimType toType) const; 69 ConstvalNode *FoldRound(const ConstvalNode &cst, PrimType fromType, PrimType toType) const; 70 ConstvalNode *FoldTrunc(const ConstvalNode &cst, PrimType fromType, PrimType toType) const; 71 ConstvalNode *FoldTypeCvt(const ConstvalNode &cst, PrimType fromType, PrimType toType) const;
|
/arkcompiler/runtime_core/static_core/bytecode_optimizer/ |
H A D | canonicalization.cpp | 44 static bool ConstantFitsCompareImm(const Inst *cst, uint32_t size) in ConstantFitsCompareImm() argument 46 ASSERT(cst->GetOpcode() == Opcode::Constant); in ConstantFitsCompareImm() 47 if (compiler::DataType::IsFloatType(cst->GetType())) { in ConstantFitsCompareImm() 50 auto val = cst->CastToConstant()->GetIntValue(); in ConstantFitsCompareImm()
|
/arkcompiler/runtime_core/static_core/libllvmbackend/object_code/ |
H A D | dump.cpp | 35 for (const auto &cst : stackmap->constants()) { in DumpStackMap() 36 stream << " LargeConstant [uint64] : " << cst.getValue() << std::endl; in DumpStackMap()
|
/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/ |
H A D | lowering.cpp | 720 bool Lowering::ConstantFitsCompareImm(Inst *cst, uint32_t size, ConditionCode cc) in ConstantFitsCompareImm() argument 722 ASSERT(cst->GetOpcode() == Opcode::Constant); in ConstantFitsCompareImm() 723 if (DataType::IsFloatType(cst->GetType())) { in ConstantFitsCompareImm() 726 auto *graph = cst->GetBasicBlock()->GetGraph(); in ConstantFitsCompareImm() 728 int64_t val = cst->CastToConstant()->GetRawValue(); in ConstantFitsCompareImm() 1325 auto cst = input->GetInput(1).GetInst(); in LowerIf() local 1334 if (cst->GetOpcode() == compiler::Opcode::NullPtr || (cst->IsConst() && ConstantFitsCompareImm(cst, size, cc))) { in LowerIf() 1336 InPlaceLowerIfImm(inst, input, cst, c in LowerIf() 1342 InPlaceLowerIfImm(IfImmInst *inst, Inst *input, Inst *cst, ConditionCode cc, DataType::Type inputType) InPlaceLowerIfImm() argument [all...] |
H A D | lowering.h | 375 static bool ConstantFitsCompareImm(Inst *cst, uint32_t size, ConditionCode cc); 401 static void InPlaceLowerIfImm(IfImmInst *inst, Inst *input, Inst *cst, ConditionCode cc, DataType::Type inputType);
|
/arkcompiler/runtime_core/bytecode_optimizer/constant_propagation/ |
H A D | constant_propagation.cpp | 196 auto cst = static_cast<uint64_t>(input_lattice->AsConstant()->GetValue<bool>()); in VisitIfImm() local 198 propagation->GetIfTargetBlock(inst->CastToIfImm(), cst) ? bb->GetTrueSuccessor() : bb->GetFalseSuccessor(); in VisitIfImm() 476 auto cst = lattice->GetValue<bool>(); in FoldingConstant() local 480 is_true_ins ? cst : !cst); in FoldingConstant()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/include/ |
H A D | global_tables.h | 704 void InsertConstPool(GStrIdx strIdx, MIRConst *cst) 706 (void)constMap.emplace(strIdx, cst);
|
/arkcompiler/runtime_core/static_core/compiler/tests/ |
H A D | peepholes_test.cpp | 85 void CheckCompare(ConditionCode cc, int64_t cst, std::optional<uint64_t> expCst, bool expInv) in CheckCompare() argument 90 CONSTANT(0U, cst); in CheckCompare() 4008 static bool CompareBoolWithConst(ConditionCode cc, bool input, int cst) in CompareBoolWithConst() argument 4012 return static_cast<int>(input) == cst; in CompareBoolWithConst() 4014 return static_cast<int>(input) != cst; in CompareBoolWithConst() 4016 return static_cast<int>(input) < cst; in CompareBoolWithConst() 4018 return static_cast<int>(input) <= cst; in CompareBoolWithConst() 4020 return static_cast<int>(input) > cst; in CompareBoolWithConst() 4022 return static_cast<int>(input) >= cst; in CompareBoolWithConst() 4024 return static_cast<uint64_t>(input) < static_cast<uint64_t>(cst); in CompareBoolWithConst() [all...] |