diff options
author | John McCall <rjmccall@apple.com> | 2020-06-01 21:02:02 -0400 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2020-06-01 22:00:30 -0400 |
commit | 8a8d703be0986dd6785cba0b610c9c4708b83e89 (patch) | |
tree | cb1da53250fb1bc0bfcfbe74adfb6de68535ab8e /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 11d1aa0bcc1197f1b3010171b02c6e9662f34b75 (diff) | |
download | llvm-8a8d703be0986dd6785cba0b610c9c4708b83e89.zip llvm-8a8d703be0986dd6785cba0b610c9c4708b83e89.tar.gz llvm-8a8d703be0986dd6785cba0b610c9c4708b83e89.tar.bz2 |
Fix how cc1 command line options are mapped into FP options.
Canonicalize on storing FP options in LangOptions instead of
redundantly in CodeGenOptions. Incorporate -ffast-math directly
into the values of those LangOptions rather than considering it
separately when building FPOptions. Build IR attributes from
those options rather than a mix of sources.
We should really simplify the driver/cc1 interaction here and have
the driver pass down options that cc1 directly honors. That can
happen in a follow-up, though.
Patch by Michele Scandale!
https://reviews.llvm.org/D80315
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 766912d..e3dd462 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -4341,6 +4341,9 @@ public: /// SetFPModel - Control floating point behavior via fp-model settings. void SetFPModel(); + /// Set the codegen fast-math flags. + void SetFastMathFlags(FPOptions FPFeatures); + private: llvm::MDNode *getRangeForLoadFromType(QualType Ty); void EmitReturnOfRValue(RValue RV, QualType Ty); |