diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-27 19:19:51 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-27 19:19:51 +0000 |
commit | c5096cbf7a42e0f9012945b00d9037a5b5a88d72 (patch) | |
tree | 84a9e447bd9b0917cdf7c57a07984d9c0b68bb76 /lib/CodeGen/CodeGenFunction.h | |
parent | 9d31fa75bc05fe4cb903a7701550f22cfb73ea8b (diff) |
Annotate imprecise FP division with fpaccuracy metadata
The OpenCL single precision division operation is only required to
be accurate to 2.5ulp. Annotate the fdiv instruction with metadata
which signals to the backend that an imprecise divide instruction
may be used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 858962d337..4940e21c8b 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2382,6 +2382,11 @@ public: /// a r-value suitable for passing the given parameter. void EmitDelegateCallArg(CallArgList &args, const VarDecl *param); + /// SetFPAccuracy - Set the minimum required accuracy of the given floating + /// point operation, expressed as the maximum relative error in ulp. + void SetFPAccuracy(llvm::Value *Val, unsigned AccuracyN, + unsigned AccuracyD = 1); + private: void EmitReturnOfRValue(RValue RV, QualType Ty); |