diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Operator.h | 6 | ||||
-rw-r--r-- | include/llvm/Support/MDBuilder.h | 16 |
2 files changed, 4 insertions, 18 deletions
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index 6bd7e56..1e86980 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -174,13 +174,9 @@ public: /// \brief Get the maximum error permitted by this operation in ULPs. An /// accuracy of 0.0 means that the operation should be performed with the - /// default precision. A huge value is returned if the accuracy is 'fast'. + /// default precision. float getFPAccuracy() const; - /// \brief Return true if the accuracy is 'fast'. This indicates that speed - /// is more important than accuracy. - bool isFastFPAccuracy() const; - static inline bool classof(const FPMathOperator *) { return true; } static inline bool classof(const Instruction *I) { return I->getType()->isFPOrFPVectorTy(); diff --git a/include/llvm/Support/MDBuilder.h b/include/llvm/Support/MDBuilder.h index f6d8452..40f028a 100644 --- a/include/llvm/Support/MDBuilder.h +++ b/include/llvm/Support/MDBuilder.h @@ -26,9 +26,6 @@ namespace llvm { class MDBuilder { LLVMContext &Context; - MDString *getFastString() { - return createString("fast"); - } public: MDBuilder(LLVMContext &context) : Context(context) {} @@ -41,19 +38,12 @@ namespace llvm { // FPMath metadata. //===------------------------------------------------------------------===// - /// \brief Return metadata with appropriate settings for 'fast math'. - MDNode *createFastFPMath() { - return MDNode::get(Context, getFastString()); - } - - /// \brief Return metadata with the given settings. Special values for the - /// Accuracy parameter are 0.0, which means the default (maximal precision) - /// setting; and negative values which all mean 'fast'. + /// \brief Return metadata with the given settings. The special value 0.0 + /// for the Accuracy parameter indicates the default (maximal precision) + /// setting. MDNode *createFPMath(float Accuracy) { if (Accuracy == 0.0) return 0; - if (Accuracy < 0.0) - return MDNode::get(Context, getFastString()); assert(Accuracy > 0.0 && "Invalid fpmath accuracy!"); Value *Op = ConstantFP::get(Type::getFloatTy(Context), Accuracy); return MDNode::get(Context, Op); |