aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-04-16 19:39:33 +0000
committerDuncan Sands <baldrick@free.fr>2012-04-16 19:39:33 +0000
commit2867c85a3754320f96e36afb63325bb76269caa4 (patch)
treec5bd58459f230d669f87a597c75213ab42b9529d /include
parent2c651fe6f445724627dcc48064797dca2aa4aedc (diff)
downloadexternal_llvm-2867c85a3754320f96e36afb63325bb76269caa4.zip
external_llvm-2867c85a3754320f96e36afb63325bb76269caa4.tar.gz
external_llvm-2867c85a3754320f96e36afb63325bb76269caa4.tar.bz2
Remove support for the special 'fast' value for fpmath accuracy for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Operator.h6
-rw-r--r--include/llvm/Support/MDBuilder.h16
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);