[PATCH] D31167: Use FPContractModeKind universally
Adam Nemet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 20 20:11:47 PDT 2017
anemet created this revision.
FPContractModeKind is the codegen option flag which is already ternary (off,
on, fast). This makes it universally the type for the contractable info
across the front-end:
- In FPOptions (i.e. in the Sema + in the expression nodes).
- In LangOpts::DefaultFPContractMode which is the option that initializes
FPOptions in the Sema.
Another way to look at this change is that before fp-contractable on/off were
the only states handled to the front-end:
- For "on", FMA folding was performed by the front-end
- For "fast", we simply forwarded the flag to TargetOptions to handle it in LLVM
Now off/on/fast are all exposed because for fast we will generate
fast-math-flags during CodeGen.
This is toward moving fp-contraction=fast from an LLVM TargetOption to a
FastMathFlag in order to fix PR25721.
https://reviews.llvm.org/D31167
Files:
include/clang/AST/Expr.h
include/clang/AST/ExprCXX.h
include/clang/Basic/LangOptions.def
include/clang/Basic/LangOptions.h
include/clang/Frontend/CodeGenOptions.def
include/clang/Frontend/CodeGenOptions.h
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGExprScalar.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Sema/SemaAttr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31167.92423.patch
Type: text/x-patch
Size: 10476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170321/950c7621/attachment.bin>
More information about the cfe-commits
mailing list