mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 03:39:03 +00:00
Rename ConstantFP's getInf to getInfinity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82823 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4b2ebc1928
commit
a23643d5b7
@ -258,7 +258,7 @@ public:
|
|||||||
static Constant* get(const Type* Ty, const StringRef& Str);
|
static Constant* get(const Type* Ty, const StringRef& Str);
|
||||||
static ConstantFP* get(LLVMContext &Context, const APFloat& V);
|
static ConstantFP* get(LLVMContext &Context, const APFloat& V);
|
||||||
static ConstantFP* getNegativeZero(const Type* Ty);
|
static ConstantFP* getNegativeZero(const Type* Ty);
|
||||||
static ConstantFP* getInf(const Type* Ty, bool negative = false);
|
static ConstantFP* getInfinity(const Type* Ty, bool negative = false);
|
||||||
|
|
||||||
/// isValueValidForType - return true if Ty is big enough to represent V.
|
/// isValueValidForType - return true if Ty is big enough to represent V.
|
||||||
static bool isValueValidForType(const Type *Ty, const APFloat& V);
|
static bool isValueValidForType(const Type *Ty, const APFloat& V);
|
||||||
|
@ -1034,8 +1034,8 @@ struct PowOpt : public LibCallOptimization {
|
|||||||
// and negative infinite correctly.
|
// and negative infinite correctly.
|
||||||
// TODO: In fast-math mode, this could be just sqrt(x).
|
// TODO: In fast-math mode, this could be just sqrt(x).
|
||||||
// TODO: In finite-only mode, this could be just fabs(sqrt(x)).
|
// TODO: In finite-only mode, this could be just fabs(sqrt(x)).
|
||||||
Value *Inf = ConstantFP::getInf(CI->getType());
|
Value *Inf = ConstantFP::getInfinity(CI->getType());
|
||||||
Value *NegInf = ConstantFP::getInf(CI->getType(), true);
|
Value *NegInf = ConstantFP::getInfinity(CI->getType(), true);
|
||||||
Value *Sqrt = EmitUnaryFloatFnCall(Op1, "sqrt", B, CI->getAttributes());
|
Value *Sqrt = EmitUnaryFloatFnCall(Op1, "sqrt", B, CI->getAttributes());
|
||||||
Value *FAbs = EmitUnaryFloatFnCall(Sqrt, "fabs", B, CI->getAttributes());
|
Value *FAbs = EmitUnaryFloatFnCall(Sqrt, "fabs", B, CI->getAttributes());
|
||||||
Value *FCmp = B.CreateFCmpOEQ(Op1, NegInf, "tmp");
|
Value *FCmp = B.CreateFCmpOEQ(Op1, NegInf, "tmp");
|
||||||
|
@ -436,7 +436,7 @@ ConstantFP* ConstantFP::get(LLVMContext &Context, const APFloat& V) {
|
|||||||
return Slot;
|
return Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstantFP *ConstantFP::getInf(const Type *Ty, bool Negative) {
|
ConstantFP *ConstantFP::getInfinity(const Type *Ty, bool Negative) {
|
||||||
const fltSemantics &Semantics = *TypeToFloatSemantics(Ty);
|
const fltSemantics &Semantics = *TypeToFloatSemantics(Ty);
|
||||||
return ConstantFP::get(Ty->getContext(),
|
return ConstantFP::get(Ty->getContext(),
|
||||||
APFloat::getInf(Semantics, Negative));
|
APFloat::getInf(Semantics, Negative));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user