/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 106 if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) { in FoldBitCast() 308 if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { in ReadDataFromGlobal() 1304 return ConstantFP::get(Ty->getContext(), APF); in GetConstantFoldFPValue() 1307 return ConstantFP::get(Ty->getContext(), APFloat((float)V)); in GetConstantFoldFPValue() 1309 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1386 static double getValueAsDouble(ConstantFP *Op) { in getValueAsDouble() 1405 if (ConstantFP *Op = dyn_cast<ConstantFP>(Operands[0])) { in ConstantFoldScalarCall() 1421 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() 1555 return ConstantFP::get(Ty->getContext(), Val); in ConstantFoldScalarCall() 1572 if (ConstantFP *FPOp = in ConstantFoldScalarCall() [all …]
|
/external/llvm/lib/IR/ |
D | Constants.cpp | 47 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNegativeZeroValue() 52 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isNegativeZeroValue() 68 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isZeroValue() 81 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNullValue() 94 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isAllOnesValue() 116 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isOneValue() 138 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isMinSignedValue() 160 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNotMinSignedValue() 183 return ConstantFP::get(Ty->getContext(), in getNullValue() 186 return ConstantFP::get(Ty->getContext(), in getNullValue() [all …]
|
D | ConstantFold.cpp | 157 if (isa<ConstantInt>(V) || isa<ConstantFP>(V)) in FoldBitCast() 175 return ConstantFP::get(DestTy->getContext(), in FoldBitCast() 184 if (ConstantFP *FP = dyn_cast<ConstantFP>(V)) { in FoldBitCast() 589 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 600 return ConstantFP::get(V->getContext(), Val); in ConstantFoldCastInstruction() 605 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 682 return ConstantFP::get(V->getContext(), apf); in ConstantFoldCastInstruction() 1163 } else if (ConstantFP *CFP1 = dyn_cast<ConstantFP>(C1)) { in ConstantFoldBinaryInstruction() 1164 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) { in ConstantFoldBinaryInstruction() 1173 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction() [all …]
|
/external/llvm/unittests/IR/ |
D | PatternMatch.cpp | 70 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 71 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F() 109 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 110 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F() 148 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 149 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F() 187 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 188 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F()
|
D | MDBuilderTest.cpp | 40 EXPECT_TRUE(mdconst::hasa<ConstantFP>(Op)); in TEST_F() 41 ConstantFP *Val = mdconst::extract<ConstantFP>(Op); in TEST_F()
|
/external/llvm/include/llvm/CodeGen/ |
D | MachineOperand.h | 23 class ConstantFP; variable 155 const ConstantFP *CFP; // For MO_FPImmediate. 417 const ConstantFP *getFPImm() const { in getFPImm() 509 void setFPImm(const ConstantFP *CFP) { in setFPImm() 555 void ChangeToFPImmediate(const ConstantFP *FPImm); 580 static MachineOperand CreateFPImm(const ConstantFP *CFP) { in CreateFPImm()
|
D | FastISel.h | 354 bool Op0IsKill, const ConstantFP *FPImm); 379 const ConstantFP *FPImm); 421 bool Op0IsKill, const ConstantFP *FPImm); 486 virtual unsigned fastMaterializeFloatZero(const ConstantFP *CF) { in fastMaterializeFloatZero()
|
/external/llvm/lib/CodeGen/AsmPrinter/ |
D | DebugLocEntry.h | 35 Value(const MDNode *Var, const MDNode *Expr, const ConstantFP *CFP) in Value() 62 const ConstantFP *CFP; 74 const ConstantFP *getConstantFP() const { return Constant.CFP; } in getConstantFP()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAddSub.cpp | 128 void set(const ConstantFP* Coefficient, Value *V) in set() 336 ConstantFP::get(Ty, float(IntVal)) : in getValue() 337 ConstantFP::get(Ty->getContext(), getFpVal()); in getValue() 360 ConstantFP *C0, *C1; in drillValueDownOneStep() 363 if ((C0 = dyn_cast<ConstantFP>(Opnd0)) && C0->isZero()) in drillValueDownOneStep() 366 if ((C1 = dyn_cast<ConstantFP>(Opnd1)) && C1->isZero()) in drillValueDownOneStep() 397 if (ConstantFP *C = dyn_cast<ConstantFP>(V0)) { in drillValueDownOneStep() 402 if (ConstantFP *C = dyn_cast<ConstantFP>(V1)) { in drillValueDownOneStep() 497 if (ConstantFP *CFP = dyn_cast<ConstantFP>(NewAddSub)) { in performFactorization() 689 Result = ConstantFP::get(Instr->getType(), 0.0); in simplifyFAdd() [all …]
|
D | InstCombineSelect.cpp | 989 ConstantFP *CFPt, *CFPf; in visitSelectInst() 990 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 992 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 1001 ConstantFP *CFPt, *CFPf; in visitSelectInst() 1002 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 1004 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 1030 ConstantFP *CFPt, *CFPf; in visitSelectInst() 1031 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 1033 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 1042 ConstantFP *CFPt, *CFPf; in visitSelectInst() [all …]
|
D | InstCombineMulDivRem.cpp | 425 ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(C->getAggregateElement(I)); in isFiniteNonZeroFp() 432 return isa<ConstantFP>(C) && in isFiniteNonZeroFp() 433 cast<ConstantFP>(C)->getValueAPF().isFiniteNonZero(); in isFiniteNonZeroFp() 440 ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(C->getAggregateElement(I)); in isNormalFp() 447 return isa<ConstantFP>(C) && cast<ConstantFP>(C)->getValueAPF().isNormal(); in isNormalFp() 552 Constant *NegZero = ConstantFP::getNegativeZero(Op1->getType()); in visitFMul() 1182 if (!isa<ConstantFP>(Divisor)) // TODO: handle vectors. in CvtFDivConstToReciprocal() 1185 const APFloat &FpVal = cast<ConstantFP>(Divisor)->getValueAPF(); in CvtFDivConstToReciprocal() 1198 ConstantFP *R; in CvtFDivConstToReciprocal() 1199 R = ConstantFP::get(Dividend->getType()->getContext(), Reciprocal); in CvtFDivConstToReciprocal()
|
/external/llvm/lib/Transforms/Scalar/ |
D | Float2Int.cpp | 232 } else if (!isa<ConstantFP>(O)) { in walkBackwards() 304 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(O)) { in walkForwards() 448 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) { in convert()
|
D | Reassociate.cpp | 390 ConstantInt::getAllOnesValue(Ty) : ConstantFP::get(Ty, -1.0); in LowerNegateToMultiply() 1144 } else if (ConstantFP *FC1 = dyn_cast<ConstantFP>(Factor)) { in RemoveFactorFromExpression() 1145 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) { in RemoveFactorFromExpression() 1522 ConstantInt::get(Ty, NumFound) : ConstantFP::get(Ty, NumFound); in OptimizeAdd() 1635 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(Factor)) { in OptimizeAdd() 1639 Factor = ConstantFP::get(CF->getContext(), F); in OptimizeAdd() 1994 } else if (auto *CF = dyn_cast<ConstantFP>(C)) { in canonicalizeNegConstExpr() 2019 ConstantFP *CF = cast<ConstantFP>(C); in canonicalizeNegConstExpr() 2022 I->setOperand(ConstIdx, ConstantFP::get(CF->getContext(), Val)); in canonicalizeNegConstExpr() 2225 isa<ConstantFP>(Ops.back().Op) && in ReassociateExpression() [all …]
|
/external/llvm/tools/llvm-stress/ |
D | llvm-stress.cpp | 157 return ConstantFP::getAllOnesValue(Tp); in getRandomConstant() 158 return ConstantFP::getNullValue(Tp); in getRandomConstant() 179 return ConstantFP::getAllOnesValue(Tp); in getRandomValue() 180 return ConstantFP::getNullValue(Tp); in getRandomValue() 387 return PT->push_back(ConstantFP::getNullValue(Ty)); in Act() 388 return PT->push_back(ConstantFP::get(Ty->getContext(), RandomFloat)); in Act()
|
/external/llvm/examples/Kaleidoscope/Chapter5/ |
D | toy.cpp | 518 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 577 CondV, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "ifcond"); in Codegen() 683 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 695 EndCond, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "loopcond"); in Codegen()
|
/external/llvm/examples/Kaleidoscope/MCJIT/cached/ |
D | toy-jit.cpp | 642 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 744 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 850 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 865 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 908 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in Codegen()
|
/external/llvm/examples/Kaleidoscope/Chapter7/ |
D | toy.cpp | 687 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 790 CondV, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "ifcond"); in Codegen() 901 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 917 EndCond, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "loopcond"); in Codegen() 960 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in Codegen()
|
/external/llvm/examples/Kaleidoscope/MCJIT/lazy/ |
D | toy-jit.cpp | 627 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 726 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 832 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 847 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 890 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in Codegen()
|
D | toy.cpp | 911 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 1006 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 1112 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 1127 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 1170 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in Codegen()
|
/external/llvm/examples/Kaleidoscope/Chapter6/ |
D | toy.cpp | 606 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 685 CondV, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "ifcond"); in Codegen() 791 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 803 EndCond, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "loopcond"); in Codegen()
|
/external/llvm/examples/Kaleidoscope/Orc/lazy_irgen/ |
D | toy.cpp | 755 return ConstantFP::get(C.getLLVMContext(), APFloat(Val)); in IRGen() 850 ConstantFP *FPZero = in IRGen() 851 ConstantFP::get(C.getLLVMContext(), APFloat(0.0)); in IRGen() 957 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in IRGen() 972 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in IRGen() 1015 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in IRGen()
|
/external/llvm/examples/Kaleidoscope/Orc/initial/ |
D | toy.cpp | 755 return ConstantFP::get(C.getLLVMContext(), APFloat(Val)); in IRGen() 850 ConstantFP *FPZero = in IRGen() 851 ConstantFP::get(C.getLLVMContext(), APFloat(0.0)); in IRGen() 957 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in IRGen() 972 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in IRGen() 1015 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in IRGen()
|
/external/llvm/examples/Kaleidoscope/Orc/lazy_codegen/ |
D | toy.cpp | 755 return ConstantFP::get(C.getLLVMContext(), APFloat(Val)); in IRGen() 850 ConstantFP *FPZero = in IRGen() 851 ConstantFP::get(C.getLLVMContext(), APFloat(0.0)); in IRGen() 957 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in IRGen() 972 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in IRGen() 1015 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in IRGen()
|
/external/llvm/lib/Transforms/Utils/ |
D | SimplifyLibCalls.cpp | 937 if (ConstantFP *Const = dyn_cast<ConstantFP>(Val)) { in valueHasFloatPrecision() 943 return ConstantFP::get(Const->getContext(), F); in valueHasFloatPrecision() 1055 if (ConstantFP *Op1C = dyn_cast<ConstantFP>(Op1)) { in optimizePow() 1072 ConstantFP *Op2C = dyn_cast<ConstantFP>(Op2); in optimizePow() 1077 return ConstantFP::get(CI->getType(), 1.0); in optimizePow() 1089 Value *Inf = ConstantFP::getInfinity(CI->getType()); in optimizePow() 1090 Value *NegInf = ConstantFP::getInfinity(CI->getType(), true); in optimizePow() 1104 return B.CreateFDiv(ConstantFP::get(CI->getType(), 1.0), Op1, "powrecip"); in optimizePow() 1145 Constant *One = ConstantFP::get(CI->getContext(), APFloat(1.0f)); in optimizeExp2()
|
/external/llvm/include/llvm/IR/ |
D | Constants.h | 228 class ConstantFP : public Constant { 232 ConstantFP(const ConstantFP &) = delete; 235 ConstantFP(Type *Ty, const APFloat& V); 253 static ConstantFP *get(LLVMContext &Context, const APFloat &V);
|