[llvm-commits] [llvm] r82823 - in /llvm/trunk: include/llvm/Constants.h lib/Transforms/Scalar/SimplifyLibCalls.cpp lib/VMCore/Constants.cpp

Dan Gohman gohman at apple.com
Fri Sep 25 18:40:22 CDT 2009


Author: djg
Date: Fri Sep 25 18:40:21 2009
New Revision: 82823

URL: http://llvm.org/viewvc/llvm-project?rev=82823&view=rev
Log:
Rename ConstantFP's getInf to getInfinity.

Modified:
    llvm/trunk/include/llvm/Constants.h
    llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
    llvm/trunk/lib/VMCore/Constants.cpp

Modified: llvm/trunk/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=82823&r1=82822&r2=82823&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Fri Sep 25 18:40:21 2009
@@ -258,7 +258,7 @@
   static Constant* get(const Type* Ty, const StringRef& Str);
   static ConstantFP* get(LLVMContext &Context, const APFloat& V);
   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.
   static bool isValueValidForType(const Type *Ty, const APFloat& V);

Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=82823&r1=82822&r2=82823&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Fri Sep 25 18:40:21 2009
@@ -1034,8 +1034,8 @@
       // and negative infinite correctly.
       // TODO: In fast-math mode, this could be just sqrt(x).
       // TODO: In finite-only mode, this could be just fabs(sqrt(x)).
-      Value *Inf = ConstantFP::getInf(CI->getType());
-      Value *NegInf = ConstantFP::getInf(CI->getType(), true);
+      Value *Inf = ConstantFP::getInfinity(CI->getType());
+      Value *NegInf = ConstantFP::getInfinity(CI->getType(), true);
       Value *Sqrt = EmitUnaryFloatFnCall(Op1, "sqrt", B, CI->getAttributes());
       Value *FAbs = EmitUnaryFloatFnCall(Sqrt, "fabs", B, CI->getAttributes());
       Value *FCmp = B.CreateFCmpOEQ(Op1, NegInf, "tmp");

Modified: llvm/trunk/lib/VMCore/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=82823&r1=82822&r2=82823&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Constants.cpp (original)
+++ llvm/trunk/lib/VMCore/Constants.cpp Fri Sep 25 18:40:21 2009
@@ -436,7 +436,7 @@
   return Slot;
 }
 
-ConstantFP *ConstantFP::getInf(const Type *Ty, bool Negative) {
+ConstantFP *ConstantFP::getInfinity(const Type *Ty, bool Negative) {
   const fltSemantics &Semantics = *TypeToFloatSemantics(Ty);
   return ConstantFP::get(Ty->getContext(),
                          APFloat::getInf(Semantics, Negative));





More information about the llvm-commits mailing list