summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-10-27 19:19:51 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-10-27 19:19:51 +0000
commit95fd2ca69f21f715d846d45178b1e57a76ee76ec (patch)
treeab7a79322e9947d7cfc773f730c155132a48ffb2 /clang/lib/CodeGen/CodeGenFunction.h
parentf7d1e7be554530b28921a142ab83f97b4d80c4c9 (diff)
downloadbcm5719-llvm-95fd2ca69f21f715d846d45178b1e57a76ee76ec.tar.gz
bcm5719-llvm-95fd2ca69f21f715d846d45178b1e57a76ee76ec.zip
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. llvm-svn: 143136
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 858962d337b..4940e21c8be 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/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);
OpenPOWER on IntegriCloud